// Fading Slideshow Script
// NS4-6,IE4-6, fade effect only in IE; degrades gracefully

var slideShowSpeed = 11000
var crossFadeDuration = 3

var t, p
var j = 0
var preLoad = new Array()

function checkSlideShow() {
  if (Pic[0]=='nopic') {
    p=1
  }
  else {
    p = Pic.length
    for (i = 0; i < p; i++){
      preLoad[i] = new Image()
      preLoad[i].src = Pic[i]
    }
    runSlideShow()
  }
}

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)
}