function ProjectMap(mapElement,latitudeElement,longitudeElement){var map=new GMap2(mapElement);var latElement=latitudeElement;var longElement=longitudeElement;var this_=this;var init=function init(){map.addControl(new GLargeMapControl());map.addControl(new GMapTypeControl());map.setCenter(new GLatLng(32,0),1);
};ProjectMap.prototype.getLatitudeLongitude=function getLatitudeLongitude(){var latitudeLongitude=null;var latitude=getLatitude();var longitude=getLongitude();if(latitude!=null&&longitude!=null){if(latitude!=""&&longitude!=""){if(latitude!=0&&longitude!=0){latitudeLongitude=new GLatLng(latitude,longitude);
}}}return latitudeLongitude;};ProjectMap.prototype.refresh=function refresh(){map.clearOverlays();var latLong=this_.getLatitudeLongitude();if(latLong!=null){map.addOverlay(new GMarker(latLong));map.setCenter(latLong,2);}};var setLatitude=function setLatitude(latitude){if(latElement!=null){latElement.setAttribute("value",latitude);
}};var setLongitude=function setLongitude(longitude){if(longElement!=null){longElement.setAttribute("value",longitude);}};var getLatitude=function getLatitude(){var latitude=null;if(latElement!=null){latitude=latElement.getAttribute("value");}return latitude;};var getLongitude=function getLongitude(longitude){var longitude=null;
if(longElement!=null){longitude=longElement.getAttribute("value");}return longitude;};init();}function loadGoogleMap(){try{if(GBrowserIsCompatible()){var mapDiv=document.getElementById("map");var lat=document.getElementById("latitude");var lon=document.getElementById("longitude");if(mapDiv!=null&&lat!=null&&lon!=null){var map=new ProjectMap(mapDiv,lat,lon);
map.refresh();}}}catch(err){}}$(document).ready(loadGoogleMap);
