// default.js
// gene@rockhoppertech.com
// version: April, 2006



function externalLinks() {
 if (!document.getElementsByTagName) 
    return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;



var thePopup;

function popUp(URL) {
   day = new Date();
   id = day.getTime();
   thePopup = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 240,top = 212');
}

function popUp2(URL) {
   day = new Date();
   id = day.getTime();
   eval("page" + id + " = window.open(URL, '" + id + "','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=800,left = 240,top = 212');");
}

function closepopup() {
	if(false == thePopup.closed) {
		thePopup.close();
	} else {
		alert("Alread closed");
	}
}

function popUpWindow(theURL, width, height) {
	var winProps = "width=" + width + ",height=" + height;
	winProps += ",titlebar=0,toolbar=0,location=0,menubar=0,scrollbars=1,resizable=1,channelmode=0,directories=0,status=1";
	thePopup = window.open(theURL,"popUp",winProps,true);
}

function changeStyle(newCss) {
   var x = document.getElementById('styletag');
   x.setAttribute('href', newCss);
}

function toggleDisplay(whichLayer) {
   if (document.getElementById) {
      // web standards
      var style2 = document.getElementById(whichLayer).style;
      style2.display = style2.display? "":"block";
   } else if (document.all) {
      // old msie versions
      var style2 = document.all[whichLayer].style;
      style2.display = style2.display? "":"block";
   } else if (document.layers) {
      // this is the way nn4
      var style2 = document.layers[whichLayer].style;
      style2.display = style2.display? "":"block";
   }
}
function unhide(whichLayer) {
   if (document.getElementById) {
      // web standards
      var style2 = document.getElementById(whichLayer).style;
      style2.display = "block";
   } else if (document.all) {
      // old msie versions
      var style2 = document.all[whichLayer].style;
      style2.display = "block";
   } else if (document.layers) {
      // nn4
      var style2 = document.layers[whichLayer].style;
      style2.display = "block";
   }
}
function hide(whichLayer) {
   if (document.getElementById) {
      // web standards
      var style2 = document.getElementById(whichLayer).style;
      style2.display = "";
   } else if (document.all) {
      // old msie versions
      var style2 = document.all[whichLayer].style;
      style2.display = "";
   } else if (document.layers) {
      // nn4
      var style2 = document.layers[whichLayer].style;
      style2.display = "";
   }
}