// LoadProduce.js

/* Requirements: images must be in the /images/produce directory
                 images must be type JPEG (.jpg)
                 images must be named "Piero"+x+".jpg" (e.g. "Piero1.jpg")
                 HTML <IMG SRC> tag must have a name of "myPicture"
                   

   This JavaScript procedure will be invoked via the "onload" command
     in the <BODY> tag {onload="choosePic()"}.  Set the PixCount variable
     with the number of images in the "/images/produce/" directory.
*/

var PixCount = 17;

function choosePic() 
   {
     if (document.images) 
       { 
         randomNum = Math.floor((Math.random() * 20)) %  PixCount;
         document.images.myPicture.src = "../images/produce/peiro" + randomNum + ".jpg";
       }
   }

     


