var map = null;
var geocoder = null;
var icon = GIcon();

function initialize() {
  if (GBrowserIsCompatible()) {
    map = new GMap2(document.getElementById("gMap"));
    map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());

	geocoder = new GClientGeocoder();
  }
}

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