// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 2000

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

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


Pic[0] = "/images/z/1.jpg"
Pic[1] = "/images/z/7.jpg"
Pic[2] = "/images/z/8.jpg"
Pic[3] = "/images/z/9.jpg"
Pic[4] = "/images/z/10.jpg"
Pic[5] = "/images/z/11.jpg"
Pic[6] = "/images/z/2.jpg"
Pic[7] = "/images/z/3.jpg"
Pic[8] = "/images/z/4.jpg"
Pic[9] = "/images/z/5.jpg"
Pic[10] = "/images/z/6.jpg"

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

var t;
var j = 0;
var p = Pic.length;
var preLoadImage = new Array();

function runSlideShow() {
  // Check for Initiate count-down timer before starting
  if (typeof document.images.SlideShow!='undefined')
    t = setTimeout('preLoadSlideShow()', 2000);
}

function preLoadSlideShow() {
  var i;
  for (i = 0; i < p; i++){
     preLoadImage[i] = new Image()
     preLoadImage[i].src = Pic[i]
  }
  j = 0;
  doSlideShow()
}

function doSlideShow(){
   if (typeof preLoadImage[j]=='undefined')
   { 
     // Wait for preload to finish if its not done
     t = setTimeout('doSlideShow()', 500)
   }  
   else
   {
     if (document.all){
       document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
       document.images.SlideShow.filters.blendTrans.Apply()      
     }
     document.images.SlideShow.src = preLoadImage[j].src
     if (document.all){
        document.images.SlideShow.filters.blendTrans.Play()
     }
     j = j + 1
     if (j > (p-1)) j=0
     t = setTimeout('doSlideShow()', slideShowSpeed)
   }
}
