//
// trigger onLoad function (do_onload)
//
if (window.addEventListener)
{
	window.addEventListener("load", do_onload, false);
}
else
{
	if (window.attachEvent)
	{
		window.attachEvent("onload", do_onload);
	}
	else
	{
	if (document.getElementById)
		{
			window.onload = do_onload;
		}
	}
}


function do_onload()
{
	setJSFunctionality();
}

 
/* Function used to allow links that have been hidden using the .rbsScreenReaderText class to be viewable if tabbed to by the user */
function toggleLinks(objElement)
{
	if (objElement.className=='rbsScreenReaderText')
  		objElement.className='rbsScreenReaderTextVisibleLink';
	else
		objElement.className='rbsScreenReaderText';
}

function setJSFunctionality ()
{
	if(document.getElementById("jsPrintPage"))
	{
		document.getElementById("jsPrintPage").style.display = "block";
	}


	
if (!document.getElementsByTagName) return false;
	var rows = document.getElementsByTagName("tr");
	for (var i=0; i<rows.length; i++) {
		if(rows[i].parentNode.nodeName=='TBODY') {
			rows[i].onmouseover = function() {
				$(this).addClass("rowhighlight"); 
			}
			rows[i].onmouseout = function() {
				$(this).removeClass("rowhighlight");
			}
		}
	}


	var links = document.getElementsByTagName("a");
	for (var i=0; i < links.length; i++) {
	    if (links[i].className.match("popup")) {
			links[i].onclick = function() {
		        window.open(this.href);
		        return false;
			}
	    }
	}
}
