

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000

// Duration of crossfade (seconds)
var crossFadeDuration = 5

// 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

 var rndArr = new Array();
 function getRandom(iMin, iMax)
 {
      x = iMin + parseInt((Math.random())*(iMax-iMin))
      for(i=0;i<rndArr.length;i++)
      {
           if(rndArr[i]==x)
           {
                x = getRandom();
           }
      }
      return x;
 }

Pic[0] = "images/pattern1.gif"
Pic[1] = "images/pattern2.gif"
Pic[2] = "images/pattern3.gif"
Pic[3] = "images/pattern4.gif"
Pic[4] = "images/pattern5.gif"
Pic[5] = "images/pattern6.gif"
Pic[6] = "images/pattern7.gif"
Pic[7] = "images/pattern8.gif"


// =======================================
// do not edit anything below this line
// =======================================

var t
var jq = 0
var p = Pic.length

var preLoad = new Array()
for (iz = 0; iz < p; iz++){
   preLoad[iz] = new Image()
   preLoad[iz].src = Pic[iz]
}

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[jq].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   jq = jq + 1
   if (jq > (p-1)) jq=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}
