// http://nais.to/~yto/tools/css_tabs/

// bpref = tab body prefix, hpref = tab header prefix
function seltab(bpref, hpref, id_max, selected) {
  if (! document.getElementById) return;
  for (i = 0; i <= id_max; i++) {
    if (! document.getElementById(bpref + i)) continue;
    if (i == selected) {
      document.getElementById(bpref + i).style.visibility = "visible";
      document.getElementById(bpref + i).style.display = "inline"; // HB
      document.getElementById(bpref + i).style.position = "";
      document.getElementById(hpref + i).className = "open";
    } else {
      document.getElementById(bpref + i).style.visibility = "hidden";
      document.getElementById(bpref + i).style.display = "none"; // HB
      document.getElementById(bpref + i).style.position = "absolute";
      document.getElementById(hpref + i).className = "";
    }
  }
  window.scrollTo(0,0); // Scroll up to the top
  window.focus();
}

// Local Variables:
// mode: java
// End:

