//
//Create global variable to control slide show
//
   var whichSlide = 0;


function runSlideShow(slideShowSpeed,crossFadeDuration)
  {
   p = Slide.length; //length of Slide array (number of slides)
   //alert ("runSlideShow "+p+" slides, displaying slide "+whichSlide);
   if (document.all)
       {
        document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
        if (document.images.SlideShow.filters.blendTrans.Apply())
        document.images.SlideShow.filters.blendTrans(duration=crossFadeDuration).Apply(); 
              if (document.images.SlideShow && document.images.SlideShow.style && document.images.SlideShow.style.filters)                                                  {document.images.SlideShow.filters.blendTrans(duration=crossFadeDuration).Apply();} 
           textNode = document.all["SlideText"];  
        }
       else
        { textNode = document.getElementById("SlideText"); }
   //alert ("Before: " +textNode.innerHTML);
   textNode.innerHTML = Slide[whichSlide].text;
   //alert ("After: " +textNode.innerHTML);
   document.images.SlideShow.src = Slide[whichSlide].src;
   document.images.SlideShow.alt = Slide[whichSlide].text;

   if (document.all){if (document.images.SlideShow.filters.blendTrans.Play()) {document.images.SlideShow.filters.blendTrans.Play();}}
   whichSlide = whichSlide + 1;
   if (whichSlide > (p-1)) whichSlide=0;
   slideShow = "runSlideShow(" + slideShowSpeed + "," + crossFadeDuration + ")"
   //alert ("Next Slide: " +slideShow+" Slide #"+whichSlide);
   t = setTimeout(slideShow, slideShowSpeed);
  }
