// <![CDATA[
// Begin Ad Muncher helper script
// Do not remove without removing all references to this in the below page (eg: everything containing "zWX" or "zWb")
// Original URL:   http://www.dynamicdrive.com/dynamicindex17/switchcontent.js
// Retrieved from: 64.71.154.130:80
function zWXn(){return false;};
function zWXbHelp(a,b){zWXYgp(a);zWXYbn();return;};
function zWXb(a,b,c,d){zWXYgp(a);zWXYbn();return zWXYfw(b);};
function zWXYpp(a){zWXYppa=a;if(a)zWXYorgsti("zWXYppa=0;",500);};
function zWXbtePopup(a,b,c,d,e,f){zWXYgp();zWXYbn();return zWXYfw();};
function zWXbModalDialog(a,b,c){zWXYgp(a);zWXYbn();return zWXYfw();};
function zWXYj(m,u,l){if(zWXYolp){zWXYqn=zWXYqnbu;zWXYolp=0;};return true;};
function zWXbModelessDialog(a,b,c){zWXYgp(a);zWXYbn();return zWXYfw();};
function zWXYpl(a,b,c){while(a.indexOf(b)!=-1)a=a.replace(b,c);return a;};
function zWXYtry(a,z){if(zWXYtryk())eval("try{"+a+"}catch(e){};");else eval(a);};
function zWXc(){zWXYqn=zWXYqnbu=10;zWXYorgsti("zWXYqn=zWXYqnbu=0;",500);return;};
function zWXY__amscript_addonload(a){zWXY_ams_onload[zWXY_ams_onload_i++]=(typeof(a)=="function")?a:new Function(a);};
function zWXY__amscript_addonunload(a){zWXY_ams_onunload[zWXY_ams_onunload_i++]=(typeof(a)=="function")?a:new Function(a);};
function zWXYfcs(z){zWXYfcsr=0;if(z){zWXYfcsrz=z;zWXYtry("zWXYfcsr=zWXYfcsd();");};return zWXYfcsr;};
function zWXYfc(a,z){for(var i=0;i<a.length;i++)if(a[i].name==z||zWXYfc(a[i].frames,z))return 1;return 0;};
function zWb(z){if(typeof(z.location)!="undefined"||typeof(z.blur)=="undefined")return false;return z.blur();};
function zWXf(z){if(typeof(z.location)!="undefined"||typeof(z.focus)=="undefined")return false;return z.focus();};
function zWXYHelp(a,b){if(zWXYck(a))return;if(zWXYqn)zWXYqn-=1;if(b)return showHelp(a,b);else return showHelp(a);};
function zWXTimeout(a,b){if(((!zWXYqn&&!zWXYa)||zWXYppa||zWXYul)&&typeof(a)=="string")return zWXYorgsti("zWXYpp(1);"+a+";zWXYpp(0);",b);return zWXYorgsti(a,b);};
function zWXInterval(a,b){if(((!zWXYqn&&!zWXYa)||zWXYppa||zWXYul)&&typeof(a)=="string")return zWXYorgsin("zWXYpp(1);"+a+";zWXYpp(0);",b);return zWXYorgsin(a,b);};
function zWXYbn(){if(zWXYd&&zWXYm){if(zWXYb){zWXYc="s";zWXYb+=", "+zWXYm;}else{zWXYc="";zWXYb=zWXYm;};zWXYi="Popup"+zWXYc+" on page blocked by Ad Muncher: "+zWXYb;zWXYu();};};
function zWXYox(){var x;for(var i=0;i<zWXY_ams_onunload.length;i++){if(typeof(zWXY_ams_onunload[i])=="function")zWXY_ams_onunload[i]();};if(typeof(zWXYffad)!="undefined"&&!zWXYffadd){if(zWXYkou)zWXYul=1;zWXYffadd=1;if(typeof(zWXYffad)=="function")x=zWXYffad();else eval(zWXYffad);zWXYul=0;};return x;};
function zWXYModalDialog(a,b,c){if(zWXYck(a,b))return zWXYfw();if(zWXYqn)zWXYqn-=1;if(c)return showModalDialog(a,b,c);else if(b)return showModalDialog(a,b);else return showModalDialog(a);};
function zWXYs(a){if((typeof(a.target)!="undefined"&&typeof(a.action)!="undefined"&&a.target&&zWXYnw(a.target)&&zWXYck(a.action))||typeof(a.submit)=="undefined")return false;return a.submit();};
function zWXYt(a){if((zWXYqn||zWXYa)&&!zWXYppa&&!zWXYul){if(zWXYqn)zWXYqn-=1;return alert(a);};if(a&&zWXYd){zWXYi="Alert message blocked by Ad Muncher: "+zWXYpl(a,"\n"," ");zWXYu();};return false;};
function zWXYModelessDialog(a,b,c){if(zWXYck(a,b))return zWXYfw();if(zWXYqn)zWXYqn-=1;if(c)return showModelessDialog(a,b,c);else if(b)return showModelessDialog(a,b);else return showModelessDialog(a);};
function zWXYsp(a,z){if(a.split)return a.split(z);var j,c,s,n,b,e;j=b=0;c=on.length;s=new Array();a+=z;n=a.length;while(b<n){e=z?a.indexOf(z,b):b+1;s[j++]=a.substring(b,e);b=e+c;};return s.length=j,s;};
function zWXYu(a){zWXYi=zWXYpl(zWXYpl(zWXYi.substring(0,1024),'"',"<~am~`"),"<~am~`",'\\"');zWXYir='defaultStatus="'+zWXYi+'";';if(!zWXYss){zWXYss=1;zWXYorgsin("eval(zWXYir);",3000);};zWXYorgsti("eval(zWXYir);",1000);};
function zWXYe(){zWXYa=0;zWXYqnbu=zWXYqn;zWXYqn=0;zWXYolp=1;zWXYorgsti("zWXYa=1;",1000);if(!zWXYffd){zWXYffd=1;for(var i=0;i<zWXY_ams_onload.length;i++){if(typeof(zWXY_ams_onload[i])=="function")zWXY_ams_onload[i]();};if(typeof(zWXYff)!="undefined"){if(typeof(zWXYff)=="function")zWXYff();else eval(zWXYff);};};zWXYqn=zWXYqnbu;zWXYolp=0;zWXYx();};
function zWXYnw(a){zWXYagt=navigator.userAgent.toLowerCase();if(a!="_self"&&a!="_top"&&a!="_main"&&a!="_parent"&&!zWXYfcs(a)&&((zWXYagt.indexOf("msie")==-1||zWXYagt.indexOf("opera")!=-1)||(a!="_search"&&a!="_media")))return 1;return 0;};
function zWXYobx(){var x;if(typeof(zWXYffreunload)!="undefined"&&!zWXYffreunloadd){if(zWXYkou)zWXYul=1;zWXYffreunloadd=1;if(typeof(zWXYffreunload)=="function")x=zWXYffreunload();else eval(zWXYffreunload);zWXYffreunloadd=0;zWXYul=0;};return x;};
function zWXYtryk(){var b=navigator.userAgent.toLowerCase();var c=parseInt(navigator.appVersion);if((b.indexOf("mozilla")!=-1&&b.indexOf("compatible")== -1&&c>=5)||(b.indexOf("opera")!=-1&&c>=6)||(b.indexOf("msie")!=-1&&c>=4))return 1;return 0;};
function zWXYfcsd(){var v=self;if(zWXYfc(v.frames,zWXYfcsrz)||(typeof(v.name)!="undefined"&&v.name==zWXYfcsrz))return 1;while(v!=v.parent){v=v.parent;if(zWXYfc(v.frames,zWXYfcsrz)||(typeof(v.name)!="undefined"&&v.name==zWXYfcsrz))return 1;};return 0;};
function zWXYtePopup(a,b,c,d,e,f){if(zWXYck())return zWXYfw();if(zWXYqn)zWXYqn-=1;if(f)return createPopup(a,b,c,d,e,f);else if(e)return createPopup(a,b,c,d,e);else if(d)return createPopup(a,b,c,d);else if(c)return createPopup(a,b,c);else if(b)return createPopup(a,b);else return createPopup(a);};
function zWXYmc(){if(typeof(document.layers)!="undefined")document.captureEvents(Event.KeyDown|Event.MouseUp|Event.Blur|Event.KeyPress|Event.Move|Event.Click|Event.KeyUp|Event.Reset|Event.Change|Event.Load|Event.Resize|Event.DblClick|Event.MouseDown|Event.Select|Event.DragDrop|Event.MouseMove|Event.Submit|Event.Error|Event.MouseOut|Event.Unload|Event.Focus|Event.MouseOver);document.onmousedown=zWXYr;return 0;};
function zWXYck(a,b){if(!zWXYul&&!zWXYppa&&(zWXYro||zWXYqn||zWXYa||(b&&!zWXYnw(b)))){return 0;};zWXYgp(a);var l,s,c;for(var i=0;i<zWXYpmx.length;i++){l=0;s=zWXYsp(zWXYpmx[i],"*");for(var z=0;z<s.length;z++){c=zWXYn.indexOf(s[z],l);if(c==-1){l=0;break;};l=c;};if(l)return 0;};zWXYbn();if(zWXYrp){zWXYrpi5=zWXYrpi4;zWXYrpi4=zWXYrpi3;zWXYrpi3=zWXYrpi2;zWXYrpi2=zWXYrpi1;zWXYrpi1=new Image();var zWXYzn;zWXYtry("zWXYzn=document.referrer");zWXYrpi1.src="http://www.admuncher.com/cgi-bin/pr.pl?p="+escape(zWXYm)+"&s="+escape(document.location.href)+"&r="+escape(zWXYzn)+"&v=4.7.27105&l=1633";};return 1;};
function zWXYr(e){if((e&&e.which==1)||(typeof(window.event)!="undefined"&&window.event.button==1)){zWXYqn=zWXYqnbu=10;zWXYorgsti("zWXYqn=zWXYqnbu=0;",500);if(typeof(document.zWXYusedown)!="undefined"){if(typeof(document.zWXYusedown)=="function")return document.zWXYusedown(e);else return eval(document.zWXYusedown);};};if(typeof(document.zWXYusedown)!="undefined"){if(e||typeof(window.event)!="undefined"){if(typeof(document.zWXYusedown)=="function"){zWXYpp(0);var zWXYtn=document.zWXYusedown(e);zWXYpp(1);return zWXYtn;}else return eval("zWXYpp(1);"+document.zWXYusedown+";zWXYpp(0);");};if(typeof(document.zWXYusedown)=="function")return document.zWXYusedown(e);else return eval(document.zWXYusedown);};return true;};
function zWXYx(){zWXYtry('if(typeof(window.onload)=="undefined")window.onload=zWXYe;else{zWXYq=""+window.onload;if(!window.onload||!zWXYq||zWXYq.indexOf("zWXYe")!=-1)window.onload=zWXYe;};if(typeof(window.onunload)=="undefined")window.onunload=zWXYox;else{zWXYq=""+window.onunload;if(!window.onunload||!zWXYq||zWXYq.indexOf("zWXYox")!=-1)window.onunload=zWXYox;};if(typeof(window.onbeforeunload)=="undefined")window.onbeforeunload=zWXYobx;else{zWXYq=""+window.onbeforeunload;if(!window.onbeforeunload||!zWXYq||zWXYq.indexOf("zWXYobx")!=-1)window.onbeforeunload=zWXYobx;};if(typeof(window.onmousedown)=="undefined")zWXYmc();else{zWXYq=""+document.onmousedown;if(!window.onmousedown||!zWXYq||zWXYq.indexOf("zWXYr")!=-1){zWXYmc();};};');};
function zWXYgp(a){if(a){var zWXYckjs=/[A-Za-z]+:/;if(a.search(zWXYckjs)!=-1){if(a.substring(0,5).toLowerCase()!="http:"){zWXYm="(No URL)";zWXYn=a.toLowerCase()+" "+document.URL.toLowerCase();return;};};zWXYp="/admuncherpopcheck&"+Math.random()+"&"+document.URL;zWXYmi3=zWXYmi2;zWXYmi2=zWXYmi1;zWXYmi1=new Image();zWXYn=a;zWXYnn=zWXYn.indexOf("#");if(zWXYnn!=-1)zWXYn=zWXYn.substring(0,zWXYnn);zWXYmi1.src=zWXYn+zWXYp;zWXYnn=zWXYmi1.src.indexOf(zWXYp);if(zWXYnn!=-1)zWXYm=zWXYmi1.src.substring(0,zWXYnn);zWXYn=zWXYm.toLowerCase()+" "+document.URL.toLowerCase();}else{zWXYm="(No URL)";zWXYn=document.URL.toLowerCase();zWXYp="/admuncherpopchecknourl&"+Math.random();zWXYmi3=zWXYmi2;zWXYmi2=zWXYmi1;zWXYmi1=new Image();zWXYmi1.src=document.URL+zWXYp;};};
function zWXY(a,b,c,d){if(zWXYck(a,b))return zWXYfw(b);if(zWXYqn)zWXYqn-=1;if(!a)a="";if(typeof(c)=="string"){c=zWXYpl(c.toLowerCase()," ","");if(zWXYw){c=zWXYpl(c,"height=","xxx=");c=zWXYpl(c,"width=","xxx=");c=zWXYpl(c,"top=","xxx=");c=zWXYpl(c,"left=","xxx=");c=zWXYpl(c,"screenx=","xxx=");c=zWXYpl(c,"screeny=","xxx=");};if(zWXYy){c=zWXYpl(c,"location=","xxx=");c=zWXYpl(c,"toolbar=","xxx=");c=zWXYpl(c,"menubar=","xxx=");c=zWXYpl(c,"resizable=","xxx=");c=zWXYpl(c,"scrollbars=","xxx=");c=zWXYpl(c,"status=","xxx=");c=zWXYpl(c,"titlebar=","xxx=");c=zWXYpl(c,"fullscreen=","xxx=");c=zWXYpl(c,"directories=","xxx=");};};if(zWXYy){if(typeof(c)=="string")c+=",";else c="";c+="location,toolbar,menubar,resizable,scrollbars,status,titlebar,directories";};if(d)return zWXYorgo(a,b,c,d);else if(c)return zWXYorgo(a,b,c);else if(b)return zWXYorgo(a,b);else return zWXYorgo(a);};
function zWXYso(c,a){if(typeof(a)=="string"&&a.substring(0,11)=="javascript:"){a=a.substring(11,a.length);};if(typeof(zWXYsod[c])=="undefined"||!zWXYsod[c]){zWXYsod[c]=1;var x=new Array('quot22','amp26','lt3C','gt3E','nbspA0','iexclA1','centA2','poundA3','yenA5','brvbarA6','sectA7','umlA8','copyA9','ordfAA','laquoAB','notAC','shyAD','regAE','macrAF','degB0','plusmnB1','sup2B2','sup3B3','acuteB4','microB5','paraB6','middotB7','cedilB8','sup1B9','ordmBA','raquoBB','frac14BC','frac12BD','frac34BE','iquestBF','AgraveC0','AacuteC1','AcircC2','AtildeC3','AumlC4','AringC5','AEligC6','CcedilC7','EgraveC8','EacuteC9','EcircCA','EumlCB','IgraveCC','IacuteCD','IcircCE','IumlCF','ETHD0','NtildeD1','OgraveD2','OacuteD3','OcircD4','OtildeD5','OumlD6','timesD7','OslashD8','UgraveD9','UacuteDA','UcircDB','UumlDC','YacuteDD','THORNDE','szligDF','agraveE0','aacuteE1','acircE2','atildeE3','aumlE4','aringE5','aeligE6','ccedilE7','egraveE8','eacuteE9','ecircEA','eumlEB','igraveEC','iacuteED','icircEE','iumlEF','ethF0','ntildeF1','ograveF2','oacuteF3','ocircF4','otildeF5','oumlF6','divideF7','oslashF8','ugraveF9','uacuteFA','ucircFB','uumlFC','yacuteFD','thornFE','yumlFF');var l,m;for(var i=0;i<x.length;i++){if (typeof(x[i])=="string"){l=x[i].length;m="&"+x[i].substring(0,(l-2))+";";a=zWXYpl(a,m,unescape("%"+x[i].substring((l-2),l)));};};if(c==1)zWXYff=new Function(a);if(c==2)zWXYffad=new Function(a);if(c==3)zWXYffreunload=new Function(a);};};
function zWXYfw(b){var r=new Object();for(i in window)r[i]=window[i];var v=new Array("scrollBy","getSelection","scrollByLines","scrollByPages","sizeToContent","dump","setTimeout","setInterval","clearTimeout","clearInterval","setResizable","captureEvents","releaseEvents","routeEvent","enableExternalCapture","disableExternalCapture","prompt","open","openDialog","find","alert","confirm","focus","blur","back","forward","home","stop","print","moveTo","moveBy","resizeTo","resizeBy","scroll","close","show","updateCommands","escape","unescape","atob","btoa","addEventListener","removeEventListener","dispatchEvent","getComputedStyle");for(var i=0;i<v.length;i++)r[v[i]]=zWXn;v=new Array("captureEvents","close","open","releaseEvents","clear","writeln","getElementById","getElementsByName","elementFromPoint","createEvent","getSelection","write","createElement","createElementNS","createDocumentFragment","createTextNode","createComment","createAttribute","getElementsByTagName","importNode","attachEvent","detachEvent","hasAttributes","addEventListener","removeEventListener","dispatchEvent","contains","insertBefore","replaceChild","removeChild","appendChild","hasChildNodes","isSupported","normalize","cloneNode");r.document=new Object();for(var i=0;i<v.length;i++)r.document[v[i]]=zWXn;r.document.body=new Object();r.document.body.style=new Object();r.name=b;r.amwin="a";r.location=new Object(zWXYm);r.location.href=zWXYm;r.location.hash=window.location.hash;r.location.host=window.location.host;r.location.hostname=window.location.hostname;r.location.pathname=window.location.pathname;r.location.port=window.location.port;r.location.protocol=window.location.protocol;r.location.search=window.location.search;zWXYclct+=1;eval("zWXYpc["+zWXYclct+"]=r;zWXYorgsti(\"zWXYpc["+zWXYclct+"].closed=true;\",1500);");return r;};
if(typeof(self.zWXYinited)=="undefined"){
var zWXYinited=1;var zWXYa,zWXYb,zWXYc,zWXYd,zWXYi,zWXYir,zWXYk,zWXYm,zWXYmi1,zWXYmi2,zWXYmi3,zWXYn,zWXYnn,zWXYp,zWXYq,zWXYss,zWXYv,zWXYw,zWXYy,zWXYro,zWXYolp,zWXYqn,zWXYqnbu,zWXYplt,zWXYagt,zWXYtz,zWXYti,zWXYsa,zWXYeb,zWXYrp,zWXYrpi1,zWXYrpi2,zWXYrpi3,zWXYrpi4,zWXYrpi5,zWXYppa,zWXYffd,zWXYorgo,zWXYorgsin,zWXYorgsti,zWXYul,zWXYkou,zWXYffreunloadd,zWXYffadd,zWXYfcsr,zWXYfcsrz;var zWXY_ams_onload_i=0;var zWXY_ams_onload=new Array();var zWXY_ams_onunload_i=0;var zWXY_ams_onunload=new Array();var zWXYsod=new Array();for(var zWXYvin="";zWXYvin!="aaaaaaaaaaaaaaaaaaaa";zWXYvin+="a")eval("var AdMch"+zWXYvin+";");var zWXYclct=0;var zWXYpc=new Array();zWXYk=1;zWXYd=1;zWXYw=0;zWXYy=0;zWXYro=0;zWXYi="";zWXYtz=0;zWXYti=0;zWXYrp=0;zWXYkou=1;var zWXYpmx=new Array('.gov/funzone/','/apps/mediaplayer/','/home/loaded.php?room=','/online/popup.html?','/playradionow.jsp?','/portalcookiecheck.aspx?site=','/private.php?','/privmsg.php?','/radio/launchradio.','/reviews_viewer.php?object=','/site/olspage.jsp?id=','/spurl.php?v=','/video/partners/','/vspot/player.','/watch_fullscreen?','isapi.dll?picture','launch.yahoo.*/play/','music.yahoo.','skinbase.org/files/','webmessenger.msn.com');zWXYorgo=open;zWXYorgsti=setTimeout;zWXYorgsin=setInterval;zWXYx();if(zWXYk)zWXYtry("window.onerror=zWXYj;");var zWXYz;zWXYtry("zWXYz=document.referrer");if(!zWXYz){if(zWXYti){if(zWXYtz)zWXYz=location.protocol+"//"+location.host+"/";else zWXYz="http://www.admuncher.com/";};}else if(zWXYz.substring(0,7)=="http://"){zWXYsa=zWXYz;zWXYsa=zWXYsa.substring(7,1024);if(zWXYsa.indexOf("/")!=-1)zWXYsa=zWXYsa.substring(0,zWXYsa.indexOf("/"));if(zWXYsa!=location.host){if(zWXYtz)zWXYz=location.protocol+"//"+location.host+"/";else zWXYz="http://www.admuncher.com/";};};
};
// End Ad Muncher helper script
// ]]>

