function sponsors_rotate()
{
	var link = document.getElementById("spLink");
	var logo = document.getElementById("spLogo");

	if (link != null && logo != null && sponsors.length > 0)
	{
		// Obtain random sponsor
		var sponsor_index = Math.floor(Math.random() * (sponsors.length));

		// If the random result is already currently showing, regenerate
		while (sponsors[sponsor_index][0] == link.href)
		{
			sponsor_index = Math.floor(Math.random() * (sponsors.length));
		}

		logo.src = sponsors[sponsor_index][0];
		logo.alt = sponsors[sponsor_index][1];
		logo.title = sponsors[sponsor_index][1];
		link.title = sponsors[sponsor_index][1];

		if (!sponsors[sponsor_index][2] == "")
		{
			link.target = "_blank";
			link.href = sponsors[sponsor_index][2];
		}
		else
		{
			link.target = "";
			link.href = "";
		}

		// Rotate to the next sponsor in the configured timeout
		setTimeout("sponsors_rotate()", sponsor_time * 1000);
	}
}