﻿function EStyle(B, A, E, D) { this.stemImage = B; this.stemSize = A; this.boxClass = E; this.boxOffset = D; var C = navigator.userAgent.toLowerCase(); var F = 0; this.fudge = F; } function EWindow(B) { this.map = B; this.estyle = new EStyle("", new GSize(24, 24), "estyle", new GPoint(-10, 23)); this.visible = false; this.ie = false; var A = navigator.userAgent.toLowerCase(); if ((A.indexOf("msie") > -1) && (A.indexOf("opera") < 1)) { this.ie = true; } else { this.ie = false; } } EWindow.prototype.initialize = function(C) { var B = document.createElement("div"); B.style.position = "absolute"; C.getPane(google.maps.MAP_FLOAT_PANE).appendChild(B); var A = document.createElement("div"); A.style.position = "absolute"; A.style.width = this.estyle.stemSize.width + "px"; C.getPane(google.maps.MAP_FLOAT_PANE).appendChild(A); this.div1 = B; this.div2 = A; }; EWindow.prototype.openOnMap = function(A, B, D) { this.offset = D || new GPoint(0, 0); this.point = A; this.div1.innerHTML = '<div class="' + this.estyle.boxClass + '"><nobr>' + B + "</nobr></div>"; this.div2.innerHTML = "<div class='stem'>&nbsp;</div>"; var C = google.maps.Overlay.getZIndex(this.point.lat()); this.div1.style.zIndex = C; this.div2.style.zIndex = C + 1; this.visible = true; this.show(); this.redraw(true); }; EWindow.prototype.openOnMarker = function(A, C) { var D = A.getIcon().iconAnchor.x - A.getIcon().infoWindowAnchor.x; var B = A.getIcon().iconAnchor.y - A.getIcon().infoWindowAnchor.y; this.openOnMap(A.getPoint(), C, new GPoint(D, B)); }; EWindow.prototype.getInfoDiv = function() { return this.div1; }; EWindow.prototype.redraw = function(D) { if (!this.visible) { return; } var F = this.map.fromLatLngToDivPixel(this.point); var A = this.map.getBounds(); var G = this.map.fromLatLngToDivPixel(A.getSouthWest()); var E = this.map.fromLatLngToDivPixel(A.getNorthEast()); $common.removeCssClasses(this.div2, ["top", "bottom", "left", "right"]); this.div1.style.width = "200px"; this.div1.style.left = ""; this.div1.style.bottom = ""; this.div1.style.right = ""; this.div1.style.top = ""; this.div2.style.left = ""; this.div2.style.bottom = ""; this.div2.style.right = ""; this.div2.style.top = ""; var C = 10; var B = 10; if ((F.x - G.x) > (E.x - F.x)) { $common.addCssClasses(this.div2, ["left"]); this.div1.style.right = (-F.x + this.offset.x + this.estyle.boxOffset.x + C) + "px"; this.div2.style.right = (-F.x + this.offset.x + C) + "px"; } else { $common.addCssClasses(this.div2, ["right"]); this.div1.style.left = (F.x + this.offset.x + this.estyle.boxOffset.x + C) + "px"; this.div2.style.left = (F.x + this.offset.x + C) + "px"; } if ((G.y - F.y) < (F.y - E.y)) { $common.addCssClasses(this.div2, ["top"]); this.div1.style.bottom = (-F.y + this.offset.y + this.estyle.boxOffset.y + B) + "px"; this.div2.style.bottom = (-F.y + this.offset.y - this.estyle.fudge + B) + "px"; } else { $common.addCssClasses(this.div2, ["bottom"]); this.div1.style.top = (F.y + this.offset.y + this.estyle.boxOffset.y + B) + "px"; this.div2.style.top = (F.y + this.offset.y + B) + "px"; } }; EWindow.prototype.remove = function() { this.div1.parentNode.removeChild(this.div1); this.div2.parentNode.removeChild(this.div2); this.visible = false; }; EWindow.prototype.copy = function() { }; EWindow.prototype.show = function() { if (this.div1) { $common.setVisible(this.div1, true); } if (this.div2) { $common.setVisible(this.div2, true); } }; EWindow.prototype.hide = function() { if (this.div1) { $common.setVisible(this.div1, false); } if (this.div2) { $common.setVisible(this.div2, false); } }; EWindow.prototype.isHidden = function() { return !this.visible; }; EWindow.prototype.supportsHide = function() { return true; }; EWindow.prototype.zindex = function(A) { var B = google.maps.Overlay.getZIndex(this.point.lat()); this.div1.style.zIndex = B + A; this.div2.style.zIndex = B + 1 + A; };

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();