 currentImage=-1;

/*  function preloads the images used as visual cues so they load fast and smooth.
	Implementation note: This function relies on the fact that javaScript treats undeclared variables as globals. 	 */
function preLoadImages() {
	imgArray = [];
	var imgSrcArray = ["Images/LSANY1391.jpg", "Images/LSANY1272.jpg", "Images/LSANY1315.jpg", "Images/LSANY1343.jpg", "Images/LSANY1207.jpg"];
	correctImage = 0;
	oopsImage  = 1; 
	if (document.images) 
		for (var i = 0; i < imgSrcArray.length; i++) {
			imgArray[i] = new Image();
			imgArray[i].src = imgSrcArray[i];
		}        
	}

function runSlideShow() {
	if (currentImage >= imgArray.length - 1)
		currentImage=0;
	else
		currentImage+=1;
	node = document.getElementById("rotatingImg");
	node.setAttribute('src', imgArray[currentImage].src);
	setTimeout("runSlideShow('', 'comfield')", 3550);
}
	
window.onload=function() {
	preLoadImages();
	runSlideShow();
}