var contractsymbol='images/minus.gif' //Path to image to represent contract state.
var expandsymbol='images/plus.gif' //Path to image to represent expand state.


/////No need to edit beyond here //////////////////////////

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){
var inc=0
while (ccollect[inc]){
ccollect[inc].style.display=(ec=="contract")? "none" : ""
inc++
}
revivestatus()
}


function expandcontent(curobj, cid){
if (ccollect.length>0){
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="none")? "none" : ""
curobj.src=(document.getElementById(cid).style.display=="none")? expandsymbol : contractsymbol
}
}


function revivestatus(){
var inc=0
while (statecollect[inc]){
if (ccollect.display=="none")
statecollect[inc].src=contractsymbol
else
statecollect[inc].src=expandsymbol
inc++
}
}
function do_onload(){
var alltags=document.all? document.all : document.getElementsByTagName("*")
ccollect=getElementbyClass(alltags, "switchcontent")
statecollect=getElementbyClass(alltags, "showstate")
 document.getElementById('sc1').style.display = 'none';
 document.getElementById('sc2').style.display = 'none';
 document.getElementById('sc01').style.display = 'none';
document.getElementById('sc02').style.display = 'none';

if (ccollect.length>0 && statecollect.length>0)
revivestatus()
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

