var markerTimeout=null;function myPlacesInit(a){initLabelWaiting=new LabelWaiting;a.addControl(initLabelWaiting);new Ajax.Request("/places/findMyPlace",{method:"post",onSuccess:function(c){var b=c.responseText.evalJSON();drawPolygons(a,b.markers,"my_places");a.removeControl(initLabelWaiting)},onFailure:function(){}})}function handleMarkerHover(b,a){if(b=="in"){markerTimeout=window.setTimeout(function(){onMarkerTrueHoverHandle(a)},1000)}else{if(markerTimeout){window.clearTimeout(markerTimeout)}}}function onMarkerTrueHoverHandle(a){window.clearTimeout(markerTimeout);clearMapMarkers();a.openLittleInfoWindow("");var b="left_"+a.getParcelId();new Ajax.Updater(b,"/places/parcelInfo",{method:"post",evalScripts:true,parameters:{id:a.getParcelId()}})}function addClickForMyMarker(d,b,a,c){GEvent.addListener(b,"click",function(){window.location="/places/"+b.getParcelId()+"/"+b.getParcelName()+"#top"});GEvent.addListener(b,"mouseover",function(){handleMarkerHover("in",b)});GEvent.addListener(b,"mouseout",function(){handleMarkerHover("out",b)})}function addClickForReservedMarker(b,a){GEvent.addListener(a,"click",function(){wypadresslitbox=new LITBox("/main/litboxMessage/message/not_paid/id/"+a.getParcelId(),{type:"iframe",overlay:true,draggable:false,height:300,width:500,resizable:false,opacity:1})})}function addClickForPoiMarker(b,a){GEvent.addListener(a,"mouseover",function(){a.openToolTip(a.getParcelName())});GEvent.addListener(a,"mouseout",function(){a.closeToolTip()});GEvent.addListener(a,"click",function(){clearMapMarkers();a.openLittleInfoWindow("");var c="content_"+a.getParcelId();new Ajax.Updater(c,"/places/poiInfo",{method:"post",evalScripts:true,parameters:{id:a.getParcelId()}})})}function clearMapMarkers(){for(var a=0;a<all_markers.length;a++){if(all_markers[a].LittleInfoWindowInstance){all_markers[a].closeLittleInfoWindow()}}for(var a=0;a<global_markers.length;a++){if(global_markers[a].LittleInfoWindowInstance){global_markers[a].closeLittleInfoWindow()}}for(var a=0;a<all_poi_markers.length;a++){if(all_poi_markers[a]!=null&&all_poi_markers[a].LittleInfoWindowInstance){all_poi_markers[a].closeLittleInfoWindow()}}for(var a=0;a<global_poi_markers.length;a++){if(global_poi_markers[a]!=null&&global_poi_markers[a].LittleInfoWindowInstance){global_poi_markers[a].closeLittleInfoWindow()}}};