var counter = 0;
var imageSrcArray = ["_images/_home/leasing-for-higher-ed.jpg", "_images/_home/solid-financial-foundation.jpg", "_images/_home/top-ten-focus.jpg"];
var hrefArray = ["benefits.php", "calfirst-bank.php", "top-ten-reasons.php"];

for (var i in imageSrcArray)
{
	var img = new Image();
	img.src = imageSrcArray[i];
}

function fadeIn()
{
	if (counter >= imageSrcArray.length) counter = 0;
	
	document.getElementById("homeRotatorImg").src = imageSrcArray[counter];
	document.getElementById("homeRotatorLink").href = hrefArray[counter];
	Effect.Appear('homeRotatorImg', { duration: .75 });
	
	counter++;
	setTimeout("fadeOut()", 5000);
}

function fadeOut()
{
	Effect.Fade('homeRotatorImg', { duration: .75 });
	setTimeout("fadeIn()", 750);
}
