// Copyright Acro Media Inc. 1998-2003, www.acromediainc.com
graphicsDir = dirDepth+"graphics/nav/";
dirDepth = dirDepth+"";

// Setup global variables and Style settings for VER 4+ browsers
var imageNames;
var imageOver;
preloaded = 0;

NS4 = (document.layers) ? true : false;
IE4 = (document.all && !document.getElementById) ? true : false;
IE5 = (document.all && document.getElementById) ? true : false;
NS6 = (!document.all && document.getElementById) ? true : false;

isDom = (NS6 || IE5) ? true : false;

NS3 = (!NS4 && !IE4 && document.images) ? true : false;
IE3 = (!NS4 && !IE4 && !NS3 && (navigator.userAgent.indexOf("MSIE") != -1)) ? true : false;
NS2 = (!NS4 && !IE4 && !NS3 && !IE3 && !document.images) ? true : false;
isMac = (navigator.appVersion.indexOf("Mac") != -1) ? true : false;

isGo = 0;
doc = (NS4) ? "document" : "document.all";
sty = (NS4) ? "" : ".style";

if(NS4 || isDom || (IE4 && !isMac)){
	defaultStyle = "<STYLE TYPE='text/css'>"
	+ ".obj {"
	+ "position:absolute;"
	+ "visibility:hidden;"
	+ "width:10;"
	+ "height:10;"
	+ "}"
	+ "</STYLE>";

	document.write(defaultStyle);
}

if (document.images) {
	imageNames = new initArray("button1", "button2", "button3", "button4", "button5", "button6", "button7");
	imageOver = new initArray("b_home_02.gif", "b_products_02.gif", "b_corp_info_02.gif", "b_inv_rel_02.gif", "b_careers_02.gif", "b_site_map_02.gif", "b_contact_02.gif");

}

function preloadImages(){
	if(document.images){
		var i, temp;

		for(i=0; i<imageNames.length; i++){
			document.images[imageNames[i]].offsrc = document.images[imageNames[i]].src;
		}

		for(i=0; i<imageNames.length; i++){
			temp = new Image();
			temp.src = graphicsDir + imageOver[i];
			document.images[imageNames[i]].oversrc = temp.src;
		}
		preloaded = true;
	}
}

function initArray(){
      if (document.images) {
      this.length = initArray.arguments.length;
      for (var i=0;i<= this.length; i++)
         this[i] = initArray.arguments[i];
   }
}

function mouseOver(imageID) {
	if (document.images && preloaded) {
		document.images[imageNames[imageID]].src = document.images[imageNames[imageID]].oversrc;
		hideMenu = 0;
		eval("show('menu"+imageID+"')");
	}
}

function mouseOut(imageID) {
	if (document.images && preloaded){
		document.images[imageNames[imageID]].src = document.images[imageNames[imageID]].offsrc;
		eval("hide('menu"+imageID+"')");
	}
}

if(NS4 || IE4) document.write("<SCRIPT LANGUAGE='JavaScript' SRC='"+dirDepth+"menuinfo.js'><\/SCRIPT>");
if(NS4 || IE4 || isDom) document.write("<SCRIPT LANGUAGE='JavaScript' SRC='"+dirDepth+"menuinfo.js'><\/SCRIPT>");
if(NS4){
	document.write("<SCRIPT LANGUAGE='JavaScript' SRC='"+dirDepth+"ns_menus.js'><\/SCRIPT>");
}
else if(IE4){
	document.write("<SCRIPT LANGUAGE='JavaScript' SRC='"+dirDepth+"ie_menus.js'><\/SCRIPT>");
}
else if(isDom){
	document.write("<SCRIPT LANGUAGE='JavaScript' SRC='"+dirDepth+"dom_menus.js'><\/SCRIPT>");
}
