// 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 ) 
   {
   imghome_on              = new Image(); 
   imghome_on.src          = "http://www.ssa.org.au/images/btn_home_over_img.gif";
   imghome_off             = new Image(); 
   imghome_off.src         = "http://www.ssa.org.au/images/btn_home_out_img.gif";
   
   imgmembers_on              = new Image(); 
   imgmembers_on.src          = "http://www.ssa.org.au/images/btn_members_over_img.gif";
   imgmembers_off             = new Image(); 
   imgmembers_off.src         = "http://www.ssa.org.au/images/btn_members_out_img.gif";
    
   imgmeeting_on             = new Image(); 
   imgmeeting_on.src         = "http://www.ssa.org.au/images/btn_news_events_over_img.gif";
   imgmeeting_off            = new Image(); 
   imgmeeting_off.src        = "http://www.ssa.org.au/images/btn_news_events_out_img.gif";
   
   imgservices_on               = new Image(); 
   imgservices_on.src           = "http://www.ssa.org.au/images/btn_services_over_img.gif";
   imgservices_off              = new Image(); 
   imgservices_off.src          = "http://www.ssa.org.au/images/btn_services_out_img.gif"; 

   imgoverview_on                = new Image(); 
   imgoverview_on.src            = "http://www.ssa.org.au/images/btn_submissions_over_img.jpg";
   imgoverview_off               = new Image(); 
   imgoverview_off.src           = "http://www.ssa.org.au/images/btn_submissions_out_img.jpg";
   
   imgproducts_on                = new Image(); 
   imgproducts_on.src            = "http://www.ssa.org.au/images/btn_products_over_img.gif";
   imgproducts_off               = new Image(); 
   imgproducts_off.src           = "http://www.ssa.org.au/images/btn_products_out_img.gif";
   
   imgmagazine_on                = new Image();
   imgmagazine_on.src            = "http://www.ssa.org.au/images/btn_magazine_over_img.gif";
   imgmagazine_off               = new Image(); 
   imgmagazine_off.src           = "http://www.ssa.org.au/images/btn_magazine_out_img.gif";
   
   imgbusiness_on                = new Image();
   imgbusiness_on.src            = "http://www.ssa.org.au/images/btn_business_over_img.gif";
   imgbusiness_off               = new Image();
   imgbusiness_off.src           = "http://www.ssa.org.au/images/btn_business_out_img.gif";
   
   imgcontactus_on                = new Image(); 
   imgcontactus_on.src            = "http://www.ssa.org.au/images/btn_contactus_over_img.gif";
   imgcontactus_off               = new Image(); 
   imgcontactus_off.src           = "http://www.ssa.org.au/images/btn_contactus_out_img.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
