function toggleVis(where, pval, nval) {
  // Set the default "show" mode to that specified by W3C DOM
  // compliant browsers
  var showMode = 'table-cell';
  // However, IE5 at least does not render table cells correctly
  // using the style 'table-cell', but does when the style 'block'
  // is used, so handle this
  if (document.all) showMode='block';

    cells = document.getElementsByName('hideit');
    var table = document.getElementById(where.attributes.rel.value);
    where.value = (where.value == pval) ? nval : pval;
    mode = (table.style.display == showMode) ? 'none' : showMode;
    // Apply the style to the CSS display property for the cells

    for(j = 0; j < cells.length; j++) cells[j].style.display = mode;
}
