initializeTableRuler = function tableRuler() {
  var tables = document.getElementsByTagName('table');
  for (var i = 0; i < tables.length; i++) {
    if (tables[i].className == 'vertical') {
      var trs = tables[i].getElementsByTagName('tr');
      for (var j = 0; j < trs.length; j++) {
        trs[j].onmouseover = function() {
          this.className += ' over';
          return false;
        }
        trs[j].onmouseout = function() {
          this.className = this.className.replace(' over', '');
        }
      }
    }
  }
}
window.onload = initializeTableRuler;

