// JavaScript Document //THIS FILE IS FOR GOOGLE MAPS VERSION 3 MapInfoWindow = new google.maps.InfoWindow(); function Overlay(map, buttonId, properties) { this.visible = false; this.map = map; this.buttonId = buttonId; if (properties == null) { this.properties = {}; } else { this.properties = properties; } if (typeof(this.properties.zIndexProcess) == 'undefined') { this.properties.zIndexProcess = this.getMarkerZIndex; } this.overlays = new Array(); } Overlay.prototype.show = function() { if(!this.visible) { this.loadOverlays(); var element = document.getElementById(this.buttonId); if (element != null) {element.style.backgroundColor='#FF9';} this.visible = true; } } Overlay.prototype.hide = function() { //add display code here if(this.visible) { for (i in this.overlays) { this.overlays[i].setMap(null); } this.overlays = new Array(); var element = document.getElementById(this.buttonId); element.style.backgroundColor='#fff'; this.visible = false; } } Overlay.prototype.toggle = function() { if (this.visible) { this.hide(); } else { this.show(); } } Overlay.prototype.addGGeoXML = function(URL) { this.addOverlay(new google.maps.KmlLayer({url:URL, map: this.map, preserveViewport: true})); } Overlay.prototype.addOverlay = function(overlay) { this.overlays[this.overlays.length] = overlay; } Overlay.prototype.addMarker = function (latitude, longitude, title, theHTML, markerProperties) { var markerIcon = this.properties.icon; var markerType = this.properties.markerType; if (typeof(this.properties.markerType) != 'undefined')// so can specify which group the marker belongs to (like a key) {theHTML = '