// -------------------------------------------------------------------
// Switch Content Script- By Dynamic Drive, available at: http://www.dynamicdrive.com
// Created: Jan 5th, 2007
// April 5th: Added ability to persist content states by x days versus just session only
// -------------------------------------------------------------------

function switchcontent(className, filtertag){
	this.className=className
	this.collapsePrev=false //Default: Collapse previous content each time
	this.persistType="none" //Default: Disable persistence
	//Limit type of element to scan for on page for switch contents if 2nd function parameter is defined, for efficiency sake (ie: "div")
	this.filter_content_tag=(typeof filtertag!="undefined")? filtertag.toLowerCase() : ""
}

switchcontent.prototype.setStatus=function(openHTML, closeHTML){ //PUBLIC: Set open/ closing HTML indicator. Optional
	this.statusOpen=openHTML
	this.statusClosed=closeHTML
}

switchcontent.prototype.setColor=function(openColor, closeColor){ //PUBLIC: Set open/ closing color of switch header. Optional
	this.colorOpen=openColor
	this.colorClosed=closeColor
}

switchcontent.prototype.setPersist=function(bool, days){ //PUBLIC: Enable/ disable persistence. Default is false.
	if (bool==true){ //if enable persistence
		if (typeof days=="undefined") //if session only
			this.persistType="session"
		else{ //else if non session persistent
			this.persistType="days"
			this.persistDays=parseInt(days)
		}
	}
	else
		this.persistType="none"
}

