var map;
function initialize() {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map-dove-siamo"));
       	geocoder = new GClientGeocoder();
      	showAddress('Bracelli, Beverino SP, Italy');
      	map.setUIToDefault();
    }
}
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);
              		var tooltip = '<div class="map-tooltip"><strong>Bracelli 19020 Beverino SP</strong></div><div class="map-tooltip"><a href="http://maps.google.it/maps?f=q&source=s_q&hl=it&geocode=&q=Bracelli&sll=41.442726,12.392578&sspn=14.252027,28.300781&ie=UTF8&ll=44.208788,9.758606&spn=0.402608,1.40625&z=10&iwloc=addr">Come arrivare da noi</a></div>';
              		GEvent.addListener(marker, 'click', function() {
              			marker.openInfoWindowHtml(tooltip);
			  		});
			  		GEvent.addListener(marker, 'infowindowclose', function() {
			  			return map.savePosition();
			  		});
			  		marker.openInfoWindowHtml(tooltip);
			  		map.savePosition()
            	}
        	}
        );
	}
}
google.load("maps", "2.x");
google.setOnLoadCallback(initialize);