var imageRotationList = new Array();

imageRotationList[0] = "photos/climber.jpg";
imageRotationList[1] = "photos/massage-seaSalt.jpg";
imageRotationList[2] = "photos/hallwayCouches.jpg";
imageRotationList[3] = "photos/breakfastGirl.jpg";
imageRotationList[4] = "photos/hoops.jpg";
imageRotationList[5] = "photos/clubCouches.jpg";
imageRotationList[6] = "photos/massageCouple.jpg";
imageRotationList[7] = "photos/rockwall.jpg";
imageRotationList[8] = "photos/rotunda.jpg";
imageRotationList[9] = "photos/suiteBath.jpg";

// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
gSlideshowInterval = 5;
gNumberOfImages = 10;

function canManipulateImages() {
	if (document.images)
		return true;
	else
		return false;
}

function loadSlide(imageURL) {
	if (gImageCapableBrowser) {
		element = document.getElementById('photo');
		new Effect.Fade(element, {
			duration:0.6, 
			from:1.0, 
			to:0.1
		});
		setTimeout("document.showcaseImage.src = \"" + imageURL + "\";new Effect.Appear(element, { duration:0.6 });",595);
		return false;
	}
	else {
		return true;
	}
}

function nextSlide() {
	gCurrentImage = (gCurrentImage + 1) % gNumberOfImages;
	loadSlide(imageRotationList[gCurrentImage]);
}

gImageCapableBrowser = canManipulateImages();
gCurrentImage = 0;
setInterval("nextSlide()",gSlideshowInterval * 1000);