  // global variables
  var numphotos = 6;				// number of photos, up to 100
  var pics = new Array(numphotos);		// array to hold pictures
  var rframe = 1;				// current frame, start at second one
  var timerID = 0;  				// name of timer
  var numsec = 3;				// number of seconds in delay

  // initialize pics array with image urls
  for(i = 0; i < numphotos; i++)
  {
    pics[i] = new Image();			// create new image
    pics[i].src = "images/slide" + i + ".jpg";	// set file names and browser loads
  }

    //  This function displays the slides on the screen with delay given above
    function photoAnimation()
   {
       document.slideshow.src = pics[rframe].src;
       rframe++;				// increment frame counter
       if(rframe > numphotos - 1)  rframe = 0;		// return frame counter to frame 1
       timerID = setTimeout ("photoAnimation()",numsec * 1000);
   }