var marker=null;var geocoder=null;var map=null;function loadMapsSmallMap(){google.load("maps","2.X",{callback:mapsLoadedSmallMap})}function initLoaderSmallMap(){if(!geoScriptLoaded){var a=document.createElement("script");a.src="http://www.google.com/jsapi?key="+document.getElementById("map_key").value+"&callback=loadMapsSmallMap";a.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(a);geoScriptLoaded=true}else{loadMapsSmallMap()}}function mapsLoadedSmallMap(){if(GBrowserIsCompatible()){geocoder=new GClientGeocoder();map=new GMap2(document.getElementById("map_canvas"));map.addControl(new GSmallZoomControl());map.continuousZoomEnabled();map.enableScrollWheelZoom();if(document.getElementById("small_map_lat").value==""||document.getElementById("small_map_lng").value==""){map.setCenter(new GLatLng(50,-100),1)}else{if(document.getElementById("small_map_accuracy").value==""){map.setCenter(new GLatLng(document.getElementById("small_map_lat").value,document.getElementById("small_map_lng").value),10)}else{map.setCenter(new GLatLng(document.getElementById("small_map_lat").value,document.getElementById("small_map_lng").value),parseInt(document.getElementById("small_map_accuracy").value))}addMarkerSmallMap()}}}function addMarkerSmallMap(){marker=new GMarker(map.getCenter());map.addOverlay(marker)};
