//This javascript was copied and edited from the original at www.groan-zone.net by the webmaster of this site.

//This section of the code is used to detect the browser that the client is using. This prevents error messages in old browsers.
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) 
     browserVer = "1";
else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4)
     browserVer = "1";
else if (browserName == "Mozilla Firefox" && browserVer >= 3)
     browserVer = "1";
else browserVer = "2";
//I don't know the exact Ff version that cannot use this code, but few people have anything older than 3.x.

//This section of the code preloads the images that will be used.
//As of now, it does not work in Google Chrome, and probably a few other browsers, but it does work in Ff >=3.x, as well as newer IE versions.
//The "if browserVer" statement saves loading time and bandwidth in older browsers that cannot show the 2nd image anyway.
if (browserVer == 1) 
     {
          a1 = new Image(224,54);
          a1.src = "bookhome.png";
          a2 = new Image(224,54);
          a2.src = "bookhomebg.png";
          b1 = new Image(246,54);
          b1.src = "bookabout.png";
          b2 = new Image(246,54);
          b2.src = "bookaboutbg.png";
          c1 = new Image(222,48);
          c1.src = "booknew.png";
          c2 = new Image(222,48);
          c2.src = "booknewbg.png";
          d1 = new Image(222,75);
          d1.src = "bookold.png";
          d2 = new Image(222,75);
          d2.src = "bookoldbg.png";
          ef1 = new Image(288,66);
          ef1.src = "bookdonatfriend.png";
          ef2 = new Image(288,66);
          ef2.src = "bookdonatfriendbg.png";
          g1 = new Image(270,60);
          g1.src = "bookvolntr.png";
          g2 = new Image(270,60);
          g2.src = "bookvolntrbg.png";
	  h1=new Image(222,48);
	  h1.src="bookpic.png";
	  h2=new Image(222,48);
	  h2.src="bookpicbg.png";
          i1 = new Image(282,54);
          i1.src = "bookbuy.png";
          i2 = new Image(282,54);
          i2.src = "bookbuybg.png";
          j1 = new Image(258,54);
          j1.src = "bookthanks.png";
          j2 = new Image(258,54);
          j2.src = "bookthanksbg.png";
          k1 = new Image(240,60);
          k1.src = "booklink.png";
          k2 = new Image(240,60);
          k2.src = "booklinkbg.png";
          l1 = new Image(252,66);
          l1.src = "booklog.png";
          l2 = new Image(252,66);
          l2.src = "booklogbg.png";
     }

//This section of the code swaps the images on the webpage if the browser is new enough to support this code. If not, the images are static.
function swap(imgDocID, imgObjName, comment) 
     {
          if (browserVer == 1) 
               {
                    document.images[imgDocID].src = eval(imgObjName + ".src");
                    window.status = comment; return true;
               }
     }
//The Groan Zone people say, "Everything in this site is free for you to download and use (except these main graphics and code) 
//but you must not sell anything or distribute anything from any other site."
//I don't know what that really means, but I don't think they'd have a tutorial if people weren't allowed to use this code.
//You can find the original tutorial here --> http:  groan-zone.net jscript mouseover.html
