var pm="y";
var pt="sw";
if (document.getElementById){
	document.write('<style type="text/css">\n');
	document.write('.submenu{display: none;}\n');
	document.write('</style>\n');
}
function SwitchMenu(o){
	if(document.getElementById){
		var e=document.getElementById(o);
		var a=document.getElementById("masterdiv").getElementsByTagName("span");
		if(e.style.display!="block"){
			for (var i=0;i<a.length;i++){
				if (a[i].className=="submenu") a[i].style.display="none";
			}
			e.style.display="block";
		}
		else e.style.display="none";
	}
}
function gc(N){ 
	var s=N+"=";
	var r="";
	if (document.cookie.length>0){
		o=document.cookie.indexOf(s);
		if (o!=-1){ 
			o+=s.length;
			e=document.cookie.indexOf(";",o);
			if (e==-1) e=document.cookie.length;
			r=unescape(document.cookie.substring(o,e));
		}
	}
	return r;
}
function olf(){
	if (pm=="y"){
		var cn=(pt=="sw")?"switchmenu":window.location.pathname;
		var cv=gc(cn);
		if (cv!="") document.getElementById(cv).style.display="block";
	}
}
function sms(){
	var i=1,b="";
	while (document.getElementById("sub"+i)){
		if (document.getElementById("sub"+i).style.display=="block"){
			b="sub"+i;
			break;
		}
		i++;
	}
	var cn=(pt=="sw")?"switchmenu":window.location.pathname;
	var cv=(pt=="sw")?b+";path=/":b;
	document.cookie=cn+"="+cv;
}
if (window.addEventListener) window.addEventListener("load",olf,false);
else if (window.attachEvent) window.attachEvent("onload",olf);
else if (document.getElementById) window.onload=olf;
if (pm=="y"&&document.getElementById) window.onunload=sms;