// scripts by ian cavalier
   // http://www.oxygenesis.com/
   // feel free to use/modify the following scripts any way you like as
   // long as these four comment lines remain with the source code.  thanks.


// PRELOAD HIDDEN IMAGES TO CACHE
   // define imgSwap function
   function imgSwap(imgObjectName, imgObjectState) {

   // test browser compatibility
   if (navigator.appName== "Netscape" && parseInt(navigator.appVersion) >= 3) {
     imgObject = new Object();
     imgObject = imgObjectName;
     imgObject.src = imgObjectState;
     }
   }

   // define imgPreLoad function
   function imgPreLoad(i, img) {

   // test browser compatibility
   if (navigator.appName== "Netscape" && parseInt(navigator.appVersion) >= 3) {
     cacheImg[i] = new Image();
     cacheImg[i].src = img;
     }
   }

   // name images
   subphoto1 = "images/subphoto1.jpg";
   subphoto2 = "images/subphoto3.jpg";
   subphoto3 = "images/subphoto3.jpg";
   subphoto4 = "images/subphoto4.jpg";
   subphoto5 = "images/subphoto5.jpg";
   subphoto6 = "images/subphoto6.jpg";

   // load images
   cacheImg = new Array();
   imgPreLoad(1,subphoto1);
   imgPreLoad(2,subphoto2);
   imgPreLoad(3,subphoto3);
   imgPreLoad(4,subphoto4);
   imgPreLoad(5,subphoto5);
   imgPreLoad(6,subphoto6);


// RANDOMIZE PHOTO
   var x = 0, y = 0, z = 0;
   var image = "none";

   function subPhoto() {
      x = Math.random();
      y = x * 6;
      z = Math.round(y);

      if (z == 1)
         image="images/subphoto1.jpg";
        else if (z == 2)
         image="images/subphoto2.jpg";
      else if (z == 3)
         image="images/subphoto3.jpg";
      else if (z == 4)
         image="images/subphoto4.jpg";
      else if (z == 5)
         image="images/subphoto5.jpg";
      else
         image="images/subphoto6.jpg";
   }

