
  // SCRIPT:   Nav/Menu Rollover Effects
  // Filename: navmenu.js
  // Purpose:  Rollover effects for various navigation menus
  //
  // Author:   Deborah Lee Soltesz, USGS, 09/2003


      ns4 = (document.layers) ? true:false ;
      if (ns4 == false) {
        activePageObject = document.getElementById (["home"]) ;
      }

      originalColor = "#FFFFFF" ;
      originalBorderColor = "#FFFFFF" ;


  // *****************************************************************
  // Main Vertical Menus

      function buttonMenuHighlightColor (object) {
        if (activePageObject != object) {
          originalColor = object.style.backgroundColor ;
          object.style.backgroundColor = '#0088AA' ;
          object.style.borderStyle = 'inset' ;
        }
      }

      function buttonRestoreColor (object) {
        if (activePageObject != object) {
          object.style.backgroundColor = originalColor ;
          object.style.borderStyle = 'outset' ;
        }
      }


  // *****************************************************************
  // Horizontal Navigation Menus

      function navMenuHighlightColor (object) {
        originalColor = object.style.backgroundColor ;
        originalBorderColor = object.style.borderColor ;

        object.style.backgroundColor = '#006688' ;
        object.style.borderColor = '#66CCDD' ;
      }

      function navRestoreColor (object) {
        object.style.backgroundColor = originalColor ;
        object.style.borderColor = originalBorderColor ;
      }

  // *****************************************************************
  // Write Vertical Menu

      function writeMainNavMenu () {
        if (ns4 == false) {
          document.write (
            " <table class=\"menuButtonTable\">                                                                                                                                " +
            "   <tr>                                                                                                                                                           " +
            "     <td onclick=\"document.location = '/';\" id=\"home\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">               " +
            "       <a href=\"/\" title=\"GLIMS Home Page\">                                                                                                                   " +
            "       Home</a>                                                                                                                                                   " +
            "     </td>                                                                                                                                                        " +
            "   </tr>                                                                                                                                                          " +
            "   <tr>                                                                                                                                                           " +
            "     <td onclick=\"document.location = '/About/';\" id=\"about\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">        " +
            "       <a href=\"/About/\">                                                                                                                                       " +
            "       More About GLIMS</a>                                                                                                                                            " +
            "     </td>                                                                                                                                                        " +
            "    </tr>                                                                                                                                                         " +
            "     <td onclick=\"document.location = 'http://glims.colorado.edu/glacierdata/';\" id=\"dataaccess\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">    " +
            "       <a href=\"http://glims.colorado.edu/glacierdata/\" title=\"Search and download data from the GLIMS Glacier Database\">                                     " +
            "       Data Access</a>                                                                                                                                            " +
            "     </td>                                                                                                                                                        " +
            "    </tr>                                                                                                                                                         " +
            "   <tr>                                                                                                                                                           " +
            "     <td onclick=\"document.location = '/MapsAndDocs/';\" id=\"docs\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">               " +
            "       <a href=\"/MapsAndDocs/\" title=\"Documentation related to data acquisition and management, database design, and technical information\">                  " +
            "       Documentation / RC Resources</a>                                                                                                                                          " +
            "     </td>                                                                                                                                                        " +
            "   </tr>                                                                                                                                                          " +
            "   <tr>                                                                                                                                                           " +
            "     <td onclick=\"document.location = '/Publications/';\" id=\"pubs\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">                   " +
            "       <a href=\"/Publications/\" title=\"Refereed publications and public presentations\">                                                                       " +
            "       Publications and Presentations</a>                                                                                                                         " +
            "     </td>                                                                                                                                                        " +
            "    </tr>                                                                                                                                                         " +
            "   <tr>                                                                                                                                                           " +
            "     <td onclick=\"document.location = '/Workshops/';\" id=\"workshops\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">                " +
            "       <a href=\"/Workshops/\">                                                                                                                                   " +
            "       Workshops and Meetings</a>                                                                                                                                 " +
            "     </td>                                                                                                                                                        " +
            "    </tr>                                                                                                                                                         " +
            "   </tr>                                                                                                                                                          " +
            "   <tr>                                                                                                                                                           " +
            "     <td onclick=\"document.location = 'https://nsidc.org/mailman/listinfo/glims';\" id=\"MailingList\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">        " +
            "       <a href='https://nsidc.org/mailman/listinfo/glims'>                                                                                                              " +
            "       Mailing List</a>                                                                                                                                                  " +
            "     </td>                                                                                                                                                        " +
            "    </tr>                                                                                                                                                         " +
            "   <tr>                                                                                                                                                           " +
            "     <td onclick=\"document.location = '/GLIMSView/';\" id=\"software\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">                      " +
            "       <a href=\"/GLIMSView/\">                                                                                              " +
            "       Software (GLIMSView)</a>                                                                                                                                   " +
            "     </td>                                                                                                                                                        " +
            "    </tr>                                                                                                                                                         " +
            "   <tr>                                                                                                                                                           " +
            "     <td onclick=\"document.location = '/glims/contactInfo.php';\" id=\"contacts\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">                      " +
            "       <a href=\"/glims/contactInfo.php\">                                                                                              " +
            "       Contact</a>                                                                                                                                   " +
            "     </td>                                                                                                                                                        " +
            "    </tr>                                                                                                                                                         " +
            " </table>                                                                                                                                                         "
          );
        }
        else {
          document.write (
              "<a href=\"/\" title=\"GLIMS Home Page\">" +
              "Home</a><br />" +
              "<a href=\"/About/\">" +
              "More About GLIMS</a><br />" +
              "<a href=\"http://glims.colorado.edu/glacierdata/\" title=\"Search and download data from the GLIMS Glacier Database\">" +
              "Data Access</a><br />" +
              "<a href=\"/MapsAndDocs/\" title=\"Documentation related to data acquisition and management, database design, and technical information\">" +
              "Documentation / RC Resources</a><br />" +
              "<a href=\"/Publications/\">" +
              "Publications and Presentations</a><br />" +
              "<a href=\"/Workshops/\">" +
              "Workshops and Meetings</a><br />" +
              "<a href='https://nsidc.org/mailman/listinfo/glims'>" +
              "Mailing List</a><br />" +
              "<a href=\"http://glims.org/GLIMSView/\">" +
              "Software (GLIMSView)</a><br />" +
              "<a href=\"/glims/contactInfo.php\">" +
              "Contact</a><br />"
          );
        }

      }


      function writeHorizNavMenu() {
        document.write (
          "       <!-- menu buttons -->                                                                                                                                          " +
          "       <table class=\"navTable\">                                                                                                                                     " +
          "         <tr>                                                                                                                                                         " +
          "           <td onclick=\"document.location = 'http://www.glims.org/';\"  onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">          " +
          "             <a href=\"http://www.glims.org/\" title=\"GLIMS Home Page\">                                                                                             " +
          "             Home</a>                                                                                                                                                 " +
          "           </td>                                                                                                                                                      " +
          "           <td onclick=\"document.location = 'http://www.glims.org/About/';\"  onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">    " +
          "             <a href=\"http://www.glims.org/About/\" title=\"Learn more about the GLIMS project, organization, and participants\">                                    " +
          "             More About GLIMS</a>                                                                                                                                          " +
          "           </td>                                                                                                                                                      " +
          "           <td onclick=\"document.location = 'http://glims.colorado.edu/glacierdata/';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\"> "+
          "             <a href=\"http://glims.colorado.edu/glacierdata/\" title=\"Search and download data from the GLIMS Glacier Database\">                                   " +
          "             Data Access</a>                                                                                                                                          " +
          "           </td>                                                                                                                                                      " +
          "           <td onclick=\"document.location = 'http://www.glims.org/MapsAndDocs/';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">  " +
          "             <a href=\"http://www.glims.org/MapsAndDocs/\" title=\"Documentation related to data acquisition and management, database design, and technical information\"> " +
          "             Documentation / RC Resources</a>                                                                                                                                        " +
          "           </td>                                                                                                                                                      " +
          "           <td onclick=\"document.location = '/Publications/';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">                  " +
          "             <a href=\"/Publications/\" title=\"Refereed publications and presentations\">                                                                            " +
          "             Publications and Presentations</a>                                                                                                                       " +
          "           </td>                                                                                                                                                      " +
          "           <td onclick=\"document.location = '/Workshops/';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">                     " +
          "             <a href=\"/Workshops/\">                                                                                                                                 " +
          "             Workshops and Meetings</a>                                                                                                                               " +
          "           </td>                                                                                                                                                      " +
          "           <td onclick=\"document.location = 'https://nsidc.org/mailman/listinfo/glims';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\"> " +
          "             <a href='https://nsidc.org/mailman/listinfo/glims' title='Mailing List'>                                                               " +
          "             Mailing List</a>                                                                                                                                                " +
          "           </td>                                                                                                                                                      " +
          "           <td onclick=\"document.location = '/GLIMSView/';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">                     " +
          "             <a href=\"/GLIMSView/\">                                                                                                                                 " +
          "             Software (GLIMSView)</a>                                                                                                                               " +
          "           </td>                                                                                                                                                      " +
          "           <td onclick=\"document.location = '/glims/contactInfo.php';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">                     " +
          "             <a href=\"/glims/contactInfo.php\">                                                                                                                                 " +
          "             Contact</a>                                                                                                                               " +
          "           </td>                                                                                                                                                      " +
          "         </tr>                                                                                                                                                        " +
          "       </table>                                                                                                                                                       "
        );
      }

      // *****************************************************************
      // Highlight Active Page Button in vertical menu

      function highlightActivePageButton (buttonID) {
        if (ns4 == false) {
          buttonObject = document.getElementById ([buttonID]) ;
          buttonObject.className = "buttonMenuHighlight" ;
          activePageObject = buttonObject ;
        }
      }

