// Set number of pictures in the images/slideshow folder
var numberOfPictures = 17;

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000;

// Duration of crossfade (seconds)
var crossFadeDuration = 3000;

// Don't change anything else below :-)
var images = new Array();

function preloadImages()
{
	// Preload the images
	var preloadedImage;
	
	for(var i = 1; i <= numberOfPictures; i++)
	{
		images[i-1] = "images/slideshow/" + i + ".JPG";
		preloadedImage = new Image();
		preloadedImage.src = "images/slideshow/" + i + ".JPG"
	}
}

function startSlideShows()
{
	setTimeout('runSlideShow()', 0);
}
// Image Index
var g1 = 0;
function runSlideShow()
{
	var t;
	if (document.all)
	{
		document.images.slideshow.style.filter="blendTrans(duration=crossFadeDuration )";
		document.images.slideshow.filters.blendTrans.Apply();
	}
	document.images.slideshow.src = images[g1];
	if (document.all)
	{
	  document.images.slideshow.filters.blendTrans.Play();
	}
	g1 = g1 + 1; // move to the next picture
	
	// restart the slideshow
	if (g1 > (images.length-1))
	{
	   g1=0;
	}
	t = setTimeout('runSlideShow()', slideShowSpeed);
}
