// slideShowSpeed (milliseconds)
var slideShowSpeed = 5000
// crossfade (seconds)
var crossFadeDuration = 3
// the image files
var Pic = new Array()
myRoot = '/images/beforeafter/';
Pic[0] = myRoot + 'image001.jpg'
Pic[1] = myRoot + 'image002.jpg'
Pic[2] = myRoot + 'image003.jpg'
Pic[3] = myRoot + 'image004.jpg'
Pic[4] = myRoot + 'image005.jpg'
Pic[5] = myRoot + 'image006.jpg'
Pic[6] = myRoot + 'image007.jpg'
Pic[7] = myRoot + 'image008.jpg'
Pic[8] = myRoot + 'image009.jpg'
Pic[9] = myRoot + 'image010.jpg'
Pic[10] = myRoot + 'image011.jpg'
Pic[11] = myRoot + 'image012.jpg'
Pic[12] = myRoot + 'image013.jpg'
Pic[13] = myRoot + 'image014.jpg'
Pic[14] = myRoot + 'image015.jpg'
Pic[15] = myRoot + 'image016.jpg'
Pic[16] = myRoot + 'image017.jpg'
Pic[17] = myRoot + 'image018.jpg'
Pic[18] = myRoot + 'image019.jpg'
Pic[19] = myRoot + 'image020.jpg'
Pic[20] = myRoot + 'image021.jpg'

// =======================================
// do not edit below this line
// =======================================

var t
var j = 0
var p = Pic.length

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=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)
}
