var map = null;
var geocoder = null;

function load(googlestr) {
  if (GBrowserIsCompatible()) {
    map = new GMap2($("map"));
    map.setCenter(new GLatLng(37.4419, -122.1419), 13);
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
    map.enableDoubleClickZoom();
    geocoder = new GClientGeocoder();
  }
  showAddress(googlestr);
  
}

function showAddress(address) {
  if (geocoder) {
    geocoder.getLatLng(
      address,
      function(point) {
        if (!point) {
          alert(address + " not found");
        } else {
          map.setCenter(point, 13);
          var marker = new GMarker(point);
          map.addOverlay(marker);
        }
      }
    );
  }
}
