
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000;

// Duration of crossfade (seconds)
var crossFadeDuration = 2;

// Specify the image files
var url; //initial URL


// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var l = urlArray.length;
var tar = tarArray.length;
var preLoad = new Array();
var preLoadAnchor = new Array();

for (i = 0; i < p; i++)
{
	preLoad[i] = new Image();
	preLoad[i].src = Pic[i];
	preLoadAnchor[i] = new Object();
	preLoadAnchor[i].href = urlArray[i]
	preLoadAnchor[i].target = tarArray[i]

}


// Set the Slideshow container to hold the n'th image in the slideshow.
function setSlideshowImage(n)
{
	if (preLoadAnchor[n].target == 'popup')
	{
		document.images.SlideShow.src = preLoad[n].src;
		SlideShowAnchor.href = "javascript:windowOpen('" + preLoadAnchor[n].href + "', 600, 500);";
		SlideShowAnchor.target = "_self";
	}

	else
	{
		document.images.SlideShow.src = preLoad[n].src;
		SlideShowAnchor.href = preLoadAnchor[n].href;
		SlideShowAnchor.target = preLoadAnchor[n].target;
	}
}


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();
	}

	setSlideshowImage (j);	// Set the slideshow image.
	
	if (document.all)
	{
		document.images.SlideShow.filters.blendTrans.Play();
	}

	j = j + 1;
	if (j > (p - 1)) j = 0;

	t = setTimeout('runSlideShow()', slideShowSpeed);
}

