
var rowVisible = false;

function toggleDisplay(tbl,btn,set) {
  var tblRows = document.getElementById(tbl).rows;
  for (i = 0; i < tblRows.length; i++) {
    var subString = (tblRows[i].className).substring(2,0);     
    if (set && subString != "nh") {
      tblRows[i].style.display = "none";
    } else if (subString != "nh") {
      //      alert(tblRows[i].style.display);
      tblRows[i].style.display = (rowVisible) ? "none" : "";
    }
  }
 
  if (set) {
    document.getElementById(btn).value = "Show Rows";
  } else {
    document.getElementById(btn).value = (rowVisible) ? "Show Rows" : "Hide Rows";
    rowVisible = !rowVisible;
  }

  //  alert(tblRows.length);
  //  alert(rowVisible);

}




