    /* Preload image for navigation hover */
    (new Image(198,30)).src = "themes/bluegray/images/marker_hover.jpg";

    /* This function opens a new browser window and directs it to open 
     * the URL specified in the href attribute of the html anchor 
     * element from which the function was invoked
     */
    function popuplogin(src) {
        var url = src.getAttribute('href');
        window.open(url,'_blank','width=400,height=300');
    }
    
    
    /* This function displays/hides a sub-menu in response to
     * mouse-clicks within the containing html document
     *
     * Requirements and limitations:
     *  - only designed for a two-level menu
     *  - menu must be contained in a html list (ul/ol) with id="nav"
     *  - menu items must be html list items (li elements)
     *  - 2nd-level menus must be contained in html lists (ul/ol)
     *  - All CSS style sheets in use must contain declarations 
     *    such as the following for the 2nd-level menu lists:
     *      li ul { display: none; position: absolute ... }
     *      li.over ul { display: block ... }
    */
    toggle = function (e) {
        // Get the navigation list items
        var navItemList = new Array();
        var navRoot = null;
        var childNodes = null;
        var node = null;

        // adapt to ie4 or w3c dom
        if (document.getElementById) {
            navRoot = document.getElementById("nav");
            navChildren = navRoot.childNodes;
        } else if (document.all) {
            navRoot = document.all["nav"];
            navChildren = navRoot.children;
        }

        // Extract list items elements within the #nav division
        for (i=0; i<navChildren.length; i++) {
            node = navChildren[i];
            if ( ((document.getElementById) && (node.nodeName=="LI"))
                 || ((document.all) && (node.tagName=="LI")) ) {
                navItemList = navItemList.concat(node);
            }
        }

        // Get the element that is the event source (adjusting for the
        // possibility that this may be the child element of the menu 
        // list item which is our real object of interest)
        if (!e) e=window.event;
        elm = (e.target) ? e.target : (e.srcElement) ? e.srcElement : "";
        if (elm) {
            if ( (document.getElementById) && !(elm.nodeName == "LI") ) {
                elm=elm.parentNode;
            } else if ( (document.all) && !(elm.tagName == "LI") ) {
                elm=elm.parentElement;
            }
        }

        // Now compare the event source with the nav items. A match means
        // the user clicked on a menu selector, so its (and only its)
        // sub-menu should be shown; non-matching menus should be hidden
        for (i=0; i<navItemList.length; i++) {
            node = navItemList[i];
            if (node == elm) {
                node.className=((node.className=="over") ?"" :"over");
            } else {
                node.className="";
            }
        }
    }//end function

    /* Attaches the toggle function to the body */
    startList = function() {
        document.body.onclick=toggle;
    }//end function
    
    /* Attaches init function to window so it will be run when page loaded */
    window.onload=startList;
