function EStyle(a,b,c,d){this.stemImage=a;this.stemSize=b;this.boxClass=c;this.boxOffset=d;a=navigator.userAgent.toLowerCase();b=5;if(a.indexOf("opera/9")>-1)b=4;else if(a.indexOf("opera")>-1)b=3;else if(a.indexOf("firefox/3")>-1)b=4;else if(a.indexOf("firefox")>-1)b=5;else if(a.indexOf("chrome")>-1)b=5;else if(a.indexOf("safari")>-1)b=5;else if(a.indexOf("msie")>-1)b=0;this.fudge=b}var E_STYLE_7=$("div#map").hasClass("cs")?new EStyle("/images/empty.gif",new GSize(0,0),"mapBubble",new GPoint(-150,-20)):new EStyle("/images/empty.gif",new GSize(0,0),"mapBubbleSk",new GPoint(-150,-20));function EWindow(a,b){this.map=a;this.estyle=b;this.ie=this.visible=false;var c=navigator.userAgent.toLowerCase();this.ie=c.indexOf("msie")>-1&&c.indexOf("opera")<1?true:false}EWindow.prototype=new GOverlay;EWindow.prototype.initialize=function(a){var b=document.createElement("div");b.style.position="absolute";a.getPane(G_MAP_FLOAT_PANE).appendChild(b);var c=document.createElement("div");c.style.position="absolute";c.style.width=this.estyle.stemSize.width+"px";a.getPane(G_MAP_FLOAT_PANE).appendChild(c);this.div1=b;this.div2=c};EWindow.prototype.openOnMap=function(a,b,c){this.offset=c||new GPoint(0,0);this.point=a;this.div1.innerHTML='<div class="'+this.estyle.boxClass+'"><nobr><div class="inner">'+b+"</nobr></div></div>";this.div2.innerHTML=this.ie&&this.estyle.stemImage.toLowerCase().indexOf(".png")>-1?'<div style="height:'+this.estyle.stemSize.height+"px; width:"+this.estyle.stemSize.width+"px; "+("filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.estyle.stemImage+"', sizingMethod='scale');")+'" ></div>':'<img src="'+this.estyle.stemImage+'" width="'+this.estyle.stemSize.width+'" height="'+this.estyle.stemSize.height+'">';a=GOverlay.getZIndex(this.point.lat());this.div1.style.zIndex=a;this.div2.style.zIndex=a+1;this.visible=true;this.show();this.redraw(true)};EWindow.prototype.openOnMarker=function(a,b){var c=a.getIcon().iconAnchor.x-a.getIcon().infoWindowAnchor.x,d=a.getIcon().iconAnchor.y-a.getIcon().infoWindowAnchor.y;this.openOnMap(a.getPoint(),b,new GPoint(c,d));c=new GPoint;d=G_NORMAL_MAP.getProjection();c=d.fromLatLngToPixel(a.getLatLng(),this.map.getZoom());c.y-=150;c.x+=300;this.map.panTo(d.fromPixelToLatLng(c,this.map.getZoom()),this.map.getZoom())};EWindow.prototype.redraw=function(){if(this.visible){var a=this.map.fromLatLngToDivPixel(this.point);this.div2.style.left=a.x+this.offset.x+"px";this.div2.style.bottom=-a.y+this.offset.y-this.estyle.fudge+"px";this.div1.style.left=a.x+this.offset.x+this.estyle.boxOffset.x+"px";this.div1.style.bottom=-a.y+this.offset.y+this.estyle.boxOffset.y+"px"}};EWindow.prototype.remove=function(){this.div1.parentNode.removeChild(this.div1);this.div2.parentNode.removeChild(this.div2);this.visible=false};EWindow.prototype.copy=function(){return new EWindow(this.map,this.estyle)};EWindow.prototype.show=function(){this.div1.style.display="";this.div2.style.display="";this.visible=true};EWindow.prototype.hide=function(){this.div1.style.display="none";this.div2.style.display="none";this.visible=false};EWindow.prototype.isHidden=function(){return!this.visible};EWindow.prototype.supportsHide=function(){return true};EWindow.prototype.zindex=function(a){var b=GOverlay.getZIndex(this.point.lat());this.div1.style.zIndex=b+a;this.div2.style.zIndex=b+1+a};