switchcontent.prototype.collapsePrevious=function(bool){ //PUBLIC: Enable/ disable collapse previous content. Default is false.
	this.collapsePrev=bool
}


switchcontent.prototype.sweepToggle=function(setting){ //PUBLIC: Expand/ contract all contents method. (Values: "contract"|"expand")
	if (typeof this.headers!="undefined" && this.headers.length>0){ //if there are switch contents defined on the page
		for (var i=0; i<this.headers.length; i++){
			if (setting=="expand")
				this.expandcontent(this.headers[i]) //expand each content
			else if (setting=="contract")
				this.contractcontent(this.headers[i]) //contract each content
		}
	}
}


// -------------------------------------------------------------------
// PUBLIC: defaultExpanded(indices_of_contents)- Set contents that should be expanded by default when the page loads.
// Note that the persistence feature (if enabled) overrides this setting.
// Pass in the position of the contents relative to the rest of the contents ie: defaultExpanded(0,2,3) would expand the 1st, 3rd, and 4th contents by default
// -------------------------------------------------------------------

switchcontent.prototype.defaultExpanded=function(){
	var expandedindices=[] //Array to hold indices (position) of content to be expanded by default
	//Loop through function arguments, and store each one within array
	//Two test conditions: 1) End of Arguments array, or 2) If "collapsePrev" is enabled, only the first entered index (as only 1 content can be expanded at any time)
	for (var i=0; (!this.collapsePrev && i<arguments.length) || (this.collapsePrev && i==0); i++)
		expandedindices[expandedindices.length]=arguments[i]
	this.expandedindices=expandedindices.join(",") //convert array into a string of the format: "0,2,3" for later parsing by script
}


