/* FILE ARCHIVED ON 14:33:52 Jan 16, 2009 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 17:37:18 Jul 5, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ window.onunload = GUnload; /** * Initializes map widget on this page after the document has been loaded */ YAHOO.util.Event.onDOMReady(function() { if (!GBrowserIsCompatible()) return; new Mozilla.Map(); }); // create namespace if (typeof Mozilla == 'undefined') { function Mozilla() {} } /** * Map widget */ Mozilla.Map = function() { this.map = new GMap2(document.getElementById("map")); this.map.setCenter(new GLatLng(37.421017, -122.090693), 15); this.map.addControl(new GSmallMapControl()); this.map.addControl(new GMapTypeControl()); this.locations = new Object(); var map_locations = document.getElementById('map_locations'); this.addLocations(map_locations); for (var i in this.locations) this.map.addOverlay(this.createMarkerEvent(i, this.locations[i])); this.goToLocation('mountain_view'); } // Creates a marker at the given point with the given number label Mozilla.Map.prototype.createMarkerEvent = function(name, loc) { GEvent.addListener(loc.marker, "click", function() { loc.marker.openInfoWindowHtml(loc.content); }); return loc.marker; } Mozilla.Map.prototype.addLocations = function(startNode) { for (var i = 0; i < startNode.childNodes.length; i++) { var loc = startNode.childNodes[i]; if (loc.nodeType == 1) { if (loc.className == 'map-address') this.addLocation(loc); else if (loc.childNodes.length > 0) this.addLocations(loc); } } } Mozilla.Map.prototype.addLocation = function(loc) { var map_links = document.getElementById('map_links'); var id = loc.id; var title_tag = loc.getElementsByTagName('h5')[0]; var title = title_tag.innerHTML; var lat_tag = loc.getElementsByTagName('span')[0]; var long_tag = loc.getElementsByTagName('span')[1]; if (lat_tag && long_tag) { var address = loc.getElementsByTagName('address')[0].innerHTML; this.locations[id] = new GLatLng( lat_tag.innerHTML, long_tag.innerHTML); this.locations[id].content = '