function AddOnload(myfunc)
{
	if(window.addEventListener)
		window.addEventListener('load', eval(myfunc), false);
	else if(window.attachEvent)
		window.attachEvent('onload', eval(myfunc));
}

if (document.images) 
{
	tabOnLeft = new Image(); tabOnLeft.src = "images/left_tab_on.gif"; 
	tabOnRight = new Image(); tabOnRight.src = "images/right_tab_on.gif"; 
	tabOffLeft = new Image(); tabOffLeft.src = "images/left_tab_off.gif"; 
	tabOffRight = new Image(); tabOffRight.src = "images/right_tab_off.gif"; 
}
function swapTab(whichImages, on)
{
	if (on)
	{
		document.images[whichImages+"_left"].src=tabOnLeft.src;
		document.images[whichImages+"_right"].src=tabOnRight.src;
	}
	else
	{
		document.images[whichImages+"_left"].src=tabOffLeft.src;
		document.images[whichImages+"_right"].src=tabOffRight.src;
	}
}

// Custom by Mike Reid 11:27 AM 6/16/2006

prepareNav = function(){
	tabCnt=0;
	$S('#tabs a').each(					
		function(element){
			tabCnt++;	
			element.name = 'tab'+tabCnt;				
	});

	$S('#tabs a.off').action({
		onmouseover: function(){ swapTab( this.name, true ); },
		onmouseout: function(){ swapTab( this.name, false ); }
	});

	$S('#homeBtn a img').action({
		onmouseover: function(){ this.src = 'images/btn_home_h.gif'; },
		onmouseout: function(){ this.src = 'images/btn_home.gif'; }
	});	
}

AddOnload('prepareNav');