/* Top Menu Functions */
/* Copied Shamelessly from eng-software.com/scripts/esiscript.js */

// This function is required for IE (no support of li:hover).
// Displays submenu when parent menu is highlighted.
startList = function() {
	if (document.all&&document.getElementById) {
		var navRoot = document.getElementById("nav");
		if( navRoot ) {
			var nodeList = navRoot.getElementsByTagName( "LI" ) ;
			if( nodeList ) {
				for (i = 0; i < nodeList.length; i++) {
					node = nodeList.item( i ) ;
					if ( node.nodeName == "LI" ) {
						node.onmouseover = function() { this.className+=" over"; }
						node.onmouseout = function() { this.className=this.className.replace(" over", ""); }
					}
				}
			}
		}
	}
}

/* attach function to onload event for the page */
if( window && window.attachEvent ) {
	window.attachEvent("onload", startList);
}

function changeBGColor (isItOn, obj) {
	if (isItOn)
		obj.bgColor="#E7E7E7";
	else
		obj.bgColor="#ffffff";
}

//	NewWindow opens a 'popup' window with the following properties
//
//		mypage = value of "href=..."
//		myname = window name, leave as default value unless opening multiple windows
//		w = new window width - numeric
//		h = new window height - numeric
//		scrollbars...resizable = yes or no - disables window properties

function NewWindow(mypage, myname, w, h, scrollbars, toolbar, location, status, menubar, resizable)
{
	var winl = (screen.width - w) / 0;
	var wint = (screen.height - h) / 0;

	winprops =	'height='+h+
				',width='+w+
				',top='+wint+
				',left='+winl+
				',scrollbars='+scroll+
				',toolbar='+toolbar+
				',location='+location+
				',status='+status+
				',menubar='+menubar+
				',resizable='+resizable

	win = window.open(mypage, myname, winprops)

	if (parseInt(navigator.appVersion) >= 4)
	{
		win.focus();
	}
}

