function tableruler() {
  //check to see if the browser supports the DOM
  if(document.getElementById && document.createTextNode){
    var tables=document.getElementsByTagName("table");
    for(var q=0;q<tables.length;q++) {
      if(tables[q].className=="ruler"){
        var trs= tables[q].getElementsByTagName("tr");
        for(var s=0;s<trs.length;s++){
          if((trs[s].parentNode.nodeName=="TBODY" || trs[s].parentNode.nodeName=="TABLE") && (trs[s].parentNode.nodeName!="TFOOT"&& trs[s].parentNode.nodeName!="THEAD")){
						trs[s].onclick=function(){reportSubmit(this.id)}
          //add the hilite class to the existing class
            trs[s].onmouseover=function(){this.className+=" hilite";return false}
          //remove the hilite class from the element, but do leave in place the class that was there
            trs[s].onmouseout=function(){if(String(this.className).indexOf("hilite")>=0) var newClass=""; var thisClass=this.className.split(" ");for(var i=0;i<thisClass.length;i++){if(thisClass[i]!='hilite') newClass+=thisClass[i]+" "} this.className=newClass;return false}
//            code that worked before:  trs[s].onmouseout=function(){this.className='tolite';return false}
          }
        }
      }
    }
  }
}
window.onload=function(){tableruler();formSubmit()}