document.write('<style type="text/css">');
document.write('#subnav1, #subnav2, #subnav3, #subnav4, #subnav5, #subnav6 { 	display: none; }');
document.write('</style>');


function getCookie(name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg) {
      var endstr = document.cookie.indexOf(";", j);
      if (endstr == -1) endstr = document.cookie.length;
      return unescape(document.cookie.substring(j, endstr));
    }
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return "";
}

function checkmenu(theLayer) {
  if (getCookie(theLayer) != "undefined" && getCookie(theLayer) != "") {
	//alert('Cookie exists: ' + theLayer + ",Show menu: " + theLayer);
   	//document.getElementById(theLayer).style.display = 'block';
	 if (document.layers) {
	   document.layers[theLayer].display = 'block';
	 } else if (document.all) {
	   document.all[theLayer].style.display = 'block';
	 } else if (document.getElementById) {
	   document.getElementById(theLayer).style.display = 'block';
	 }
  }
}

function XMwriteCookie(n,i,t){
	var ep="";if (t){d = new Date();d.setTime(d.getTime()+(t*86400000));
	ep = "; expires="+d.toGMTString();}document.cookie = n+"="+i+ep+"; path=/";
}

function XMkillCookie(n){
	//alert('Kill cookie: ' + n);
	XMwriteCookie(n,"",-1);
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function ToggleLayer(theLayer) {
 var time = new Date(Date.parse(Date()) + 86400000*30);
 if (document.layers) {
  if (document.layers[theLayer].display == 'block') {
   document.layers[theLayer].display = 'none';
   //document.cookie = "MRShowMenu=Show; expires=Thu,01-Jan-70 00:00:01 UTC";
   XMkillCookie(theLayer);
  } else {
   document.layers[theLayer].display = 'block';
   document.cookie = theLayer + "=Show; expires=" + time.toUTCString();
   //alert('Write cookie');
  }
 } else if (document.all) {
  if (document.all[theLayer].style.display == 'block') {
   document.all[theLayer].style.display = 'none';
   //document.cookie = "MRShowMenu=Show; expires=Thu,01-Jan-70 00:00:01 UTC";
   XMkillCookie(theLayer);
   //alert('Kill cookie');
  } else {
   document.all[theLayer].style.display = 'block';
   document.cookie = theLayer + "=Show; expires=" + time.toUTCString();
   //alert('Write cookie');
  }
 } else if (document.getElementById) {
  if (document.getElementById(theLayer).style.display == 'block') {
   document.getElementById(theLayer).style.display = 'none';
   //document.cookie = "MRShowMenu=Show; expires=Thu,01-Jan-70 00:00:01 UTC";
   XMkillCookie(theLayer);
   //alert('Kill cookie');
  } else {
   document.getElementById(theLayer).style.display = 'block';
   document.cookie = theLayer +"=Show; expires=" + time.toUTCString();
   //alert('Write cookie');
  }
 }
}