/*
 * How to add ads to the rotator
 *
 * Add a line in the following format:
 * [ "imageFileName.gif", "Description of link", "http://www.where.to.link.com" ]
 *
 * Make sure that all lines except the last have a comma at the end!
 *
 * The image file must be in /images/sponsors/rotator!
 */

var adFiles =
[
	["FFFCU.gif", "First Financial Federal Credit Union", "http://www.firstfinancial.org/"],
	["zekes.gif", "Zekes Coffee", "http://www.zekescoffee.com"],
	["duracard.gif", "Duracard", "http://www.duracard.com"],
	["duckpins.gif", "Stoneleigh Lanes", "http://www.stoneleighlanes.com"],
	["8x10.gif", "The 8x10", "http://www.the8x10.com"]//
];

// DO NOT MODIFY BELOW THIS LINE

function displayRotator(elementId, srcArray, imageDir)
{
	var rotator = document.getElementById(elementId);
	if(!rotator)
		return;
		
	var rotatorLink = rotator.parentNode;
	if(!rotatorLink || rotatorLink.tagName.toLowerCase() != "a")
		return;

	var n = Math.floor(Math.random() * (srcArray.length));
	
	rotator.src = imageDir + '/' + srcArray[n][0];
	rotator.alt = srcArray[n][1];
	rotatorLink.href = srcArray[n][2];
}