var _mapGeocode=null,_markerGeocode=null,_GEOCODE_LAYER_ID="geocodeCorrectionLayer",_TRANSPARENT_LAYER_ID="transparentLayer",_CONTENT_LAYER_ID="contentLayer",_LATITUDE_ID="lat",_LONGITUDE_ID="lng",_CORRECTED_ID="isCorrected",_UNDO_LINK_ID="undoMarkerCorrection";function o(a,d){var e=b(_CONTENT_LAYER_ID),c=frames.editableMapFrame,h=c.document.getElementById("editableMap");k(h);e.className="transON";g(_TRANSPARENT_LAYER_ID);g(_GEOCODE_LAYER_ID);_mapGeocode=new c.GMap2(h);_mapGeocode.addControl(new c.GLargeMapControl);
_mapGeocode.addControl(new c.GMapTypeControl);var i=new c.GLatLng(a,d);_mapGeocode.setCenter(i,17);_markerGeocode=new c.GMarker(i,{draggable:true});c.GEvent.addListener(_markerGeocode,"dragstart",function(){_mapGeocode.closeInfoWindow()});_mapGeocode.addOverlay(_markerGeocode)}function n(){var a=b(_LATITUDE_ID),d=b(_LONGITUDE_ID),e=b(_CORRECTED_ID);a.value=_markerGeocode.getPoint().lat();d.value=_markerGeocode.getPoint().lng();e.value="true";updateMap(_markerGeocode.getPoint().lat(),_markerGeocode.getPoint().lng());
f(_GEOCODE_LAYER_ID);var c=b(_CONTENT_LAYER_ID);c.className="";f(_TRANSPARENT_LAYER_ID);g(_UNDO_LINK_ID);needsGeocodeConfirmation=false}function p(){var a=b(_LATITUDE_ID),d=b(_LONGITUDE_ID),e=b(_CORRECTED_ID);a.value=calculatedLatitude;d.value=calculatedLongitude;e.value="false";updateMap(calculatedLatitude,calculatedLongitude);f(_UNDO_LINK_ID)}function l(){f(_GEOCODE_LAYER_ID);var a=b(_CONTENT_LAYER_ID);a.className="";f(_TRANSPARENT_LAYER_ID);needsGeocodeConfirmation=false}function m(a){if(j()&&
needsGeocodeConfirmation){var d=b(_LATITUDE_ID).value,e=b(_LONGITUDE_ID).value;if(d!=calculatedLatitude||e!=calculatedLongitude){return confirm(a)}}}function f(a){b(a).style.display="none"}function g(a){k(b(a))}function k(a){a.style.display=""}function j(){var a=b(_CORRECTED_ID);return a.value=="true"}function b(a){return document.getElementById(a)}var _showGeocodeCorrectionLayer=o,_correctGeocode=n,_cancelGeocodeCorrection=l,_undoGeocodeCorrection=p,_confirmGeocodeCorrection=m,_hasUserCorrectedGeocode=
j;

