//////////////////////slide show/////////////////
var slideShowSpeed = 4000

// Duration of crossfade (seconds)
var crossFadeDuration = 2
var Pic = new Array()

Pic[0] = 'images/sharkweekct-animate01.jpg'
Pic[1] = 'images/sharkweekct-animate02.jpg'
Pic[2] = 'images/sharkweekct-animate03.jpg'
Pic[3] = 'images/sharkweekct-animate04.jpg'
Pic[4] = 'images/sharkweekct-animate05.jpg'
Pic[5] = 'images/sharkweekct-animate06.jpg'
Pic[6] = 'images/sharkweekct-animate07.jpg'
Pic[7] = 'images/sharkweekct-animate08.jpg'
Pic[8] = 'images/sharkweekct-animate09.jpg'
Pic[9] = 'images/sharkweekct-animate10.jpg'
Pic[10] = 'images/sharkweekct-animate11.jpg'
Pic[11] = 'images/sharkweekct-animate12.jpg'
Pic[12] = 'images/sharkweekct-animate13.jpg'
Pic[13] = 'images/sharkweekct-animate14.jpg'
Pic[14] = 'images/sharkweekct-animate15.jpg'
Pic[15] = 'images/sharkweekct-animate16.jpg'
Pic[16] = 'images/sharkweekct-animate17.jpg'
Pic[17] = 'images/sharkweekct-animate18.jpg'
Pic[18] = 'images/sharkweekct-animate19.jpg'

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)
}
