var map = null;
var geocoder = null;
function map_goto (address) 
{
geocoder.getLatLng(
address,
function(point) {
if (point) {
map.setCenter(point,7);
}
}
);
}
function map_marker (address, title, text, image) 
{
geocoder.getLatLng(
address,
function(point) 
{
if (!point) {
} else {
var description = "" + title + "" + text + "";
var mo = new Object();
mo.title = description;
mo.clickable = true;
var marker = new GMarker(point, mo);
map.addOverlay(marker);
GEvent.addListener(map, "click", function(marker, point) {
if (marker) {
marker.openInfoWindowHtml(marker.getTitle());
}
}
);
}
}
);
}
function load_map() { 
if (GBrowserIsCompatible()) {
geocoder = new GClientGeocoder();
map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map_goto ("Via primo Maggio 12, 51010 Massa e Cozzile PT");
map_marker ("Via primo Maggio 12, 51010 Massa e Cozzile PT", "<font size=2><b>Piramedia.it</b> Ufficio di Montecatini Terme", "", "immagini/castelli.jpg");
}
}