//<![CDATA[
	
      // ==================================================			Tutorial: http://www.econym.demon.co.uk/googlemaps/
    if (GBrowserIsCompatible()) {

      // ==================================================			Funzione per la creazione dei form "Parti da:" "Arriva da:"
      var gmarkers = [];
      var htmls = [];
      var to_htmls = [];
      var from_htmls = [];
      var i=0;

      function createTabbedMarker(point,name,html1,html2,label1,label2) {
        var marker = new GMarker(point);
		
        // The info window version with the "to here" form open
        to_htmls[i] = html2 + '<p>Calcolo Itinerario: <b>Parti da:</b> - <a href="javascript:fromhere(' + i + ')">Vai a:</a></p>' +
           '<form action="http://maps.google.com/maps" method="get" target="_blank">' +
           '<input type="text" size=15 maxlength=40 name="saddr" id="saddr" value="" style="margin: 5px 5px 0px 0px;" />' +
           '<input value="Calcola Percorso" class="submit" type="submit">' +
           '<input type="hidden" name="daddr" value="' + point.lat() + ',' + point.lng() + 
                  // "(" + name + ")" + 
           '"/>';
        // The info window version with the "to here" form open
        from_htmls[i] = html2 + '<p>Calcolo Itinerario: <a href="javascript:tohere(' + i + ')">Parti da:</a> - <b>Vai a:</b></p>' +
           '<form action="http://maps.google.com/maps" method="get"" target="_blank">' +
           '<input type="text" size=15 maxlength=40 name="daddr" id="daddr" value="" style="margin: 5px 5px 0px 0px;" />' +
           '<input value="Calcola Percorso" class="submit" type="submit">' +
           '<input type="hidden" name="saddr" value="' + point.lat() + ',' + point.lng() +
                  // "(" + name + ")" + 
           '"/>';
        // The inactive version of the direction info
        html2 = html2 + '<p>Calcolo Itinerario: <a href="javascript:tohere('+i+')">Parti da:</a> - <a href="javascript:fromhere('+i+')">Vai a:</a></p>';

		// Funzione per creare le tab:
        GEvent.addListener(marker, "click", function() {
        	marker.openInfoWindowTabsHtml([new GInfoWindowTab(label1,html1), new GInfoWindowTab(label2,html2)]);
        });
		
        gmarkers[i] = marker;
        htmls[i] = html2;
        i++;
		return marker;
      }

      // functions that open the directions forms
      function tohere(i) { gmarkers[i].openInfoWindowHtml(to_htmls[i]); }
      function fromhere(i) { gmarkers[i].openInfoWindowHtml(from_htmls[i]); }
      // ==================================================
	  
	  // ==================================================			Pannelli di controllo e posizione iniziale della mappa:
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
	  //map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(45.622254,12.448744),13);
	  //map.setMapType(G_HYBRID_MAP);
	  // ==================================================

	  // ==================================================			Creazione set markatori:
      var point = new GLatLng(45.622254,12.448744)
      var marker = createTabbedMarker(point,'<p><b>Mazzon Marco - Service Audio e Video</b></p>','<p><img src="image/logo.gif" alt="#"><p><b>Mazzon Marco - Service Audio e Video</b></p><p>Via Vallio, 50 - 30020 Meolo (VE)</p><p>Tel. +39 0421-345410 - Fax +39 0421-345410<p></div>', '<p>Calcolo itinerario per raggiungere o partire</p><p>dalla sede di Mazzon Marco</p><p>&nbsp;</p>', 'Indirizzo', 'Itinerari')
      map.addOverlay(marker);
	  // ==================================================
      
	  // ==================================================			Inserimento della Mappa di Controllo:
      //map.addControl(new GOverviewMapControl(new GSize(80,80)));

      //  A function to adjust the positioning of the overview
      //function positionOverview(x,y) {
      //  var omap=document.getElementById("map_overview");
      //  omap.style.left = x+"px";
      //  omap.style.top = y+"px";
        
        // Restyling
      //  omap.firstChild.style.border = "1px solid gray";
      //  omap.firstChild.firstChild.style.left="4px";
      //  omap.firstChild.firstChild.style.top="4px";
      //  omap.firstChild.firstChild.style.width="70px";
      //  omap.firstChild.firstChild.style.height="70px";
      //}

      // Cause the overview to be positioned AFTER IE sets its initial position
      //setTimeout("positionOverview(408,218)",1);
	  // ==================================================

    }
	  // ==================================================			Avviso incompatibilità browser:
	  else { alert("Siamo spiacenti, non è possibile visualizzare le mappe. Contattare Web Agency Meta Line: info@metaline.it - www.metaline.it"); }
	  // ==================================================

//]]>