// Free for all users, but leave in this header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// Modified by Nick Challoner (www.challoner.com) to
// show a random image rather than show the images
// in array element order.

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3500

// Duration of crossfade (seconds)
var crossFadeDuration = 1.2

// Specify the image files
var Pic = new Array() // don't touch this
var Caption = new Array(); // don't change this


// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'props/24.jpg'
Pic[1] = 'props/20.jpg'
Pic[2] = 'props/21.jpg'
Pic[3] = 'props/22.jpg'
Pic[4] = 'props/23.jpg'
Pic[5] = 'props/25.jpg'


// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

Caption[0] = "";
Caption[1] = "";
Caption[2] = "";
Caption[3] = "";
Caption[4] = "";
Caption[5] = "";

// =======================================
// do not edit anything below this line
// =======================================

var t
var p = Pic.length
var j = Math.floor(Math.random() * p);
var new_j = 0;

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=5)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[j];
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }

   while (new_j == j) { new_j = Math.floor(Math.random() * p) }
   j = new_j;

   t = setTimeout('runSlideShow()', slideShowSpeed)
}