var map;
var geocoder;

function load() {
  if (GBrowserIsCompatible()) {
    map = new GMap2(document.getElementById("map"));

    geocoder = new GClientGeocoder();
  }
}

function showAddress(address,name) {
  if (geocoder) {
    geocoder.getLatLng(
      address,
      function(point) {
      if (!point) {
        alert(address + " not found");
      } else {
        map.addControl(new GLargeMapControl());
        map.setCenter(point, 15);
        var marker = new GMarker(point);
        map.addOverlay(marker);
        marker.openInfoWindowHtml(name+'<br>'+address);
        map.panBy(new GSize(0, 40));
      }
    }
    );
  }
}

