
var map=null;var geocoder=null;var place;function googleLoad(callBack){var filename="http://maps.google.com/maps?file=api&v=2.x&key=ABQIAAAAKF3-sQ5foQxNMkY8XxJeHRQLetDo4VfrPaS0apcQF_6AKVamCBSYJxbxB-6vvz_3fDl42A3rc3ht1w&async=2&callback="+callBack;var fileref=document.createElement('script');fileref.setAttribute("type","text/javascript");fileref.setAttribute("src",filename);document.documentElement.firstChild.appendChild(fileref);}
function GoogleMap_load(){if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("map_container"));map.setCenter(new GLatLng(34,0),1);map.addControl(new GSmallMapControl());geocoder=new GClientGeocoder();map.clearOverlays();TREvents.addUnloadEvent(GUnload);}}
function addAddressToMap(response){map.clearOverlays();if(!response||response.Status.code!=200){}else{place=response.Placemark[0];mapLat=place.Point.coordinates[1];mapLng=place.Point.coordinates[0];point=new GLatLng(mapLat,mapLng);marker=new GMarker(point);map.setCenter(point,1);map.addOverlay(marker);GEvent.addListener(marker,"click",function(){myHtml="<b>"+place.address+"</b>";map.openInfoWindowHtml(point,myHtml);});}}
function showAddress(address,foo,bar){geocoder.getLocations(address,addAddressToMap);}
function openMarker(point,place){return(function(){map.openInfoWindowHtml(point,"<br /><span style='text-align:right;'><b>"+place+"</b></span>");});}
