/*
----------------------------------------------------------------------------------------
*    tabs_rollover.js
*   
*    Initialises tab navigation bar rollover images
*   
*    VERSION 1.00     10/04/07
*   
*    (c) 2007 The Lennox Berkeley Society
----------------------------------------------------------------------------------------
*/

// Makes init_rollover function run once the document has loaded
add_onload(init_rollover);


function init_rollover()
{
	var tags=document.getElementsByTagName("th");
	for (var count=0; count<tags.length; count++)
	{
		// Check to see if this 'th' tag has the 'unselected_tab' class name
		if (tags[count].className == "unselected_tab")
		{
			// Yes, insert event handlers to call 'mouse in' and 'mouse out' functions
			// and set unselected image as default
			tags[count].style.backgroundImage = "url(\"images/unselected_tab.gif\")";
		 	//tags[count].style.backgroundPosition = "bottom left";
			tags[count].onmouseover = rollover;			
			tags[count].onmouseout = rollout;			
		}
	}
}

function rollover()
{
	this.style.backgroundImage = "url(\"images/selected_tab.gif\")";
}

function rollout()
{
	this.style.backgroundImage = "url(\"images/unselected_tab.gif\")";
}