var maximages = 27; //the amount of images note that images must adhere to the naming convention image###.jpg where # is a digit, they must be in order

//// do not modify below this line (unless you are debugging :)
var timer = null;
var x = 1;


function loadAdjustments()
{
	if ((document.body.clientWidth < 900) || (document.body.clientHeight < 550))
	{
		var imagShow=document.getElementById("show");
		imagShow.width = imagShow.width * 0.75;
		imagShow.height = imagShow.height * 0.75;
	}
}

function stop()
{
	clearTimeout(timer);
}

function setSrc(y)
{
	var imagShow=document.getElementById("show");
	imagShow.src="./slideshow/image"+y+".jpg";
}

function startTimer()
{
	clearTimeout(timer);
	if (x > maximages-1) //if x > 18 then start over at 0 (because we only have 19 images)
	{
		x = 0;
	}
	x = x + 1;
	setSrc(x);
	timer = setTimeout("startTimer("+x+")",2500);
}
