/******* VARIABLES *********/

var gstrActiveLayer = ""
var gstrImageName = "";
var gstrImageOff = "";
var is;
/******* Browser detection *********/
function Is (){
    var agt=navigator.userAgent.toLowerCase();
    this.major		= parseInt(navigator.appVersion);
    this.minor		= parseFloat(navigator.appVersion);
    this.nav		= ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    this.nav4		= (this.nav && (this.major == 4));
    this.nav6up		= (this.nav && (this.major >= 5));
    this.ie			= ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    this.ie4		= (this.ie && (this.major == 4) && (agt.indexOf("msie 5")==-1) );
    this.ie4up		= (this.ie && (this.major >= 4));
    this.mac		= (agt.indexOf("mac")!=-1);
}
is = new Is(); 
/******* End Browser detection ******/		


/******* MENU FUNCTIONS *********/	
function ShowMenu(MenuID,iLeft,iTop){
		HideMenu();
		ShowLayer(MenuID,iLeft,iTop);
}
function ShowLayer(MenuID,iLeft,iTop){
	if (is.nav4){
		document.layers[MenuID].left = iLeft;
		document.layers[MenuID].top = iTop;
		document.layers[MenuID].visibility = "show";
	}else if(is.ie4up){
		document.all[MenuID].style.pixelLeft = iLeft;
		document.all[MenuID].style.pixelTop = iTop;
		document.all[MenuID].style.visibility = "visible";
	}else if(is.nav6up){
		document.getElementById(MenuID).style.left = iLeft;
		document.getElementById(MenuID).style.top = iTop;
		document.getElementById(MenuID).style.visibility = "visible";
	}
	gstrActiveLayer = MenuID;
}

function HideLayer(LayerName){
	if (is.nav4){
		document.layers[LayerName].visibility = "hide";
	}else if(is.ie4up){
		document.all[LayerName].style.visibility = "hidden";
	}else if(is.nav6up){
		document.getElementById(LayerName).style.visibility = "hidden";
	}
	gstrActiveLayer = "";
}
function HideMenu(){
	if (gstrActiveLayer != "" || null){
		HideLayer(gstrActiveLayer);
	}	
}
function NavImageSwap(SwapName,SwapImage){
			eval("document." +SwapName+ ".src = '"+SwapImage+"'");
}

function GoTo(strURL){
	window.location = strURL;
}

var myimages=new Array()

function preloadimages(){
	for (i=0;i<preloadimages.arguments.length;i++){
		myimages[i]=new Image()
		myimages[i].src=preloadimages.arguments[i]
	}
}
//preloadimages("/images/nav_worktog_on.gif","/images/nav_rescent_on.gif","/images/nav_epainfo_on.gif","/images/footer_one_on.gif","/images/footer_two_on.gif","/images/footer_three_on.gif","/images/footer_four_on.gif","/images/footer_five_on.gif","/images/footer_six_on.gif","/images/footer_seven_on.gif");

//Hide's the Menus when you click anywhere
document.onmouseup = HideMenu;
/******* /END MENU FUNCTIONS *********/	