var geocoder = null;
var map = null;
function showAddress(address) 
{
	if (geocoder)
	{
		geocoder.getLatLng( address, function(point) 
			{
				if (!point) 
				{
					alert(address + " not found");
				} 
				else 
				{
					var icon = new GIcon();
					icon.image = "http://www.immobilien-suchen.net/templates/images/icon.png";
					icon.iconSize = new GSize(34, 30);
					icon.iconAnchor = new GPoint(10, 10);
					icon.infoWindowAnchor = new GPoint(20, 3);
					map.setCenter(point, 13);
					var marker = new GMarker(point, icon);
					map.addOverlay(marker)
					marker.openInfoWindowHtml(html);
				}
			}
		);
	}
}	


function initialize() 
{
	
	if (GBrowserIsCompatible()) 
	{
		map = new GMap2(document.getElementById("map_canvas"));
		map.setCenter(new GLatLng(37.4419, -122.1419));
		map.addControl(new GSmallMapControl(),new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10,20)));
		geocoder = new GClientGeocoder();
		
		showAddress(add);	
	}
}


