/*
 * javascript for a slideshow
 */
  
// =======================================
// set the following variables
// =======================================

// Set delay between images (milliseconds)
var slideShowSpeed = 3000;

// Duration of crossfade (seconds)
var crossFadeDuration = 1;

// Specify the image files
// to add more images, just continue  the pattern, adding to the array below
var PicArray = new Array(
	"images/E0375_tn.jpg",
	"images/E0457_tn.jpg",
	"images/E0476_tn.jpg",
	"images/E0475_tn.jpg",
	"images/E0474_tn.jpg",
	"images/E0473_tn.jpg",
	"images/E0472_tn.jpg",
	"images/E0467_tn.jpg",
	"images/E0394_tn.jpg",
	"images/N0388_tn.jpg",
	"images/N0389_tn.jpg",
	"images/E0477_tn.jpg",
	"images/B0267_tn.jpg",
	"images/N0390_tn.jpg",
	"images/E0471_tn.jpg",
	"images/B0265_tn.jpg",
	"images/N0387_tn.jpg" 	);

// =======================================
// do not edit anything below this line
// =======================================
var t
var j = 0
var p = PicArray.length
var preLoad = new Array()

for (i = 0; i < p; i++){
	preLoad[i] = new Image()
	preLoad[i].src = PicArray[i]
}


/**
 *  Note that the name "SlideShow" must match the name in the html document
 */
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

   if (document.all){
	  document.images.SlideShow.filters.blendTrans.Play(  )
   }

   j = j + 1

   if (j > (p-1)) j=0

   t = setTimeout('runSlideShow()', slideShowSpeed)
}

