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;
}
// Example:
// writeCookie("myCookie", "my name", 24);
// Stores the string "my name" in the cookie "myCookie" which expires after 24 hours.


var _lastGoto = "";

function goto(str) {
	if (_lastGoto != "")
	{
		obj = MM_findObj(_lastGoto);
		obj2 = MM_findObj("nav_"+_lastGoto);
		if (obj != null) {
			obj.style.display = "none";	
		}
		if (obj2 != null) {
			obj2.style.display = "none";	
		}
	}
		obj = MM_findObj(str);
		obj2 = MM_findObj("nav_"+str);
		if (obj != null) {
			obj.style.display = "block";
			_lastGoto = str;

		if (obj != null) {
			obj2.style.display = "block";
		}
	}
	
}
function writeCookie(name, value, hours)
{
  var expire = "";
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire+"; path=/"; 
}
function readCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

function deleteCookie(name) {
if ( readCookie( name ) ) document.cookie = name + "=" +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
