// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3900
var slideShowSpeed2 = 4200
var slideShowSpeed3 = 4500

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

// Specify the image files
var Pic = new Array() // don't touch this
var Pic2 = new Array() // don't touch this
var Pic3 = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'newslide/a.jpg'
Pic[1] = 'newslide/d.jpg'
Pic[2] = 'newslide/g.jpg'

Pic2[0] = 'newslide/b.jpg'
Pic2[1] = 'images/bag.jpg'
Pic2[2] = 'images/e1.jpg'

Pic3[0] = 'newslide/c.jpg'
Pic3[1] = 'newslide/e.jpg'
Pic3[2] = 'newslide/f.jpg'

// =======================================
// do not edit anything below this line
// =======================================

var t,u,v
var j = 0
var k = 0
var m = 0
var p = Pic.length
var q = Pic2.length
var r = Pic3.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

var preLoad2 = new Array()
for (i = 0; i < q; i++){
   preLoad2[i] = new Image()
   preLoad2[i].src = Pic2[i]
}

var preLoad3 = new Array()
for (i = 0; i < r; i++){
   preLoad3[i] = new Image()
   preLoad3[i].src = Pic3[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)
}

function runSlideShow2(){
   if (document.all){
      document.images.SlideShow2.style.filter="blendTrans(duration=2)"
      document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow2.filters.blendTrans.Apply()      
   }
   document.images.SlideShow2.src = preLoad2[k].src
   if (document.all){
      document.images.SlideShow2.filters.blendTrans.Play()
   }
   k = k + 1
   if (k > (q-1)) k=0
   u = setTimeout('runSlideShow2()', slideShowSpeed2)
}

function runSlideShow3(){
   if (document.all){
      document.images.SlideShow3.style.filter="blendTrans(duration=2)"
      document.images.SlideShow3.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow3.filters.blendTrans.Apply()      
   }
   document.images.SlideShow3.src = preLoad3[m].src
   if (document.all){
      document.images.SlideShow3.filters.blendTrans.Play()
   }
   m = m + 1
   if (m > (r-1)) m=0
   v = setTimeout('runSlideShow3()', slideShowSpeed3)
}
