var slideShowSpeed = 5000  // Set slideShowSpeed (milliseconds)
var crossFadeDuration = 3 // Duration of crossfade (seconds)

// Specify the image files
 // don't touch this

//Pic[0] = 'globalimages/album/simg/1.jpg'
//Pic[1] = 'globalimages/album/simg/album_2006_60.JPG'
//Pic[2] = '3.jpg'
//Pic[3] = '4.jpg'
//Pic[4] = '5.jpg'
//Pic[1] = 'globalimages/album/simg/
var t
var j = 0
var k = 0
var p = 0
var ind = 5
var preLoad = new Array()

function load(img,king) {
        p = img.length
        for (i = 0; i < p; i++){
           preLoad[i] = new Image()
           preLoad[i].src = img[i]
        }
        if (king == 0 )
                runSlideShow()
        else
            runSlideShow1()
}

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 > (3)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function runSlideShow1(){

   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.SlideShow1.src = preLoad[ind].src
   if (document.all){
      document.images.SlideShow1.filters.blendTrans.Play()
   }
   k = k + 1
   ind = k >= 2 ? ind = 5: ind+1;
   if (k > 2) {k=0;ind = 5}
   t = setTimeout('runSlideShow1()', slideShowSpeed)
}
