if (document.getElementsByTagName) document.getElementsByTagName('html')[0].className = 'hasScript';

//Rotates elements
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.
}
/****************************************************************************/
//MP Initialization Routine
function mp_init() {
//Get references to dynamic elements
 if (document.getElementById && document.getElementsByTagName){ 
	sp = document.getElementById('sponsors').getElementsByTagName('A');		
 }
 else if (document.all) {  
  sp = document.all['sponsors'].all.tags('A')    
 }
 else return;
 //initialize image rotation
 for(var j = 0; j < sp.length; j++) 
	sp[j].style.visibility = 'hidden'; 	
 if (sp.length) rotate();
} //mp_init()

function addLoadEvent(func) {
  if (!( document.getElementById && document.getElementsByTagName) ) return
	var oldonload = window.onload
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload()
			func()
		}
	}
}
