// 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.yurulbin.com/littleharebooks/images/btn_home_over.gif";
   imghome_off             = new Image(); 
   imghome_off.src         = "http://www.yurulbin.com/littleharebooks/images/btn_home_out.gif";
   
   imgnewreleases_on              = new Image(); 
   imgnewreleases_on.src          = "http://www.yurulbin.com/littleharebooks/images/btn_newreleases_over.gif";
   imgnewreleases_off             = new Image(); 
   imgnewreleases_off.src         = "http://www.yurulbin.com/littleharebooks/images/btn_newreleases_out.gif";
    
   imgcatalogue_on             = new Image(); 
   imgcatalogue_on.src         = "http://www.yurulbin.com/littleharebooks/images/btn_catalogue_over.gif";
   imgcatalogue_off            = new Image(); 
   imgcatalogue_off.src        = "http://www.yurulbin.com/littleharebooks/images/btn_catalogue_out.gif";
   
   imgnews_on               = new Image(); 
   imgnews_on.src           = "http://www.yurulbin.com/littleharebooks/images/btn_news_over.gif";
   imgnews_off              = new Image(); 
   imgnews_off.src          = "http://www.yurulbin.com/littleharebooks/images/btn_news_out.gif"; 

   imgschoolresources_on                = new Image(); 
   imgschoolresources_on.src            = "http://www.yurulbin.com/littleharebooks/images/btn_schoolresources_over.gif";
   imgschoolresources_off               = new Image(); 
   imgschoolresources_off.src           = "http://www.yurulbin.com/littleharebooks/images/btn_schoolresources_out.gif";
   
   imginfobooksellers_on                = new Image(); 
   imginfobooksellers_on.src            = "http://www.yurulbin.com/littleharebooks/images/btn_infobooksellers_over.gif";
   imginfobooksellers_off               = new Image(); 
   imginfobooksellers_off.src           = "http://www.yurulbin.com/littleharebooks/images/btn_infobooksellers_out.gif";
   
   imgmedia_on                = new Image();
   imgmedia_on.src            = "http://www.yurulbin.com/littleharebooks/images/btn_media_over.gif";
   imgmedia_off               = new Image(); 
   imgmedia_off.src           = "http://www.yurulbin.com/littleharebooks/images/btn_media_out.gif";
   
   imgforeignrights_on                = new Image();
   imgforeignrights_on.src            = "http://www.yurulbin.com/littleharebooks/images/btn_foreignrights_over.gif";
   imgforeignrights_off               = new Image();
   imgforeignrights_off.src           = "http://www.yurulbin.com/littleharebooks/images/btn_foreignrights_out.gif";
   
   imginformation_on                = new Image(); 
   imginformation_on.src            = "http://www.yurulbin.com/littleharebooks/images/btn_information_over.gif";
   imginformation_off               = new Image(); 
   imginformation_off.src           = "http://www.yurulbin.com/littleharebooks/images/btn_information_out.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