//<![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 + '<h6>Calcolo Itinerario: <b>Parti da:</b> - <a href="javascript:fromhere(' + i + ')">Vai a:</a></h6>' +
           '<h6>Localitā di Partenza:</h6><form action="http://maps.google.com/maps" method="get" target="_blank">' +
           '<input type="text" SIZE=15 MAXLENGTH=40 name="saddr" id="saddr" value="" />' +
           '<INPUT value="Calcola Percorso" STYLE="width:100px" 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 + '<h6>Calcolo Itinerario: <a href="javascript:tohere(' + i + ')">Parti da:</a> - <b>Vai a:</b></h6>' +
           '<h6>Localitā di Arrivo:</h6><form action="http://maps.google.com/maps" method="get"" target="_blank">' +
           '<input type="text" SIZE=15 MAXLENGTH=40 name="daddr" id="daddr" value="" />' +
           '<INPUT value="Calcola Percorso" STYLE="width:100px" TYPE="SUBMIT">' +
           '<input type="hidden" name="saddr" value="' + point.lat() + ',' + point.lng() +
                  // "(" + name + ")" + 
           '"/>';
        // The inactive version of the direction info
        html2 = html2 + '<h6>Calcolo Itinerario: <a href="javascript:tohere('+i+')">Parti da:</a> - <a href="javascript:fromhere('+i+')">Vai a:</a></h6>';

		// 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.632698,12.598507),15);
	  map.setMapType(G_HYBRID_MAP);
	  // ==================================================

	  // ==================================================			Creazione set markatori:
      var point = new GLatLng(45.632698,12.598507)
      var marker = createTabbedMarker(point,'<div class="map"><h6>Edilidea - Impresa Edile</h6>','<h6><img src="image/edilideamap.gif" alt="edilidea, edilizia san donā di piave, impresa edile san donā di piave"><br><br>Via Calnova, 162 - 30027 San Donā di Piave (VE)<br>Tel. +39 0421-221610 - Fax +39 0421-221611<br></h6></div>', '<h6>Calcolo itinerario per raggiungere o partire dalla<br>sede di Edilidea</h6><br>', '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"); }
	  // ==================================================

//]]>