
//home banner rotate

var currentImageIndex = 1;
var startImageIndex = 1;
var lastImageIndex = 3;
var secondsDelay = 3;

function showCurrent(index)
{
	for (i=startImageIndex;i<=lastImageIndex;i++)
	{
		if (index == i)
		{
		  document.getElementById("big"+i).style.display="inline";
		  currentImageIndex = i;
		  document.getElementById("a"+i).className="on";
		}
		else
		{
		  document.getElementById("big"+i).style.display="none";
		  document.getElementById("a"+i).className="off";
		}
	}
}

function showNext()
{
	for (i=startImageIndex;i<=lastImageIndex;i++)
	{
		if (currentImageIndex == i)
		{
	  	  	// go to next image
		  	if (currentImageIndex < lastImageIndex)
			  	showCurrent((i+1));
		  	else
		  		showCurrent(startImageIndex);
		}
	}
	setTimeout("showNext()",2000);
}