/*
    slideshow.js
    
    JavaScript module for non-Flash image slideshow.

    This particular version edited by Mark Semsel
    
    mark.semsel@hudsontechnic.com    
    http://www.hudsontechnic.com

*/

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000;

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

// Specify the image files.
// This array is of an undetermined length.  It will expand or shrink to
// accomodate the list of images that you see a few lines below here.
var Pic = new Array(); 

// This is the array of images.  Note that each element of the array refers to an jpg file
// stored in a folder called "images".  You can name the folder anything you want, but I 
// would highly recommend keeping the images in a separate folder.

Pic[0] = 'slideshow/cap_001.jpg';
Pic[1] = 'slideshow/cap_002.jpg';
Pic[2] = 'slideshow/cap_003.jpg';
Pic[3] = 'slideshow/cap_004.jpg';
Pic[4] = 'slideshow/cap_005.jpg';
Pic[5] = 'slideshow/cap_006.jpg';
Pic[6] = 'slideshow/cap_007.jpg';
Pic[7] = 'slideshow/cap_008.jpg';
Pic[8] = 'slideshow/cap_009.jpg';
Pic[9] = 'slideshow/cap_010.jpg';

var t;
var j = 0;
var p = Pic.length;

var preLoad = new Array();

for (var 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=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply();
   }
   
   document.images.SlideShow.src = preLoad[j].src
   
   if (document.all){
   
      document.images.SlideShow.filters.blendTrans.Play()
   }
   
   j++;
   
   if (j > (p-1)) j=0;
   
   t = setTimeout('runSlideShow()', slideShowSpeed);
}


