var normBG = '#ffffff';
var altBG = '#eeeeee';
var hoverBG = '#dae9ff';


function hoverRow(tableId) {
	var curTable=null;
	var tableBody=null;
	var tableRow=null;
	
	curTable = document.getElementById(tableId);
	//alert(curTable.nodeName);
	tableBody = curTable.childNodes[0];
	
	for(i=0; i<tableBody.childNodes.length; i++) {  // loop through all rows
		tableRow=tableBody.childNodes[i];
		//alert(tableRow.nodeName);
		if((tableRow.className != 'nohov') && (tableRow.className != 'altnohov') && (tableRow.className != 'heading') ) {
			tableRow.onmouseover = function() {
				this.className+="over";
				//alert(this.className);
			}
			tableRow.onmouseout = function() {
				this.className = this.className.replace("over", "");
			}
		}
	}
}
			

function hoverCell(tableId) {
	var curTable=null;
	var tableBody=null;
	var tableRow=null;
	var tableCell=null;
	
	curTable = document.getElementById(tableId);
	//alert(curTable.nodeName);
	tableBody = curTable.childNodes[0];
	
	for(i=0; i<tableBody.childNodes.length; i++) {  // loop through all rows
		tableRow=tableBody.childNodes[i];
		//alert(tableRow.nodeName);
		if((tableRow.className != 'nohov') && (tableRow.className != 'altnohov') && (tableRow.className != 'heading') ) {
			
			for(j=0; j<tableRow.childNodes.length; j++) { // loop through cells in row
				tableCell=tableRow.childNodes[j];
				
				if(tableCell.className != 'last') {
					tableCell.onmouseover=function() {
						this.style.background=hoverBG;
					}
					if(tableRow.className == 'norm') {
						tableCell.onmouseout = function() {
							this.style.background = normBG;
						}
					}
					else {
						tableCell.onmouseout = function() {
							this.style.background = altBG;
						}
					}
				}
			}
		}
	}
}
			




/*

tabHover = function(className) {

	var tableArray = new Array();
	
	tableArray=getTableClass(className);

	for(i=0; i<tableArray.length; i++) {

		curTable=tableArray[i];

		tbody=curTable.childNodes[0];

		//alert(tbody.nodeName);

		for(j=0; j<tbody.childNodes.length; j++) {

			trow = tbody.childNodes[j];

			alert(trow.className);

			if((trow.nodeName=='TR') && (trow.className!='heading' || trow.className!='nohov')) {

				trow.onmouseover=function() {

					this.className+="-over";

				}

				trow.onmouseout=function() {

					this.className=this.className.replace("-over", "");
*/