// Below is function for window_onscroll
function window_onscroll() {
	// IE
	var intNumber
	
	if ( document.body.scrollTop > 0 ) 
	{	
		gotoTop.style.visibility="visible";
		gotoTopH.style.visibility="visible";
		gotoTop.style.top = document.body.scrollTop + document.body.offsetHeight - 75;
		gotoTopH.style.top = gotoTop.style.top;
		gotoTop.style.left = results.offsetLeft - 40; 
		gotoTopH.style.left = gotoTop.style.left; 

				
		// RMC 10/20/00 - 
		/* If the icon would be moved past the end of the table, then
			move it back upto the bottom of the table.
			
			Note: for some reason the gotoTop.syle.top returns the number
			followed by "px". So we need to:
			1. Strip out the px 
			2. multiply by 1 to convert the answer to a number. 
			3. compare the results. */
		intNumber = gotoTop.style.top;
		intNumber = intNumber.replace( "px"," ");
		intNumber = intNumber * 1 + 75 * 1;
		if ( intNumber > results.offsetTop + results.offsetHeight)
		{
			gotoTop.style.top = results.offsetTop + results.offsetHeight;
			gotoTopH.style.top = gotoTop.style.top;
		}
	}
	else
	{
		gotoTop.style.visibility="hidden";
		gotoTopH.style.visibility="hidden";
	}
}

function gotoTopH_onclick() {
	document.body.scrollTop = 0;
}

function gotoTop_onmouseover() {
	gotoTop.style.visibility="hidden";
	gotoTop.style.zIndex = "1";
	gotoTopH.style.visibility="visible";
	gotoTopH.style.zIndex = "2";
}

function gotoTopH_onmouseout() {
	gotoTopH.style.visibility="hidden";
	gotoTopH.style.zIndex = "1";
	gotoTop.style.visibility="visible";
	gotoTop.style.zIndex = "2";
	
}

function highlight_row(intRowNumber) {
	// Get the original background color and put it in
	// row_background_color
	row_background_color = intRowNumber.style.backgroundColor
	intRowNumber.style.backgroundColor = "yellow"
	intRowNumber.style.cursor = "hand"
}

function unhighlight_row(intRowNumber) {
	// Set the background color back to its original color.
	intRowNumber.style.backgroundColor = row_background_color
	intRowNumber.style.cursor = "default"
}

