var screenShots = new Array();
var currShot = 0;
var ssWin = false;
function screenShotWindow(inUrl) {
	ssWin = window.open(inUrl,'Magmic_ssWin','width=500,height=340');
	ssWin.focus();
}
function showScreenShot(num) {
	if (screenShots.length) {
		display = document.images.ssDisplay;
		display.src = screenShots[num];
		currShot = num;
	}
}
function nextScreenShot() {
		var nextShot = currShot+1;
		if (nextShot >= screenShots.length) {
			nextShot = 0;
		}
		showScreenShot(nextShot);
		//reset the rotation timer.
		rotateSShots();
}
function prevScreenShot() {
		var prevShot = currShot-1;
		if (prevShot < 0) {
			prevShot = screenShots.length-1;
		}
		showScreenShot(prevShot);
		//reset the rotation timer.
		rotateSShots();
}
var ssInterval = false;
function rotateSShots() {
	if (ssInterval) {
		window.clearInterval(ssInterval);
	}
	ssInterval = window.setInterval('nextScreenShot()',3000);
}
rotateSShots();

