// JavaScript Document

// Popup window
function popup(theURL,winName,features) { 
	window.open(theURL,winName,features);
}

// Popup window in center of screen
function popupCenter(theURL,winName,w,h) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - ((w/2) + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - ((h/2) + 50); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(theURL,winName,"toolbar=no,location=no,status=yes,menubar=no,scrollbars=1,resizable=yes,height="+h+",width="+w+",left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight);
	win2.focus();
}

// Son of suckerfish IE haxor
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
