/* GOOGLE MAP */

var map = null;
var geocoder = null;

function gmapLoad() {
 if (GBrowserIsCompatible()) {
   map = new GMap2(document.getElementById("map"));
   map.setCenter(new GLatLng(48.9, 2.3), 7);
   map.addControl(new GSmallMapControl());
   map.addControl(new GMapTypeControl());
   geocoder = new GClientGeocoder();
 }
}

function gmapLocalize(address) {
 if (geocoder) {
   geocoder.getLatLng(
     address,
     function(point) {
       if (!point) {
         document.getElementById("map").style.width = '1px';
         document.getElementById("map").style.display = 'none';
       } else {
       	
       		document.getElementById("map").style.visibility = 'visible';
       	
         map.setCenter(point, 13);
         var marker = new GMarker(point);
         map.addOverlay(marker);
         //marker.openInfoWindowHtml(address);
       }
       
     }
   );
 }
}

