function load() {
if (GBrowserIsCompatible()) {

var map = new GMap2(document.getElementById("map"));
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
    map.setCenter(new GLatLng(45.686156,9.742059), 13);



// Create a base icon for all of our markers that specifies the shadow, icon dimensions, etc.
var baseIcon = new GIcon();
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(20, 34);
baseIcon.shadowSize = new GSize(50, 43);
baseIcon.iconAnchor = new GPoint(6, 20);
baseIcon.infoWindowAnchor = new GPoint(5, 1);


// Creates a marker whose info window displays the letter corresponding to the given index.
function createMarker(point, index, agenzia) {
  var letter = String.fromCharCode("A".charCodeAt(0) + index);
  var icon = new GIcon(baseIcon);
  icon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";
  var marker = new GMarker(point, icon);
  GEvent.addListener(marker, "click", function() {
  //marker.openInfoWindowHtml( agenzia );
  marker.openInfoWindowTabsHtml( agenzia );
  });  
  return marker;
}


// COORDINATE SEDE 
var point = new GLatLng(45.686156,9.742059);
var agenzia = [  
new GInfoWindowTab("Sede", "<div id='finestrellaGM'><b>Nautica Ravasio s.r.l.</b><br />Via Comonte,20/22<br />24068 Seriate (BG) - Italy<br />Tel. +39 035 299194 <br />Fax +39 035 4240840 <br /><a href='mailto:info@nauticaravasio.it '>info@nauticaravasio.it </a></div>"), 
new GInfoWindowTab("Percorso",'<div id="finestrellaGM1">A partire da: <b>>Nautica Ravasio</b><br />Destinazione:<br/><form class="GM" action="http://maps.google.com/maps" method="get" target="_blank">' + '<input class="GM" type="text" name="saddr" id="saddr" value="" /><input class="S_GM" value="Calcola" TYPE="SUBMIT"><input type="hidden" name="daddr" value="' + point.lat() + ',' + point.lng() + '"/></div><br /><div id="finestrellaGM1">Per arrivare a: <b>>Nautica Ravasio </b><br />Partendo da:<br /><form action="http://maps.google.com/maps" method="get"" target="_blank"><input class="GM" type="text" name="daddr" id="daddr" value="" /><input class="S_GM" value="Calcola" TYPE="SUBMIT"><input type="hidden" name="saddr" value="' + point.lat() + ',' + point.lng() + '"/></div>')
];



map.addOverlay(createMarker(point, 0, agenzia));


}
}
