AI.googlemap = {};
AI.googlemap.codeAddress = function(adresseDynamique)
{
 var marker;
 if ( AI.googlemap.geocoder && AI.googlemap.map )
 {
   AI.googlemap.geocoder.geocode(
    { 'address': adresseDynamique },
    function(results, status)
    {
     if ( status == google.maps.GeocoderStatus.OK )
     {
      if ( status != google.maps.GeocoderStatus.ZERO_RESULTS )
      {
       AI.googlemap.map.set_center(results[0].geometry.location);
       marker = new google.maps.Marker({
        map:AI.googlemap.map,
        position: results[0].geometry.location
       });
      } else { alert("No results found"); }
     }
     else { alert("Geocode was not successful for the following reason: " + status); }
   }
  );
 }
};

