// =======================================
// 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 <= 47; i++)
{
  if (i < 10) 
  {
    Pic[i] = 'slideshowimages/00' + i + '.jpg'
  }
  
  if (i < 100 && i >= 10) 
  {
    Pic[i] = 'slideshowimages/0' + i + '.jpg'
  }
  
  if (i < 1000 && i >= 100) 
  {
    Pic[i] = 'slideshowimages/' + i + '.jpg'
  }
}

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var k = 1
var l = 2
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image(155,72)
   preLoad[i].src = Pic[i] 
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow1.style.filter="blendTrans(duration=2)"
      document.images.SlideShow1.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow1.filters.blendTrans.Apply()      
	  
	  document.images.SlideShow2.style.filter="blendTrans(duration=2)"
      document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow2.filters.blendTrans.Apply()      
	  
	  document.images.SlideShow3.style.filter="blendTrans(duration=2)"
      document.images.SlideShow3.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow3.filters.blendTrans.Apply()      
   }
   //if (preLoad[j].src != undefined) 
   //{
    document.images.SlideShow1.src = preLoad[j].src
   //}
   //if (preLoad[k].src != undefined) 
   //{
    document.images.SlideShow2.src = preLoad[k].src
   //}
   //if (preLoad[l].src != undefined) 
   //{
    document.images.SlideShow3.src = preLoad[l].src
   //}
   if (document.all){
      document.images.SlideShow1.filters.blendTrans.Play()
	  document.images.SlideShow2.filters.blendTrans.Play()
	  document.images.SlideShow3.filters.blendTrans.Play()
   }
   j = Math.round((Pic.length-1)*Math.random())
   k = Math.round((Pic.length-1)*Math.random())
   l = Math.round((Pic.length-1)*Math.random())
   t = setTimeout('runSlideShow()', slideShowSpeed)
}