disp=new Array("inline","none")
skipdiv=new Array()
//showdiv=newArray()
function chgVis(spstr,ind){
	if (document.getElementById)
		myE=document.getElementById(spstr).style
	else
		myE=document.document.layers[spstr]
    if (ind==0)
	    myE.visibility="visible"
    else
	    myE.visibility="hidden"

}
//function dispSpan(spstr,set,to_arr){
function dispSpan(spstr,set){
	var adddiv=1
	if (document.getElementById)
		myE=document.getElementById(spstr).style
	else
		myE=document.document.layers[spstr]
	myE.display=disp[set]
//	if (spstr=="div1a") alert("wid="+myE.width)
/*
	if (to_arr==1){
		if (set==0){
			n=showdiv.length
			for (i=0;i<n;i++){
				if (showdiv[i]==spstr){
					adddiv=0
					break
				}
			}
			if (adddiv==1)
				showdiv[n]=spstr
		}
	}
*/
}
function chgBG(str,col){
      myE=document.getElementById(str).style
	  myE.backgroundColor=col
//	  if (col=="red") myE.color=c1
//	  else myE.color=c2
}
function ckW(str){
      myE=document.getElementById(str).style
	  return myE.width
}
function setL(nt){
//	alert("in setL")
	var w=screen.width
	myE=document.getElementById("sp").style
	var w1=myE.width
	tw=parseInt(w1)*w/100
	w1=parseInt((tw-nt+1)/nt)
//	str2=""
	var ctr=0
	for (x=1;x<=nt;x++){
		str="div"+x+"a"
		if (skipdiv[str]==undefined){
//		str2=str2+str+"\n"
		ctr++
		myE=document.getElementById(str).style
		var w2=parseInt(myE.width)
		var ml=parseInt(myE.left)
		var st=(w1+1)*(ctr-1)+ml
		var ck=st+w2+15
		if (ck>w) ml=w-ck
		myE.left=ml
		}
/*
*/
	}
//alert("str2="+str2)
//alert("sd[12]="+skipdiv['div12a'])
}
/*
function clearDivs(){
	n=showdiv.length
	for (i=0;i<n;i++)
		dispspan(showdiv[i],1)
}
*/
var wid=screen.width
function cktrans(x){
  var tab="trvis"
  if (document.getElementById)
	myE=document.getElementById(spstr).style
  else
	myE=document.document.layers[spstr]
  if (x==1) myE.visibility="visible"
  else myE.visibility="hidden"
}
function iH(spstr,txt){
//		alert("spstr="+spstr+" txt="+txt)
		if (document.getElementById)
			myE=document.getElementById(spstr)
		else
			myE=document.document.layers[spstr]
		myE.innerHTML=txt
}
