// JavaScript Document

window.onload = rotateSlideshow();

var total = 3;

function next(x){
	var next = x+1;
	if (next>total)
		next=1;
	document.getElementById("slideshow").innerHTML = "<img src='images/slideshow/"+x+".gif' id='slide' /><br />";
	for (i=1; i<=total; i++){
		if (i==x)
			document.getElementById("slideshow").innerHTML += "<img src='images/slideshow/solid.png' onclick='next("+x+")' class='control' />";
		else
			document.getElementById("slideshow").innerHTML += "<img src='images/slideshow/hallow.png' onclick='next("+i+")' class='control' />";
			
	}
}

function rotateSlideshow(){
	var x=1;
	while (x<99){
		setTimeout("next(2)",5000*x++);
		setTimeout("next(3)",5000*x++);
		setTimeout("next(1)",5000*x++);
		
	}
}