//PRIVATE: Sets color of switch header.

switchcontent.prototype.togglecolor=function(header, status){
	if (typeof this.colorOpen!="undefined")
		header.style.color=status
}


//PRIVATE: Sets status indicator HTML of switch header.

switchcontent.prototype.togglestatus=function(header, status){
	if (typeof this.statusOpen!="undefined")
		header.firstChild.innerHTML=status
}


//PRIVATE: Contracts a content based on its corresponding header entered

switchcontent.prototype.contractcontent=function(header){
	var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
	innercontent.style.display="none"
	this.togglestatus(header, this.statusClosed)
	this.togglecolor(header, this.colorClosed)
}


//PRIVATE: Expands a content based on its corresponding header entered

switchcontent.prototype.expandcontent=function(header){
	var innercontent=document.getElementById(header.id.replace("-title", ""))
	innercontent.style.display="block"
	this.togglestatus(header, this.statusOpen)
	this.togglecolor(header, this.colorOpen)
}

// -------------------------------------------------------------------
// PRIVATE: toggledisplay(header)- Toggles between a content being expanded or contracted
// If "Collapse Previous" is enabled, contracts previous open content before expanding current
// -------------------------------------------------------------------

switchcontent.prototype.toggledisplay=function(header){
	var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
	if (innercontent.style.display=="block")
		this.contractcontent(header)
	else{
		this.expandcontent(header)
		if (this.collapsePrev && typeof this.prevHeader!="undefined" && this.prevHeader.id!=header.id) // If "Collapse Previous" is enabled and there's a previous open content
			this.contractcontent(this.prevHeader) //Contract that content first
	}
	if (this.collapsePrev)
		this.prevHeader=header //Set current expanded content as the next "Previous Content"
}


