// 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 ) 
   {
   
   home_on                     = new Image(); 
   home_on.src                 = "http://www.trotman.com.au/images/btn_home_r.gif";
   home_off                    = new Image(); 
   home_off.src                = "http://www.trotman.com.au/images/btn_home.gif";
      
   productdesc_on                     = new Image(); 
   productdesc_on.src                 = "http://www.trotman.com.au/images/btn_productdesc_r.gif";
   productdesc_off                    = new Image(); 
   productdesc_off.src                = "http://www.trotman.com.au/images/btn_productdesc.gif";

   resulthighlights_on                     = new Image(); 
   resulthighlights_on.src                 = "http://www.trotman.com.au/images/btn_resulthighlights_r.gif";
   resulthighlights_off                    = new Image(); 
   resulthighlights_off.src                = "http://www.trotman.com.au/images/btn_resulthighlights.gif";
    
   testimonials_on                     = new Image(); 
   testimonials_on.src                 = "http://www.trotman.com.au/images/btn_testimonials_r.gif";
   testimonials_off                    = new Image(); 
   testimonials_off.src                = "http://www.trotman.com.au/images/btn_testimonials.gif";
   
   termsconditions_on                     = new Image(); 
   termsconditions_on.src                 = "http://www.trotman.com.au/images/btn_termsconditions_r.gif";
   termsconditions_off                    = new Image(); 
   termsconditions_off.src                = "http://www.trotman.com.au/images/btn_termsconditions.gif";
   
   feedback_on                     = new Image(); 
   feedback_on.src                 = "http://www.trotman.com.au/images/btn_feedback_r.gif";
   feedback_off                    = new Image(); 
   feedback_off.src                = "http://www.trotman.com.au/images/btn_feedback.gif";
   
   links_on                     = new Image(); 
   links_on.src                 = "http://www.trotman.com.au/images/btn_links_r.gif";
   links_off                    = new Image(); 
   links_off.src                = "http://www.trotman.com.au/images/btn_links.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