
// browser check
IS_DOM = (document.getElementById) ? true : false;
IS_NS4 = (document.layers) ? true : false;
IS_IE = (document.all) ? true : false;
IS_IE4 = IS_IE && !IS_DOM;
IS_Mac = (navigator.appVersion.indexOf("Mac") != -1);
IS_IE50PC = (IS_DOM && IS_IE && !IS_Mac && navigator.userAgent.indexOf("MSIE 5.0")!=-1)

// handle IE5.0 style issues
if (IS_IE50PC) {

	document.write("<style type=\"text/css\">");
	document.write("a.learnMore {background: none;}");
	document.write("</style>");

}

function noClick(sNull) {}

function preloadGenericMouseovers() {

	homeIconOn = new Image();
	homeIconOff = new Image();
	homeIconOn.src = sWebRoot + "/images/icons/icon_home_r.gif";
	homeIconOff.src = sWebRoot + "/images/icons/icon_home_0.gif";

	loginIconOn =	new Image();
	loginIconOff =	new Image();
	loginIconOn.src = sWebRoot + "/images/misc/search_spacer_r.gif";
	loginIconOff.src = sWebRoot + "/images/misc/search_spacer_0.gif";

}

function preloadFocusMouseovers() {

	var aIcons = new Array("moreinfo_request","moreinfo_acrobat","moreinfo_crosslink","moreinfo_documents","moreinfo_info","moreinfo_popup","moreinfo_special1","moreinfo_special2","moreinfo_external");

	for (i=0;i<aIcons.length;i++) {
		eval(aIcons[i]+"_On = new Image();");
		eval(aIcons[i]+"_"+"Off = new Image();");
		eval(aIcons[i]+"_"+"On.src = \"" + sWebRoot + "/images/icons/"+"icon_"+aIcons[i]+"_r.gif\";");
		eval(aIcons[i]+"_"+"Off.src = \"" + sWebRoot + "/images/icons/"+"icon_"+aIcons[i]+"_0.gif\";");
	}

}

function changeImages() {

	if (document.images && !document.layers) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
		}
	}

}

function writeHomepageFlash(sFlashMovieURL, sNoFlashImageURL) {

	var oeTags = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"271\" height=\"153\" id=\"mro007_hp_r1-a2\"><param name=\"movie\" value=\"" + sFlashMovieURL + "\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#74736E\"><embed src=\"" + sFlashMovieURL + "\" width=\"271\" height=\"153\" autostart=\"false\" quality=\"high\" bgcolor=\"#74736E\" name=\"mro007_hp_r1-a2\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed></object>";

	var alternateContent = "<img src=\"" + sNoFlashImageURL + "\" width=\"271\" height=\"153\" border=\"0\" alt=\"Flash Animation\" title=\"Flash Animation\" />";

	if (!useRedirect) { 
		if(hasRightVersion) { 
			document.write(oeTags);
		} else { 
			document.write(alternateContent);
		}
	}

}

function showGlobalSitesMenu() {

	var theDiv = document.getElementById('globalsBox');
	var theMenu = document.getElementById('globalsBoxMenu');
	var theHeader = document.getElementById('globalsBoxHeader');

	// turn off the menu
	if (theMenu.style.display == "block") {
		theMenu.style.display = "none";
		theDiv.style.backgroundColor = "#74736E";
		theHeader.style.borderBottom = "1px solid #63625E";
		theHeader.style.backgroundImage = "none";
	}

	// turn on the menu
	else {
		theMenu.style.display = "block";
		theDiv.style.backgroundColor = "#4A4A4A";
		theHeader.style.borderBottom = "0px";
		theHeader.style.background = "url(" + sWebRoot + "/images/misc/global_arrow-down_r.gif) left center no-repeat";
	}

}

function showWebinar(iID) {

	for (i=1;i<=4;i++) {
	document.getElementById('event' + i).style.display = "none";
	}

	document.getElementById('event' + iID).style.display = "block";

	for (i=1;i<=4;i++) {
	document.getElementById('eventLink' + i).style.color = "#BEBEBE";
	}

	document.getElementById('eventLink' + iID).style.color = "#EBBC6F";

}

function showHighlight(iID) {

	for (i=1;i<=4;i++) {
	document.getElementById('highlight' + i).style.display = "none";
	}

	document.getElementById('highlight' + iID).style.display = "block";


	for (i=1;i<=4;i++) {
	document.getElementById('highlightLink' + i).style.color = "#BEBEBE";
	}

	document.getElementById('highlightLink' + iID).style.color = "#EBBC6F";

}

function openCustomerQuotes() {

	var oWindow = window.open(sWebRoot + '/assetmanagement/maximo-enterprise-it/what-customers-are-saying.php','oWindow','width=650,height=500,scrollbars=yes,resizable=yes');
	oWindow.focus();

}

function openAccessibilityStatement(sURL) {

	var oWindow = window.open(sURL,'oWindow','width=650,height=500,scrollbars=yes,resizable=yes');
	oWindow.focus();

}

function openWBTDemo() {

	var oWindow = window.open('http://edservices.mro.com/demo_wbt/demo_wbt.asp','oWindow','width=520,height=500,scrollbars=yes,resizable=yes');
	oWindow.focus();

}

function displayWindow(url, width, height) {

	var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=no,menubar=no');
	Win.focus();

}

function openGenericWindow(sURL,iWidth,iHeight,sAttributes) {

	var oWindow = window.open(sURL,'oWindow','width='+iWidth+',height='+iHeight+','+sAttributes);
	oWindow.focus();	

}
