	var selectedIndex = '1';
	var maxIndex = '3';
	var timeoutId = "";

	function navRotate(index)
	{
		selectedIndex = index;
		prevIndex = maxIndex;
		
		if (selectedIndex > 1)
			prevIndex = parseInt(selectedIndex - 1);

		Effect.Fade('featureDiv' + parseInt(prevIndex), { duration: 3.0 });
		setTimeout("Effect.Appear(featureDiv" + index +", { duration: 4.5 })", 500);
		
	}

	function beginRotation()
	{
		timeoutId = setTimeout("rotate()", 4000);
	}

	function navClick(index)
	{
		clearTimeout(timeoutId);

		selectedIndex = index;

		for (i=1; i<=maxIndex; i++)
		{
			document.getElementById('featureDiv' + i).style.display = "none";
			//document.getElementById('featureImage' + i).src = "/images/home/ajax_" + i + ".jpg";
		}

		document.getElementById('featureDiv' + index).style.display = "block";
		//document.getElementById('featureImage' + index).src = "/images/home/subnav_" + index + "_f2.gif";

	}
	
	function rotate()
	{
		if (selectedIndex == maxIndex)
			navRotate(1);
		else
			navRotate(parseInt(selectedIndex) + 1);

		timeoutId = setTimeout("rotate()", 9000)
	}

	function stopRotate()
	{
		clearTimeout(timeoutId);
	}