/* ====================================================
//
// Client side script color utilities.
//
=====================================================*/

var clrRowSelectBorder = "RGB(0,23,90)";
var clrRowSelectBackground = "RGB(205,213,221)";

var clrRowHighlightBorder = "Silver";
var clrRowHighlightBackground = "WhiteSmoke";

var clrTabBackground = "RGB(205,213,221)";
var clrTabSelectBackground = "white";

var clrTabBorderBottom = "solid RGB(0,23,90) 1";

function HighlightRow(trRow, clrBorder, clrBackground){
	trRow.style.cursor = "hand";
	for (var i = 0; i < trRow.cells.length; i++){
		if (typeof(trRow.cells[i].style.oldBorderColor) == "undefined") {
			trRow.cells[i].style.oldBorderColor = trRow.cells[i].style.borderColor;
			trRow.cells[i].style.oldBackgroundColor = trRow.cells[i].style.backgroundColor;
		}
		trRow.cells[i].style.borderColor = clrBorder;
		trRow.cells[i].style.backgroundColor = clrBackground;
		if (trRow.cells[i].innerHTML == "")
			trRow.cells[i].innerHTML = "&nbsp;";
	}
}

function UnHighlightRow(trRow){
	trRow.style.cursor = "";
	for (var i = 0; i < trRow.cells.length; i++){
		if (typeof(trRow.cells[i].style.oldBorderColor) != "undefined") {
			trRow.cells[i].style.borderColor = trRow.cells[i].style.oldBorderColor;
			trRow.cells[i].style.backgroundColor = trRow.cells[i].style.oldBackgroundColor;
		}
	}
}

function MouseHover(x){

	if (typeof(x) == "undefined") {
		x = this;
	}
	
	x.oldClassName = x.className;
	x.className = x.className + "Hover";
}

function MouseOffHover(x){
	if (typeof(x) == "undefined") {
		x = this;
	}
	x.className = x.oldClassName;
}
