// Copyright 2001 jordan lewinski
// In order to use this code you must keep this disclaimer

if (self.location != top.location) {
		    top.location = self.location;
			}

	
	function WinOpen(PageToLoad,Names,w,h)	{
		window.open(PageToLoad,Names,'width=' + w + ',height=' + h + ',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no');
		}

var openInNewWin = getCookie("newWin");
function newWin_onclick(){
  var p = document.preferences.newWin.checked;
  if (p) {p=1} else {p=0};
  setCookie("newWin",p);
  openInNewWin = p;
}

function setCookie(name, value) {
  var expires = new Date();
  var today = new Date();
  expires.setTime(today.getTime() + 1000*60*60*24*365);
  document.cookie = name + "=" + escape(value)
  + ((expires == null) ? "" : ("; expires=" + expires.toGMTString()))
}

function getCookie(Name) {
  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};
      return unescape(document.cookie.substring(offset, end));
    } 
  }
}
function openLink(link) {
  if (openInNewWin==1) {
	window.open(link,'_blank','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
  }
  else {
    window.location.href=link;
  }
}


// Show/Hide functions for non-pointer layer/objects


function openMe(element){
			if (current==element){}
			if (current==1){
				eval(element).show();
				current = element;
				}
			else {
				eval(current).hide();
				eval(element).show();
				current = element;
				}
		}