// JavaScript Document
if (document.images) {
	HelpOn=new Image (120, 12);
	HelpOn.src="http://infohost.nmt.edu/~eodi/new/images/links-help-on.gif";
	
	HelpOff=new Image (120, 12);
	HelpOff.src="http://infohost.nmt.edu/~eodi/new/images/links-help-off.gif";
	
	QuickLinksOn=new Image (120, 10);
	QuickLinksOn.src="http://infohost.nmt.edu/~eodi/new/images/links-quick-on.gif";
	QuickLinksOff=new Image (120, 10);
	QuickLinksOff.src="http://infohost.nmt.edu/~eodi/new/images/links-quick-off.gif";
	
	InstructionOn=new Image (120, 12);
	InstructionOn.src="http://infohost.nmt.edu/~eodi/new/images/links-instruction-on.gif";
	InstructionOff=new Image (120, 12);
	InstructionOff.src="http://infohost.nmt.edu/~eodi/new/images/links-instruction-off.gif";
	
	GettingStartedOn=new Image (120, 12);
	GettingStartedOn.src="http://infohost.nmt.edu/~eodi/new/images/links-gettingstarted-on.gif";
	
	GettingStartedOff=new Image (120, 12);
	GettingStartedOff.src="http://infohost.nmt.edu/~eodi/new/images/links-gettingstarted-off.gif";
	
	ContactOn=new Image (120, 12);
	ContactOn.src="http://infohost.nmt.edu/~eodi/new/images/links-contactus-on.gif";
	
	ContactOff=new Image (120, 12);
	ContactOff.src="http://infohost.nmt.edu/~eodi/new/images/links-contactus-off.gif";
	
	admissionsOff=new Image(120, 12);
	admissionsOff.src="http://infohost.nmt.edu/~eodi/new/images/gs-admissions-off.gif";
	
	admissionsOn=new Image(120, 12);
	admissionsOn.src="http://infohost.nmt.edu/~eodi/new/images/gs-admissions-on.gif";
	
	registrationOn=new Image(120, 12);
	registrationOn.src="http://infohost.nmt.edu/~eodi/new/images/gs-registration-on.gif";
	
	registrationOff=new Image(120, 12);
	registrationOff.src="http://infohost.nmt.edu/~eodi/new/images/gs-registration-off.gif";
	
	paymentOn=new Image(120, 12);
	paymentOn.src="http://infohost.nmt.edu/~eodi/new/images/gs-payment-on.gif";
		
	paymentOff=new Image(120, 12);
	paymentOff.src="http://infohost.nmt.edu/~eodi/new/images/gs-payment-off.gif";
	
	requiredOn=new Image(120, 12);
	requiredOn.src="http://infohost.nmt.edu/~eodi/new/images/gs-required-on.gif";
		
	requiredOff=new Image(120, 12);
	requiredOff.src="http://infohost.nmt.edu/~eodi/new/images/gs-required-off.gif";
	
	helpOff=new Image(120, 12);
	helpOff.src="http://infohost.nmt.edu/~eodi/new/images/gs-help-off.gif";
	
	helpOn=new Image(120, 12);
	helpOn.src="http://infohost.nmt.edu/~eodi/new/images/gs-help-on.gif";
	}
	
	// function to turn on rolled over graphic
function on(pic) 
{
	if (document.images) 
	{
     	document.images[pic].src=eval(pic + "On.src");
    }
 }

// function to turn off rolled over graphic
function off(pic) 
{
	if(document.images) 
	{
		document.images[pic].src= eval(pic + "Off.src");
    }
}
 
  

//Check what version the browser is, and put it into variables that can be used 
var platform = navigator.platform.substr(0,3);
var browser = navigator.appName;
var version = navigator.appVersion.substr(0,1);

//over: let us know if the user is currently over a navigation image or menu
var over = 'no'; 

//holds the name of the menu that was displayed by our script
var lastMenu = ' ';

//styleSheetElement, and oldElement are used to gather the name of the menu if the user is browsing
//with IE5 or Netscape 6x
var styleSheetElement;
var oldElement;

//function: menuOn
//The menu rollover function
function menuOn(currentMenu) 
{
     over = 'yes';
     if ((browser == 'Netscape') && (version < 5)) 
	 {
          if (lastMenu != ' ')  
		  {
				document.images[lastMenu].src = eval(lastMenu + 'Off.src');
               	eval('document.' + lastMenu + 'Menu.visibility = "hidden"');
          }
          		document.images[currentMenu].src = eval(currentMenu + 'On.src');
          		eval('document.' + currentMenu + 'Menu.visibility = "visible"');
				lastMenu = currentMenu;
     }
     else 
	 {
          if (lastMenu != ' ') 
		  {
               	eval('document.images[lastMenu].src = ' + lastMenu + 'Off.src');
				lastMenu = lastMenu + 'Menu';
               	oldElement = document.getElementById(lastMenu);
               	oldElement.style.visibility = "hidden";
          }
          eval('document.images[currentMenu].src = ' + currentMenu + 'On.src');
          var layerName = currentMenu + 'Menu';
          styleSheetElement = document.getElementById(layerName);
          styleSheetElement.style.visibility = "visible";
          lastMenu = currentMenu;
     }
}

//function:overChecker
//Is the user over it?
//if not, turn the menu off after a period of time
function overChecker(currentMenu) 
{
     over = 'no';
     lastMenu = currentMenu;
     setTimeout("menuOff()", 300);
}

//function:menuOff
//If the user is not over a menu, shut it off (make its visibility hidden
function menuOff() {
     if (over == 'no')  {
          if ((browser == 'Netscape') && (version < 5)) {
               document.images[lastMenu].src = eval(lastMenu + 'Off.src');
               eval('document.' + lastMenu + 'Menu.visibility = "hidden"');
          }
          else {
               eval('document.images[lastMenu].src = ' + lastMenu + 'Off.src');
               styleSheetElement.style.visibility = "hidden";
          }
     }
}


