// Sponsor Rotator (Whoever wrote the original for arkansassymphony.org, thanks)
var rotTime = 5; //Time in seconds between image rotations
var sp;  //Array containing references to sponsor images
var current = 0, last;
function rotate() {
	var last = (current - 1 < 0) ? sp.length-1 : (current - 1);
	sp[last].style.visibility = 'hidden';
	sp[current].style.visibility = 'visible';
	current = (++current < sp.length) ? current : 0;
	setTimeout('rotate()',rotTime * 1000); //wait for a bit then do it again.
}

// Page Initialization
function rotate_init() {
	if (document.getElementById && document.getElementsByTagName){
		sp = document.getElementById('sponsors').getElementsByTagName('img');
		}
	else if (document.all) {
		sp = document.all['sponsors'].all.tags('img')
	}
	else return;
	
	for(var j = 0; j < sp.length; j++) //initialize image rotation
		sp[j].style.visibility = 'hidden'; 	
	
	if (sp.length) rotate(); //rotate if the there is something to rotate
}