/**********************************************************************
 *  detectBrowser.js is used to include all the needed JavaScript	  *
 *  files on the page that is using pop up menus.		              *
 *  This file is the only .js file that needs to be referenced        *
 *  by the html pages within the site.			                      *
 **********************************************************************/

HM_DOM = (document.getElementById) ? true : false;
HM_NS4 = (document.layers) ? true : false;
HM_IE = (document.all) ? true : false;
HM_IE4 = HM_IE && !HM_DOM;
HM_Mac = (navigator.appVersion.indexOf("Mac") != -1);
HM_IE4M = HM_IE4 && HM_Mac;
HM_IsMenu = (HM_DOM || HM_NS4 || (HM_IE4 && !HM_IE4M));

HM_BrowserString = HM_NS4 ? "NS4" : HM_DOM ? "DOM" : "IE4";

if(HM_IsMenu)
{
	var filePath = "";
	urlStr = "" + window.location;
	if (urlStr.indexOf( URLPath ) != -1)
	{	
		filePath = URLPath;
	}
	
	document.write("<link rel='stylesheet' type='text/css' href='" + filePath + PortalURL + "styles/" + HM_BrowserString + ".css'>");
	//alert("<link rel='stylesheet' type='text/css' href='" + filePath + PortalURL + "styles/" + HM_BrowserString + ".css'>");
	//document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='" + filePath + "js/hierVars.js' TYPE='text/javascript'><\/SCRIPT>");
}

var isMac	= (navigator.userAgent.indexOf("Mac")  > -1);
vertical = HM_NS4 ? 98 : HM_DOM ? 90 : 90;	// this for the drop down menu vertical position

No3 = (parseInt(navigator.appVersion) > 3) ? 1:0;
layer = (document.all && No3) ? "document.all['L'+menu].style" : (document.layers && No3) ? "document.layers['L'+menu]" : 0;
var timer;

function Show() { if(layer) {
	if(timer) clearTimeout(timer);
	for(menu=0; menu<Layer.length; menu++) { if(Layer[menu]) { eval(layer).visibility = "hidden"; } }
	for(i=0; i<arguments.length; i++) { menu=arguments[i]; eval(layer).visibility = "visible"; }
} }
function Hide() { timer = setTimeout("Show()", 500); }

function openWindow( windowURL, windowName, windowFeatures ) { 
	return window.open( windowURL, windowName, windowFeatures ) ; 
}