PageSourceSearch

https://www.glims.org/assets/scripts/navmenu.js

js glims.org collected 2026-10-01 10:19:52 UTC 20,927 bytes, 198 lines download raw bytes

1
2  // SCRIPT:   Nav/Menu Rollover Effects
3  // Filename: navmenu.js
4  // Purpose:  Rollover effects for various navigation menus
5  //
6  // Author:   Deborah Lee Soltesz, USGS, 09/2003
7
8
9      ns4 = (document.layers) ? true:false ;
10      if (ns4 == false) {
11        activePageObject = document.getElementById (["home"]) ;
12      }
13
14      originalColor = "#FFFFFF" ;
15      originalBorderColor = "#FFFFFF" ;
16
17
18  // *****************************************************************
19  // Main Vertical Menus
20
21      function buttonMenuHighlightColor (object) {
22        if (activePageObject != object) {
23          originalColor = object.style.backgroundColor ;
24          object.style.backgroundColor = '#0088AA' ;
25          object.style.borderStyle = 'inset' ;
26        }
27      }
28
29      function buttonRestoreColor (object) {
30        if (activePageObject != object) {
31          object.style.backgroundColor = originalColor ;
32          object.style.borderStyle = 'outset' ;
33        }
34      }
35
36
37  // *****************************************************************
38  // Horizontal Navigation Menus
39
40      function navMenuHighlightColor (object) {
41        originalColor = object.style.backgroundColor ;
42        originalBorderColor = object.style.borderColor ;
43
44        object.style.backgroundColor = '#006688' ;
45        object.style.borderColor = '#66CCDD' ;
46      }
47
48      function navRestoreColor (object) {
49        object.style.backgroundColor = originalColor ;
50        object.style.borderColor = originalBorderColor ;
51      }
52
53  // *****************************************************************
54  // Write Vertical Menu
55
56      function writeMainNavMenu () {
57        if (ns4 == false) {
58          document.write (
59            " <table class=\"menuButtonTable\">                                                                                                                                " +
60            "   <tr>                                                                                                                                                           " +
61            "     <td onclick=\"document.location = '/';\" id=\"home\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">               " +
62            "       <a href=\"/\" title=\"GLIMS Home Page\">                                                                                                                   " +
63            "       Home</a>                                                                                                                                                   " +
64            "     </td>                                                                                                                                                        " +
65            "   </tr>                                                                                                                                                          " +
66            "   <tr>                                                                                                                                                           " +
67            "     <td onclick=\"document.location = '/About/';\" id=\"about\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">        " +
68            "       <a href=\"/About/\">                                                                                                                                       " +
69            "       More About GLIMS</a>                                                                                                                                            " +
70            "     </td>                                                                                                                                                        " +
71            "    </tr>                                                                                                                                                         " +
72            "     <td onclick=\"document.location = '/glacierdata/index.php';\" id=\"dataaccess\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">    " +
73            "       <a href=\"/glacierdata/index.php\" title=\"Search and download data from the GLIMS Glacier Database\">                                     " +
74            "       Data Access</a>                                                                                                                                            " +
75            "     </td>                                                                                                                                                        " +
76            "    </tr>                                                                                                                                                         " +
77            "   <tr>                                                                                                                                                           " +
78            "     <td onclick=\"document.location = '/MapsAndDocs/';\" id=\"docs\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">               " +
79            "       <a href=\"/MapsAndDocs/\" title=\"Documentation related to data acquisition and management, database design, and technical information\">                  " +
80            "       Documentation / RC Resources</a>                                                                                                                                          " +
81            "     </td>                                                                                                                                                        " +
82            "   </tr>                                                                                                                                                          " +
83            "   <tr>                                                                                                                                                           " +
84            "     <td onclick=\"document.location = '/Publications/index.php';\" id=\"pubs\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">                   " +
85            "       <a href=\"/Publications/index.php\" title=\"Refereed publications and public presentations\">                                                                       " +
86            "       Publications and Presentations</a>                                                                                                                         " +
87            "     </td>                                                                                                                                                        " +
88            "    </tr>                                                                                                                                                         " +
89            "   <tr>                                                                                                                                                           " +
90            "     <td onclick=\"document.location = '/Workshops/';\" id=\"workshops\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">                " +
91            "       <a href=\"/Workshops/\">                                                                                                                                   " +
92            "       Workshops and Meetings</a>                                                                                                                                 " +
93            "     </td>                                                                                                                                                        " +
94            "    </tr>                                                                                                                                                         " +
95            "   </tr>                                                                                                                                                          " +
96            "   <tr>                                                                                                                                                           " +
97            "     <td onclick=\"document.location = 'https://nsidc.org/lists/mailman/lists/glims.nsidc.org/';\" id=\"MailingList\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">        " +
98            "       <a href='https://nsidc.org/lists/mailman/lists/glims.nsidc.org'>                                                                                                              " +
99            "       Mailing List</a>                                                                                                                                                  " +
100            "     </td>                                                                                                                                                        " +
101            "    </tr>                                                                                                                                                         " +
102            "   <tr>                                                                                                                                                           " +
103            "     <td onclick=\"document.location = '/Software/';\" id=\"software\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">                      " +
104            "       <a href=\"/Software/\">                                                                                              " +
105            "       Software </a>                                                                                                                                   " +
106            "     </td>                                                                                                                                                        " +
107            "    </tr>                                                                                                                                                         " +
108            "   <tr>                                                                                                                                                           " +
109            "     <td onclick=\"document.location = 'http://www.glims.org/maps/contact_info.html';\" id=\"contacts\" onmouseover=\"buttonMenuHighlightColor(this);\" onmouseout=\"buttonRestoreColor(this);\">                      " +
110            "       <a href=\"http://www.glims.org/maps/contact_info.html\">                                                                                              " +
111            "       Contact</a>                                                                                                                                   " +
112            "     </td>                                                                                                                                                        " +
113            "    </tr>                                                                                                                                                         " +
114            " </table>                                                                                                                                                         "
115          );
116        }
117        else {
118          document.write (
119              "<a href=\"/\" title=\"GLIMS Home Page\">" +
120              "Home</a><br />" +
121              "<a href=\"/About/\">" +
122              "More About GLIMS</a><br />" +
123              "<a href=\"/glacierdata/index.php\" title=\"Search and download data from the GLIMS Glacier Database\">" +
124              "Data Access</a><br />" +
125              "<a href=\"/MapsAndDocs/\" title=\"Documentation related to data acquisition and management, database design, and technical information\">" +
126              "Documentation / RC Resources</a><br />" +
127              "<a href=\"/Publications/index.php\">" +
128              "Publications and Presentations</a><br />" +
129              "<a href=\"/Workshops/\">" +
130              "Workshops and Meetings</a><br />" +
131              "<a href='https://nsidc.org/mailman/listinfo/glims'>" +
132              "Mailing List</a><br />" +
133              "<a href=\"/Software/\">" +
134              "Software </a><br />" +
135              "<a href=\"http://www.glims.org/maps/contact_info.html\">" +
136              "Contact</a><br />"
137          );
138        }
139
140      }
141
142
143      function writeHorizNavMenu() {
144        document.write (
145          "       <!-- menu buttons -->                                                                                                                                          " +
146          "       <table class=\"navTable\">                                                                                                                                     " +
147          "         <tr>                                                                                                                                                         " +
148          "           <td onclick=\"document.location = 'http://www.glims.org/';\"  onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">          " +
149          "             <a href=\"http://www.glims.org/\" title=\"GLIMS Home Page\">                                                                                             " +
150          "             Home</a>                                                                                                                                                 " +
151          "           </td>                                                                                                                                                      " +
152          "           <td onclick=\"document.location = '/About/';\"  onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">    " +
153          "             <a href=\"/About/\" title=\"Learn more about the GLIMS project, organization, and participants\">                                    " +
154          "             More About GLIMS</a>                                                                                                                                          " +
155          "           </td>                                                                                                                                                      " +
156          "           <td onclick=\"document.location = '/glacierdata/index.php';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\"> "+
157          "             <a href=\"/glacierdata/index.php\" title=\"Search and download data from the GLIMS Glacier Database\">                                   " +
158          "             Data Access</a>                                                                                                                                          " +
159          "           </td>                                                                                                                                                      " +
160          "           <td onclick=\"document.location = '/MapsAndDocs/';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">  " +
161          "             <a href=\"/MapsAndDocs/\" title=\"Documentation related to data acquisition and management, database design, and technical information\"> " +
162          "             Documentation / RC Resources</a>                                                                                                                                        " +
163          "           </td>                                                                                                                                                      " +
164          "           <td onclick=\"document.location = '/Publications/index.php';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">                  " +
165          "             <a href=\"/Publications/index.php\" title=\"Refereed publications and presentations\">                                                                            " +
166          "             Publications and Presentations</a>                                                                                                                       " +
167          "           </td>                                                                                                                                                      " +
168          "           <td onclick=\"document.location = '/Workshops/';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">                     " +
169          "             <a href=\"/Workshops/\">                                                                                                                                 " +
170          "             Workshops and Meetings</a>                                                                                                                               " +
171          "           </td>                                                                                                                                                      " +
172          "           <td onclick=\"document.location = 'https://nsidc.org/mailman/listinfo/glims';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\"> " +
173          "             <a href='https://nsidc.org/mailman/listinfo/glims' title='Mailing List'>                                                               " +
174          "             Mailing List</a>                                                                                                                                                " +
175          "           </td>                                                                                                                                                      " +
176          "           <td onclick=\"document.location = '/Software/';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">                     " +
177          "             <a href=\"/Software/\">                                                                                                                                 " +
178          "             Software </a>                                                                                                                               " +
179          "           </td>                                                                                                                                                      " +
180          "           <td onclick=\"document.location = 'http://www.glims.org/maps/contact_info.html';\" onmouseover=\"navMenuHighlightColor(this);\" onmouseout=\"navRestoreColor(this);\">                     " +
181          "             <a href=\"http://www.glims.org/maps/contact_info.html\">                                                                                                                                 " +
182          "             Contact</a>                                                                                                                               " +
183          "           </td>                                                                                                                                                      " +
184          "         </tr>                                                                                                                                                        " +
185          "       </table>                                                                                                                                                       "
186        );
187      }
188
189      // *****************************************************************
190      // Highlight Active Page Button in vertical menu
191
192      function highlightActivePageButton (buttonID) {
193        if (ns4 == false) {
194          buttonObject = document.getElementById ([buttonID]) ;
195          buttonObject.className = "buttonMenuHighlight" ;
196          activePageObject = buttonObject ;
197        }
198      }

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.