// script to allow hover images on mouseover

// code to test to determine the browser type

var ok_browser = 0; 
bName = navigator.appName;             
bVer  = parseInt(navigator.appVersion); 
 
ver = "n2" 

if (bName == "Netscape" && bVer >= 3) 
   {
   ver = "n3";
   }
else 
   {
   if (bName == "Microsoft Internet Explorer" && bVer >= 4) 
      {
      ver = "e4"; 
      }
   }

if (ver == "n3" || ver == "e4")
   {  
   ok_browser = 1; 
   }
else 
   {
   ok_browser = 0;
   }

// code to declare image substitutions

if ( ok_browser == 1 ) 
   { 
   coursestructure_on      = new Image(); 
   coursestructure_on.src  = "images/menu/coursestructurerollover.gif";
   coursestructure_off     = new Image(); 
   coursestructure_off.src = "images/menu/coursestructure.gif";

   aboutinstructors_on      = new Image(); 
   aboutinstructors_on.src  = "images/menu/aboutinstructorsrollover.gif";
   aboutinstructors_off     = new Image(); 
   aboutinstructors_off.src = "images/menu/aboutinstructors.gif";

   contact_on      = new Image(); 
   contact_on.src  = "images/menu/contactrollover.gif";
   contact_off     = new Image(); 
   contact_off.src = "images/menu/contact.gif";
   
   home_on      = new Image(); 
   home_on.src  = "images/menu/homerollover.gif";
   home_off     = new Image(); 
   home_off.src = "images/menu/home.gif";
   } 

// functions to replace images
function imageon(myname) 
   { 
   if ( ok_browser == 1 ) 
      { 
      imgOn = eval(myname + "_on.src"); 
      document[myname].src = imgOn; 
      } 
   } 

function imageoff(myname) 
   { 
   if ( ok_browser == 1 ) 
      { 
      imgOff = eval(myname + "_off.src"); 
      document[myname].src = imgOff; 
      } 
   }  
  
// end script