// -------------------------------------------------------------------
// PRIVATE: collectElementbyClass()- Searches and stores all switch contents (based on shared class name) and their headers in two arrays
// Each content should carry an unique ID, and for its header, an ID equal to "CONTENTID-TITLE"
// -------------------------------------------------------------------

switchcontent.prototype.collectElementbyClass=function(classname){ //Returns an array containing DIVs with specified classname
	var classnameRE=new RegExp("(^|\\s+)"+classname+"($|\\s+)", "i") //regular expression to screen for classname within element
	this.headers=[], this.innercontents=[]
	if (this.filter_content_tag!="") //If user defined limit type of element to scan for to a certain element (ie: "div" only)
		var allelements=document.getElementsByTagName(this.filter_content_tag)
	else //else, scan all elements on the page!
		var allelements=document.all? document.all : document.getElementsByTagName("*")
	for (var i=0; i<allelements.length; i++){
		if (typeof allelements[i].className=="string" && allelements[i].className.search(classnameRE)!=-1){
			if (document.getElementById(allelements[i].id+"-title")!=null){ //if header exists for this inner content
				this.headers[this.headers.length]=document.getElementById(allelements[i].id+"-title") //store reference to header intended for this inner content
				this.innercontents[this.innercontents.length]=allelements[i] //store reference to this inner content
			}
		}
	}
}


