// script to allow hover images on mouseover

// code to test to determine the browser type

   var ok_browser = 1; 
   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 = 0; 
      }
   else 
      {
      ok_browser = 1; 
      }

// code to declare image substitutions

   if ( ok_browser == 0 ) 
      { 
      home_on = new Image(); 
      home_on.src = "http://www.geoffcoy.com.au/images/home_on.gif";
      home_off = new Image(); 
      home_off.src = "http://www.geoffcoy.com.au/images/home_off.gif";

      contact_on = new Image(); 
      contact_on.src = "http://www.geoffcoy.com.au/images/contact_on.gif";
      contact_off = new Image(); 
      contact_off.src = "http://www.geoffcoy.com.au/images/contact_off.gif";

      news_on = new Image(); 
      news_on.src = "http://www.geoffcoy.com.au/images/news_on.gif";
      news_off = new Image(); 
      news_off.src = "http://www.geoffcoy.com.au/images/news_off.gif";

      services_on = new Image(); 
      services_on.src = "http://www.geoffcoy.com.au/images/services_on.gif";
      services_off = new Image(); 
      services_off.src = "http://www.geoffcoy.com.au/images/services_off.gif";
 
      useful_forms_on = new Image(); 
      useful_forms_on.src = "http://www.geoffcoy.com.au/images/useful_forms_on.gif";
      useful_forms_off = new Image(); 
      useful_forms_off.src = "http://www.geoffcoy.com.au/images/useful_forms_off.gif";

      rates_on = new Image(); 
      rates_on.src = "http://www.geoffcoy.com.au/images/rates_on.gif";
      rates_off = new Image(); 
      rates_off.src = "http://www.geoffcoy.com.au/images/rates_off.gif";

      about_on = new Image(); 
      about_on.src = "http://www.geoffcoy.com.au/images/about_on.gif";
      about_off = new Image(); 
      about_off.src = "http://www.geoffcoy.com.au/images/about_off.gif";

      links_on = new Image(); 
      links_on.src = "http://www.geoffcoy.com.au/images/links_on.gif";
      links_off = new Image(); 
      links_off.src = "http://www.geoffcoy.com.au/images/links_off.gif";
      }
	         
// functions to replace images

function imageOn(myname) 
   { 
   if ( ok_browser == 0 ) 
      { 
      imgOn = eval(myname + "_on.src"); 
      document[myname].src = imgOn; 
      } 
} 

function imageOff(myname) 
   { 
   if ( ok_browser == 0 ) 
      { 
      imgOff = eval(myname + "_off.src"); 
      document[myname].src = imgOff; 
      } 
   }  
  
// end script
