// *******************************************************************
// http://www.pcs.cnu.edu/~mbland/tnec.js
//
// Copyright 2001 Mike Bland.  All rights reserved.
//
// Contains the JavaScript code used in The New Electric Church.  Should've
// put it here a long time ago; don't know why I just now realized how to
// do this.
//
// Feel free to use portions of this code and modify it to suit your own
// purpose, but note that it comes with no warranty and with the understanding
// that you make use of it at your own risk.  And feel free to give credit
// where credit's due.
//
// Author:        Mike Bland (mbland@pcs.cnu.edu)
// Creation Date: Sunday, May 27, 2001
//
// Revision:      $Revision: 1.1 $
// Checked in by: $Author: mbland $
// Last modified: $Date: 2001/05/29 05:20:10 $
//
// $Log: tnec.js,v $
// Revision 1.1  2001/05/29 05:20:10  mbland
// Major revisions behind-the-scenes:  moved JavaScript links_show()
// function into new tnec.js, and altered *[(list)(layers)].html
// accordingly; added meta tags for "keywords" and "Author" on each
// page; added résumé, vitae, Konqueror issue page; removed old files
//
// *******************************************************************

// Contains the name of the last visible layer; must be initialized by
// the document calling the links_show() function
var last_visible  = "";


// -------------------------------------------------------------------
// links_show(string)
//
// Hides the currently visible layer and makes another visible when
// a certain link is passed over by the mouse.
//
// PRE:  last_visible has been initialized/set to the ID of one of the
//           div tags/elements in the parent.info.document object
//       assigned layer_str, which is an ID from one of the div
//           tags/elements in the parent.info.document object
//
// POST: if layer_str != last_visible, the layer corresponding to
//           last_visible is hidden and the layer corresponding to
//           layer_str is visible, and last_visible == layer_str
//       else nothing happens
// -------------------------------------------------------------------

function links_show(layer_str)
{
        if (layer_str == last_visible)
                return;

        if (document.getElementById) {
                // -------------------------------------------------
                // Must be Mozilla, Netscape 6, Konqueror, or Opera,
                // which use the W3C DOM
                // -------------------------------------------------

                document.getElementById(last_visible).style.visibility
                        = "hidden";
                document.getElementById(layer_str).style.visibility
                        = "visible";

                // -----------------------------------------------------
                // For some reason, Konqueror will not cooperate at all.
                // Hmm.
                // -----------------------------------------------------

        } else if (parent.info.document.layers) {
                // --------------
                // For Netscape 4
                // --------------

                document.layers[layer_str].visibility    = "show";
                document.layers[last_visible].visibility = "hide";

        } else if (parent.info.document.all) {
                // ------
                // For IE
                // ------

                document.all[layer_str].style.visibility    = "visible";
                document.all[last_visible].style.visibility = "hidden";
        }
        last_visible = layer_str;
}

// End of http://www.pcs.cnu.edu/~mbland/tnec.js
