      // <![CDATA[

      // Tab menu functions by Jack Letourneau, February 2002
      // http://eigengrau.com/

      function switchOn(tab,contents) {

        // Pass it a tab ID and a contents ID, single-quoted:
        // switchOn('tab1','contents1')

        // Sets all tabs and contents to inactive state, then
        // activates the tab/contents passed as parameters

        //switchAllOff();
        document.getElementById(tab).className = 'selectedtab';
        document.getElementById(contents).className = 'selectedcontents';
      }

      function clearTop() {

        // Sets all tabs to inactive state. Depends on the TR
        // enclosing the tabs having ID "toprow"

        topRow = document.getElementById('toprow');
        tabArray = topRow.childNodes;
        for (var i=0; i<tabArray.length; i++) {
          if (tabArray[i].className != 'tabspacer') {
            tabArray[i].className = 'tab';
          }
        }
      }

      function clearContents() {

        // Hides all DIVs in TD ID="contentscell"

        contentsCell = document.getElementById('contentscell');
        contentsArray = contentsCell.childNodes;
        for (var j=0; j<contentsArray.length; j++) {
          contentsArray[j].className = 'contents';
        }
      }

      function switchAllOff() {

        // Trivial little wrapper function; sets all tabs and
        // contents to inactive/invisible state

        clearTop();
        clearContents();
      }

      // ]]>

