sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp("sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

switchTo = function(now) {
if (document.getElementById(now).className=="off"){
	var sections = ["safety","participation","environmental","reviews","inspections","hearings"];
	for (i=0; i<=5; i++) {
		if (sections[i]!=now){
			Effect.BlindUp(sections[i], {duration: 0.5});
			Effect.Fade(sections[i], {duration: 0.6});
			window.setTimeout ('document.getElementById("'+sections[i]+'").className="off"', 500 );
			document.getElementById(sections[i]+"_button").className="off";
		}
	}
	Effect.BlindDown(now, {duration: 0.5});
	Effect.Appear(now, {duration: 0.7});
	document.getElementById(now).className="on";
	document.getElementById(now+"_button").className="on";
}
}

switchToFAQ = function(now) {
if (document.getElementById(now).className=="off"){
	var sections = ["q1","q2","q3","q4","q5","q6", "q7", "q8", "q9"];
	for (i=0; i<=8; i++) {
		if (sections[i]!=now){
			Effect.BlindUp(sections[i], {duration: 0.5});
			Effect.Fade(sections[i], {duration: 0.6});
			window.setTimeout ('document.getElementById("'+sections[i]+'").className="off"', 500 );
			document.getElementById(sections[i]+"_button").className="off";
		}
	}
	Effect.BlindDown(now, {duration: 0.5});
	Effect.Appear(now, {duration: 0.7});
	document.getElementById(now).className="on";
	document.getElementById(now+"_button").className="on";
}
}

switchTo2 = function(now, total) {
//total is the total number of switchable layers on the page - used to make this function more dynamic.
//The switchable layers on the page should be given ids of consecutive integers staring with zero.
if (document.getElementById(now).className=="off"){
	
	for (i=0; i<total; i++) {
		if (i!=now){
			Effect.BlindUp(i.toString(), {duration: 0.5});
			Effect.Fade(i.toString(), {duration: 0.6});
			window.setTimeout ('document.getElementById("'+i+'").className="off"', 500 );
			document.getElementById(i+"_button").className="off";
		}
	}
	Effect.BlindDown(now, {duration: 0.5});
	Effect.Appear(now, {duration: 0.7});
	document.getElementById(now).className="on";
	document.getElementById(now+"_button").className="on";
}
}


function MM_popupMsg(msg) { //v1.0
  alert(msg);
}



