/* helper function to load multiple functions, courtesy Simon Wilson */
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function popup(url,w,h,scroll)
{
	var l = (screen.width-w)/2;
	var t = (screen.height-h)/2;

	window.open(url,'_blank','resizable=yes,location=no,menubar=no,scrollbars='+scroll+',status=no,toolbar=no,fullscreen=no,dependent=no,width='+w+',height='+h+',left='+l+',top='+t);
}

//get basepath
var site_base = "";
if(a=document.getElementsByTagName("link")[0])
{
	site_base = a.href.substr(0,a.href.indexOf('/resources'));
}

navHover = function()
{
	if(document.getElementById("nav"))
	{
		var lis = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<lis.length; i++) {
			lis[i].onmouseover=function() {
				this.className+=" iehover";
			}
			lis[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" iehover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) {window.attachEvent("onload", navHover);}