// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3750

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

// Specify the image files
var picture = new Array() // don't touch this

// to add more images, just continue
// the pattern, adding to the array below
picture[0] = 'images/Church-StMarys-MeltonMowbray.jpg'
picture[1] = 'images/Church-StMaryTheVirgin-ThorpeArnold.jpg'
picture[2] = 'images/Church-StMarysChurch-Freeby.jpg'
picture[3] = 'images/Church-StJamesChurch-BurtonLazars.jpg'
picture[4] = 'images/Church-WelbyChurch.jpg'
picture[5] = 'images/Church-SysonbyChurch.jpg'

var t
var j = 0
var p = picture.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = picture[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
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }

   j = j + 1

   if (j > (p-1)) j=0

   t = setTimeout('runSlideShow()', slideShowSpeed)
}