var map = null;
var geocoder = null;

function initialize() {
  if (GBrowserIsCompatible()) {
	map = new GMap2(document.getElementById("map_canvas"));
	geocoder = new GClientGeocoder();
  }
}

function showAddress(address) {
  if (geocoder) {
	geocoder.getLatLng(
	  address,
	  function(point) {
		if (!point) {
		  alert(address + " not found");
		} else {
		  map.setCenter(point, 5);
		  var marker = new GMarker(point);
		  map.addOverlay(marker);
		  //marker.openInfoWindowHtml(address);
		  map.addControl(new GSmallMapControl());
		  map.addControl(new GMapTypeControl());
		}
	  }
	);
  }
}
