/* ---------------------------------------
 *	function called when onmouseover on left nav is fired.
 * 	sets the global variable of currently rolled
 *	calls function to actually do the change
 */
function rollNavOn( i )
{
	gNavOver = i;
	changeNavColor( i, gColorOver)
}

/* ---------------------------------------
 *	function called when onmouseout on left nav is fired.
 * 	sets the global variable of currently rolled to null
 *	calls function to actually do the change
 */
function rollNavOff()
{
	changeNavColor( gNavOver, "")
	gNavOver = null;
}

/* ---------------------------------------
 *	function called by onmouseover and onmouseout functions
 * 	checks if browser can handle it.
 *	changes the background color of a couple different cells
 *  to an appropriate color ( set in the leftnav.asp file of
 *  a particular extra net )
 */
function changeNavColor( iNav, sColor)
{
	if ( document.getElementById && iNav != null )
	{
		// sets color of cell to left of the text.
		var eTempCell = document.getElementById("nav" + iNav )
		if ( eTempCell != null )
		{
			eTempCell.style.backgroundColor = sColor;
		}
		// sets color of cell with text.
		var eTempCell = document.getElementById("navText" + iNav )
		if ( eTempCell != null )
		{
			eTempCell.style.backgroundColor = sColor;
		}
	}
}


function changeTrColor( objRow )
{
	if ( objRow != null )
	{
		if ( typeof objRow.style != "undefined" )
		{
			if ( typeof objRow.style.backgroundColor != "undefined" )
			{
				if ( gColorOver.length == 7 )
				{
					objRow.style.backgroundColor = gColorOver;
				}
				trColorRevert()
				gNavOver = objRow;

			}
		}
	}
}

function trColorRevert()
{
	if (gNavOver != null)
	{
		if ( typeof gNavOver.style != "undefined" )
		{
			if ( typeof gNavOver.style.backgroundColor != "undefined" )
			{
				gNavOver.style.backgroundColor = ""
				gNavOver = null;
			}
		}
	}
}

function  fireLink( objRow )
{
	if ( typeof objRow.children != "undefined" && objRow.children.length > 0 )
	{
		if ( typeof objRow.children[0].children != "undefined" )
		{
			if ( typeof objRow.children[0].children[0].href != "undefined" )
			{
				location.href = objRow.children[0].children[0].href;
			}
			else if ( typeof objRow.children[0].children[0].children[0] != "undefined" )
			{
				if ( typeof objRow.children[0].children[0].children[0].href != "undefined" )
				{
					location.href = objRow.children[0].children[0].children[0].href;
				}
			}
			
		}	
	}
}
