<!--   Hide from JavaScript-impaired browsers


//-- enable redisplay options after page is fully loaded
//function pageLoaded() {
   //if (document.w3hdprods && document.w3hdprods.redisplay) {
      //for (var i =0;i<document.w3hdprods.redisplay.length;i++) {
         //document.w3hdprods.redisplay[i].disabled=false;
      //}
      //document.w3hdprods.requery.disabled=false;
   //}
//}

function incrementCount(tablename) {
      
      var cellID=tablename + 'CC';
      var nameCellID=tablename + 'NC';
      var cc=document.getElementById(nameCellID);

      if (document.getElementById) {
        var current_cellID=document.getElementById(cellID);
        if (current_cellID != null) {  //will be null if only one browse table
           // grab and increment current table count.  
           // if it is blank make it 0 first.
           var currentCount= document.getElementById(cellID).innerHTML;
           var re=/[0-9]/;
           if (!currentCount.match(re) )  {currentCount=0;}
           //if (currentCount == " ")  {currentCount=0;}
           currentCount = parseInt(currentCount);
           document.getElementById(cellID).innerHTML= currentCount+1;

           //-- Change background color for full cell
           document.getElementById(cellID).parentNode.parentNode.parentNode.parentNode.style.backgroundColor= "#DDDDFF";
           document.getElementById(cellID).parentNode.parentNode.parentNode.style.backgroundColor= "#DDDDFF";
         }
       }
}  // end incrementCount

function changeLink() {
      var tablename="counttableTB";
      if (document.getElementById ) {
        var tableEl=document.getElementById(tablename);
        if (tableEl != null ) {
          var tableInRow;
          var currname;
          var currtable;
          var openindex;
          var closeindex;
          var newhtml;
          var linkname;
          var numrows=tableEl.rows.length;
          //--- nunmber of meaningful rows is 2 less than total
          for (i=2; i < tableEl.rows.length*2; i++) {
             var c=i-2;
             currtable= "counttable"+c;
             tableInRow=document.getElementById(currtable);
             if (tableInRow != null) {
               currname= tableInRow.rows[0].cells[0].innerHTML;
               //openindex=currname.lastIndexOf('(');
               //closeindex=currname.lastIndexOf(')');
               //--- Find table name from table content. This will need to 
               //--- change if content changes
               openindex=currname.indexOf('<b>');
               closeindex=currname.indexOf('</b>:');
               linkname=currname.substring(openindex+3,closeindex);
       
               //  if total is blank change to 0
               if (tableInRow.rows[0].cells[1].innerHTML == " ") {
                   tableInRow.rows[0].cells[1].innerHTML = 0 
               }
               //  if total greater than 0 change table name to anchor link
               if (parseInt(tableInRow.rows[0].cells[1].innerHTML) > 0) {
                  newhtml="<a href='#" + linkname + "'>" +currname + "</a>"
                  tableInRow.rows[0].cells[0].innerHTML=newhtml;
               } 
            }
          }
        }
      }
      window.focus();
}
// -- End of hiding the JavaScript code -------------- -->