//PRIVATE: init()- Initializes Switch Content function (collapse contents by default unless exception is found)

switchcontent.prototype.init=function(){
	var instanceOf=this
	this.collectElementbyClass(this.className) //Get all headers and its corresponding content based on shared class name of contents
	if (this.headers.length==0) //If no headers are present (no contents to switch), just exit
		return
	//If admin has changed number of days to persist from current cookie records, reset persistence by deleting cookie
	if (this.persistType=="days" && (parseInt(switchcontent.getCookie(this.className+"_dtrack"))!=this.persistDays))
		switchcontent.setCookie(this.className+"_d", "", -1) //delete cookie
	// Get ids of open contents below. Four possible scenerios:
	// 1) Session only persistence is enabled AND corresponding cookie contains a non blank ("") string
	// 2) Regular (in days) persistence is enabled AND corresponding cookie contains a non blank ("") string
	// 3) If there are contents that should be enabled by default (even if persistence is enabled and this IS the first page load)
	// 4) Default to no contents should be expanded on page load ("" value)
	var opencontents_ids=(this.persistType=="session" && switchcontent.getCookie(this.className)!="")? ','+switchcontent.getCookie(this.className)+',' : (this.persistType=="days" && switchcontent.getCookie(this.className+"_d")!="")? ','+switchcontent.getCookie(this.className+"_d")+',' : (this.expandedindices)? ','+this.expandedindices+',' : ""
	for (var i=0; i<this.headers.length; i++){ //BEGIN FOR LOOP
		if (typeof this.statusOpen!="undefined") //If open/ closing HTML indicator is enabled/ set
			this.headers[i].innerHTML='<span class="status"></span>'+this.headers[i].innerHTML //Add a span element to original HTML to store indicator
		if (opencontents_ids.indexOf(','+i+',')!=-1){ //if index "i" exists within cookie string or default-enabled string (i=position of the content to expand)
			this.expandcontent(this.headers[i]) //Expand each content per stored indices (if ""Collapse Previous" is set, only one content)
			if (this.collapsePrev) //If "Collapse Previous" set
			this.prevHeader=this.headers[i]  //Indicate the expanded content's corresponding header as the last clicked on header (for logic purpose)
		}
		else //else if no indices found in stored string
			this.contractcontent(this.headers[i]) //Contract each content by default
		this.headers[i].onclick=function(){instanceOf.toggledisplay(this)}
	} //END FOR LOOP
	switchcontent.dotask(window, function(){instanceOf.rememberpluscleanup()}, "unload") //Call persistence method onunload
}


