var enablepersist2="no" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious2="yes" //Collapse previously open content when opening present? (yes/no)

if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent2{display:none;}')
document.write('</style>')
}

function getElementbyClass2(classname){
ccollect2=new Array()
var inc2=0
var alltags2=document.all? document.all : document.getElementsByTagName("*")
for (i2=0; i2<alltags2.length; i2++){
if (alltags2[i2].className==classname)
ccollect2[inc2++]=alltags2[i2]
}
}

function closeall2() {
if (typeof ccollect2=="undefined"){
   getElementbyClass2("switchcontent2")
}
var inc2=0
while (ccollect2[inc2]){
ccollect2[inc2].style.display="none"
inc2++
}
}

function contractcontent2(omit){
var inc2=0
while (ccollect2[inc2]){
if (ccollect2[inc2].id!=omit)
ccollect2[inc2].style.display="none"
inc2++
}
}

function expandcontent2(cid){
if (typeof ccollect2=="undefined"){
   getElementbyClass2("switchcontent2")
}
if (collapseprevious2=="yes")
contractcontent2(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "block"
}

function revivecontent2(){
contractcontent2("omitnothing")
selectedItem2=getselectedItem2()
selectedComponents2=selectedItem2.split("|")
for (i2=0; i2<selectedComponents2.length-1; i2++)
document.getElementById(selectedComponents2[i2]).style.display="block"
}



function getselectedItem2(){
return ""
}

function saveswitchstate2(){
var inc2=0, selectedItem2=""
while (ccollect2[inc2]){
if (ccollect2[inc2].style.display=="block")
selectedItem2+=ccollect2[inc2].id+"|"
inc2++
}

document.cookie=window.location.pathname+"="+selectedItem2
}

function do_onload2(){
getElementbyClass2("switchcontent2")
if (enablepersist2=="on" && typeof ccollect2!="undefined")
revivecontent2()
}


if (window.addEventListener)
window.addEventListener("load", do_onload2, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload2)
else if (document.getElementById)
window.onload=do_onload2

if (enablepersist2=="on" && document.getElementById)
window.onunload=saveswitchstate2


