var AgentInfoBox=function(){google.maps.OverlayView.apply(this,arguments);this.div_=null;this.heading_=null;this.content_=null;this.closeevent_=null;this.centerMap_=!1};AgentInfoBox.prototype=new google.maps.OverlayView;AgentInfoBox.prototype.createDiv_=function(){this.div_||(this.div_=$("<div/>").addClass("agentInfoBox"),this.getPanes().floatPane.appendChild(this.div_[0]),this.div_.append($("<h3/>").text(this.heading_)).append(this.content_))};AgentInfoBox.prototype.draw=function(){var n,t;this.createDiv_();n=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.css("left",n.x-this.div_.width()/2-14+"px");this.div_.css("bottom",-(n.y-37)+"px");this.centerMap_&&(this.centerMap_=!1,t=this.getProjection(),n.x+=278,this.getMap().panTo(t.fromDivPixelToLatLng(n)))};AgentInfoBox.prototype.open=function(n,t){if(t){if(this.position_===t.getPosition()&&this.getMap()!==null)return this.setMap(null),!1;this.position_=t.getPosition()}this.setMap(n);this.centerMap_=!0};AgentInfoBox.prototype.close=function(){this.setMap(null)};AgentInfoBox.prototype.onRemove=function(){this.div_&&(this.div_.fadeOut("fast",function(){$(this).remove()}),this.div_=null)};AgentInfoBox.prototype.setContent=function(n,t,i,r){this.heading_=n;this.content_="<p>Ph: "+t;i!==""&&(this.content_+="<br/>Fax: "+i);this.content_+="<\/p>";this.content_+="<p>"+r+"<\/p>"}