//      ---------------------------------------------
//		Last Update:  3/22/07, Patricia Lentz (intern)
//      ---------------------------------------------

// Interval between slides in milliseconds
var slideShowSpeed = 7500

// Only IE browsers.  Duration in seconds
var crossFadeDuration = 3

var t
var j = 0	// array index
var p = Pic.length	// array length of the Pic array passed into here, which is really the number of images that it is storing	

// Copy the Pic array into our new array for usage in the function below
var preLoad = new Array()
for (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=2)"
      	document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      	document.images.SlideShow.filters.blendTrans.Apply()
   	}
   	document.images.SlideShow.src = preLoad[j].src
   	document.links[0].href = Urls[j]

// Grab the element and change the text to the description for the image
	var myElement = document.getElementById("Descr")

	myElement.innerHTML=TextLines[j]

   	if (document.all)
   	{
   	   document.images.SlideShow.filters.blendTrans.Play()
   	}
   	j = j + 1	// Increment the array index for the next image set

   	// Start at the beginning again, after the last image set was shown
   	if (j > (p-1))
   	{
   		j=0
   	}
   	t = setTimeout('runSlideShow()', slideShowSpeed)
}

function stopSlideShow()
{
	clearTimeout(t)
}

