var map;
function initialize() {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map-dove-siamo"));
       	geocoder = new GClientGeocoder();
       	showAddress('Via+DEL COLLE+52+10058+SESTRIERE BORGATA, 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>BORGATA 10058 TORINO TO</strong></div><div class="map-tooltip"><a href="http://maps.google.it/maps?f=q&source=s_q&hl=it&geocode=&q=Via%2Bdel%2Bcolle+52%2B46048%2Bborgata%2Bsetriere,+Italy&sll=45.226928,10.747488&sspn=0.007254,0.013754&g=Via%2Bdel%2Bcolle%2B52%2B46048%2Bborgata%2Bsetriere,+Italy&ie=UTF8&hq=&hnear=Via+DEL COLLE,+52,+10058+BORGATA SESTRIERE+TORINO,+Piemonte&ll=45.226909,10.747418&spn=0.007254,0.013754&z=16">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);