//Function to display a set of images
//Using document global array 'imageArray' in imgpreload.js to access images 
//and document image named 'slide' in calling html
var index=0;
var interval=9000; //3 Secs delay between photos

function slideit()
{	
	//Check if browser supports the image object
	if (document.images)
	{
		document.images.slide.src=imageArray[index];
		//document.write('<p>Path: ' + imageArray[index] + '</p>');
		if (index<imageArray.length-1)
		{
			index++;
		}
		else
		{	
			index=0;
		}
		//Recursively call function "slideit()" every x.x seconds
		setTimeout("slideit()",interval);
	}
}
/*
Acknowledgements:
Code adapted from example found at: http://www.javascriptkit.com/
*/