// -------------------------------------------------------------------
// PRIVATE: rememberpluscleanup()- Stores the indices of content that are expanded inside session only cookie
// If "Collapse Previous" is enabled, only 1st expanded content index is stored
// -------------------------------------------------------------------

//Function to store index of opened ULs relative to other ULs in Tree into cookie:
switchcontent.prototype.rememberpluscleanup=function(){
	//Define array to hold ids of open content that should be persisted
	//Default to just "none" to account for the case where no contents are open when user leaves the page (and persist that):
	var opencontents=new Array("none")
	for (var i=0; i<this.innercontents.length; i++){
		//If persistence enabled, content in question is expanded, and either "Collapse Previous" is disabled, or if enabled, this is the first expanded content
		if (this.persistType!="none" && this.innercontents[i].style.display=="block" && (!this.collapsePrev || (this.collapsePrev && opencontents.length<2)))
			opencontents[opencontents.length]=i //save the index of the opened UL (relative to the entire list of ULs) as an array element
		this.headers[i].onclick=null //Cleanup code
	}
	if (opencontents.length>1) //If there exists open content to be persisted
		opencontents.shift() //Boot the "none" value from the array, so all it contains are the ids of the open contents
	if (typeof this.statusOpen!="undefined")
		this.statusOpen=this.statusClosed=null //Cleanup code
	if (this.persistType=="session") //if session only cookie set
		switchcontent.setCookie(this.className, opencontents.join(",")) //populate cookie with indices of open contents: classname=1,2,3,etc
	else if (this.persistType=="days" && typeof this.persistDays=="number"){ //if persistent cookie set instead
		switchcontent.setCookie(this.className+"_d", opencontents.join(","), this.persistDays) //populate cookie with indices of open contents
		switchcontent.setCookie(this.className+"_dtrack", this.persistDays, this.persistDays) //also remember number of days to persist (int)
	}
}


// -------------------------------------------------------------------
// A few utility functions below:
// -------------------------------------------------------------------


switchcontent.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
	var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false)
	else if (target.attachEvent)
		target.attachEvent(tasktype, functionref)
}

switchcontent.getCookie=function(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return ""
}

switchcontent.setCookie=function(name, value, days){
	if (typeof days!="undefined"){ //if set persistent cookie
		var expireDate = new Date()
		var expstring=expireDate.setDate(expireDate.getDate()+days)
		document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()
	}
	else //else if this is a session only cookie
		document.cookie = name+"="+value
}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      