var activeRow = false;

function highlightTableRow()
{
  if(this!=activeRow){
    this.setAttribute('origCl', this.className);
    this.origCl = this.className;
  }
  this.className = 'hilite';
  activeRow = this;
}

function resetRowStyle()
{
  var origCl = this.getAttribute('origCl');
  if(!origCl)origCl = this.origCl;
  this.className=origCl;
}

function addTableRolloverEffect(tableId, whichClass)
{
  var tableObj = document.getElementById(tableId);
  var tBody = tableObj.getElementsByTagName('TBODY');
  if(tBody){
    var rows = tBody[0].getElementsByTagName('TR');
  }else{
    var rows = tableObj.getElementsByTagName('TR');
  }
  for(var no=0;no<rows.length;no++){
    rows[no].onmouseover = highlightTableRow;
    rows[no].onmouseout = resetRowStyle;
  }

}
