// JavaScript Document
var enablepersist="off";
var collapseprevious="yes";

if (document.getElementById){
	document.write('<style type="text/css">');
	document.write('.switchcontent{display:none;}');
	document.write('</style>');
}
function fnChkState(){
	var sta = document.getElementById("chkViewall");
	var ch = (sta.checked)?sweeptoggle('expand'):sweeptoggle('contract');
} 
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 thestate=(ec=="expand")? "block" : "none";
	var inc=0;
	while (ccollect[inc]){
		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,faq_id){
	var spantags=curobj.getElementsByTagName("SPAN");
	var showstateobj=getElementbyClass(spantags, "showstate");
	if (ccollect.length>0){
		if (collapseprevious=="yes"){
			contractcontent(cid);
			document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
			revivestatus();
		}
	}	
}

function revivestatus(){
	var inc=0;
	while (statecollect[inc]){
		if (ccollect[inc].style.display=="block"){
			statecollect[inc].innerHTML=contractsymbol;
		}else{
			statecollect[inc].innerHTML=expandsymbol;
		}
		inc++;
	}
}

function initFAQs(){
	var alltags=document.all? document.all : document.getElementsByTagName("*");
	ccollect=getElementbyClass(alltags, "switchcontent");
	statecollect=getElementbyClass(alltags, "showstate");	
	revivestatus();
}

if (window.addEventListener) {
	window.addEventListener("load", initFAQs, false);
	}else if (window.attachEvent) {
		window.attachEvent("onload", initFAQs);
	}else if (document.getElementById) {
		window.onload=initFAQs;
}