// slideShowSpeed (milliseconds)
slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
preLoad = new Array();
run = 1 ;
cont = 1 ;
k = 0 ;
p = Pic.length ;

for (var i = 0; i < p ; i++) {
 preLoad[i] = new Image();
 preLoad[i].src = Pic[i];
}

function runSlideShow() {
  if ( run ) {
    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[k].src;
    if (document.all) {
      document.images.SlideShow.filters.blendTrans.Play();
    }
    k = k + 1;
    if (cont) {
      if (k > (p - 1)) { 
        k = 0 ;
      }
      setTimeout('runSlideShow()', slideShowSpeed);
    }
    else {
      run = 0 ;
    }
  }
}
