var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)

var contractsymbol='<img src="images/down.gif" width="11" height="11" border="0">' //HTML for contract symbol. For image, use: <img src="whatever.gif">
var expandsymbol='<img src="images/up.gif" width="11" height="11" border="0">' //HTML for expand symbol.

//var contractsymbol='-' //HTML for contract symbol. For image, use: <img src="whatever.gif">
//var expandsymbol='+' //HTML for expand symbol.

if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('</style>')
}

function getElementbyClass(rootobj, classname){
var temparray=new Array()
var inc=0
var rootlength=rootobj.length
for (i=0; i<rootlength; i++){
if (rootobj[i].className==classname)
temparray[inc++]=rootobj[i]
}
return temparray
}

function sweeptoggle(ec, target){

	var thestate=(ec=="expand")? "block" : "none";

	var inc=0;

	while (ccollect[inc]){

		//if(inc == 0) alert(ccollect[inc].id);

		if (!target || ccollect[inc].id == target) ccollect[inc].style.display=thestate

		inc++

	}

	revivestatus()

}


function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expandcontent(curobj, cid, state){

	var spantags=curobj.getElementsByTagName("SPAN")

	var showstateobj=getElementbyClass(spantags, "showstate")

	if (ccollect.length>0){

		if (collapseprevious=="yes") contractcontent(cid)

		document.getElementById(cid).style.display = (state) ? state : (document.getElementById(cid).style.display!="block") ? "block" : "none"

		if (showstateobj.length>0) { //if "showstate" span exists in header

			if (collapseprevious=="no") {

				showstateobj[0].innerHTML = (state) ? state : (document.getElementById(cid).style.display=="block")? contractsymbol : expandsymbol

			} else {

				revivestatus()

			}

		}

	}

}

function expandIt(getIt){  
    getIt.style.display=(getIt.style.display=="none")?"":"none";  
  }  
  
