
img1 = new Image ()

img1.src = "http://www.infraspot.com/images/book1.gif"

img2 = new Image ()

img2.src = "http://www.infraspot.com/images/book2.gif"

img3 = new Image ()

img3.src = "http://www.infraspot.com/images/book3.gif"




var sponsor = 1;  // global variable for current sponsor (Don't change this!)

var go = 1;       // tells the banner if to rotate



var max = 3;     // number of banners



var url1 = "http://www.amazon.com/exec/obidos/ASIN/0819437220/infraspot-20";

var url2 = "http://www.amazon.com/exec/obidos/ASIN/0964000059/infraspot-20";

var url3 = "http://www.amazon.com/exec/obidos/ASIN/0819446602/infraspot-20";



var text1 = "Get it from Amazon.com";

var text2 = "Get it from Amazon.com";

var text3 = "Get it from Amazon.com";



// function to link to appropriate sponsor

function GoSponsor('_blank')

   {

   location = eval("url" + sponsor);

   }



// function to rotate image

function rotate()

   {

   if (document.images)   // Only if the image object exists so no errors occur with IE 3.0

     {

     if (go)        // If cursor not on image

       {

       if (++sponsor > max) sponsor = 1;

       document.images['pic'].src = "http://www.infraspot.com/images/book" + sponsor + ".gif";

       window.setTimeout('rotate();',5000);

       }

     else          // If cursor on image, try to rotate later

       {

       window.setTimeout('rotate();',100);

       }

     }

   }



// function to display text in the status bar about the current banner

function windowON()

    {

    window.status = eval('text' + sponsor);

    setTimeout("windowOFF()",2000);

    }



// function to clear the status bar message

function windowOFF()

    {

    window.status="";

    }


