// Slideshow

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;

// Duration of crossfade (seconds)
var crossFadeDuration = 3;

// Specify the image files
var Pic = new Array(); // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

for (i=0; i<3; i++) {
	Pic[i] = (i+1) + '.jpg';
}


// Specify the image descriptions
var Description = new Array(); // don't touch this

Description[0] = 'Capsule - An ideal hire item - perfect for those winter months when you can get your baby ready inside in warmth and comfort.';
Description[1] = 'Car Seats - Short Term - for weekend/short term visitors.  Hire for 3-6 months until your older child is ready for a booster seat.';
Description[2] = 'Booster - For a few days or a few weeks - convenient to hire for holidays.';

//CONTINUE WITH DESCRIPTIONS HERE...UP TO THE 

// =======================================
// do not edit anything below this line
// =======================================

var t;
var j = 0;
var p = Pic.length;
// Folder where pics are kept
var imgfolder = "feature_images/";

var preLoad = new Array();

for (i = 0; i < p; i++){
   preLoad[i] = new Image();
   preLoad[i].src = imgfolder + Pic[i];
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)";
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply()  ;    
   }
   document.images.SlideShow.src = preLoad[j].src;
   //document.slideshowform.desc.value=Description[j];
   document.all.desc.innerHTML=Description[j];
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
   }
   j = j + 1;
   if (j > (p-1)) j=0;
   t = setTimeout('runSlideShow()', slideShowSpeed);
}