// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 2500

// 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

Pic[0] = 'images/top1.jpg'
Pic[1] = 'images/top2.jpg'
Pic[2] = 'images/top3.jpg'
Pic[3] = 'images/top4.jpg'
Pic[4] = 'images/top5.jpg'
Pic[5] = 'images/top6.jpg'
Pic[6] = 'images/top7.jpg'
Pic[7] = 'images/top8.jpg'
Pic[8] = 'images/top9.jpg'
Pic[9] = 'images/top10.jpg'
Pic[10] = 'images/top11.jpg'
Pic[11] = 'images/top12.jpg'
Pic[12] = 'images/top13.jpg'
Pic[13] = 'images/top14.jpg'
Pic[14] = 'images/top15.jpg'
Pic[15] = 'images/top16.jpg'
Pic[16] = 'images/top17.jpg'
Pic[17] = 'images/top18.jpg'
Pic[18] = 'images/top19.jpg'
Pic[19] = 'images/top20.jpg'
Pic[20] = 'images/top21.jpg'
Pic[21] = 'images/top22.jpg'
Pic[22] = 'images/top23.jpg'
Pic[23] = 'images/top24.jpg'
Pic[24] = 'images/top25.jpg'
Pic[25] = 'images/top26.jpg'
Pic[26] = 'images/top27.jpg'
Pic[27] = 'images/top28.jpg'
Pic[28] = 'images/top29.jpg'
Pic[29] = 'images/top30.jpg'

// =======================================
// do not edit anything 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
   j = Math.floor(Math.random() * p);
   //if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}