 //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
      var map = new GMap2(document.getElementById("map"));

	  map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());

   var map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.addControl(new GOverviewMapControl());
    map.setCenter(new GLatLng(43.0055,13.4408), 13,G_NORMAL_MAP);
var encodedPolyline = new GPolyline.fromEncoded({
    color: "#FF0000",
    weight: 3,
    points: "kdreGcwaqA|dB{l@xrBfoAf[f{AwsAv}CeqBcjDyr@gqB",
    levels: "BBB",
    zoomFactor: 32,
    numLevels: 4
});
map.addOverlay(encodedPolyline);


       function createMarkerHome(point, number) {
// Create our "tiny" marker icon
var tinyIcon = new GIcon();
tinyIcon.image = "http://www.google.com/intl/en_us/mapfiles/ms/micons/blue-dot.png";
tinyIcon.iconSize = new GSize(42, 40);
tinyIcon.shadowSize = new GSize(22, 40);
tinyIcon.iconAnchor = new GPoint(6, 40);
tinyIcon.infoWindowAnchor = new GPoint(5, 1);

// Set up our GMarkerOptions object literal
markerOptions = { icon:tinyIcon };

	     var markerhome = new GMarker(point,markerOptions);
		  if (number == 1) {
          GEvent.addListener(markerhome, "click", function() {
            markerhome.openInfoWindowHtml("<span style=font-size:11px;><br/><a href=\"http://www.albergodiffusosmerillo.com/contatti.php\" title=\"Reception Albergo diffuso Smerillo\"><img src=\"/immagini/logo_vinaccio.jpg\" alt=\"Smerillo Reception\" style=\"border:0px;\"></a><br/><b>Reception</b> :<br/>via Dante Alighieri.13, Smerillo 63020 (FM). <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 320 4232453 <br/></span>");
          });
		  }
	
		return markerhome;
		}
       function createMarker(point, number) {

 		
          var marker = new GMarker(point);
// Ad ognuno dei punti con le coordinate corrisponde un palloncino con delle info
// qui puoi modificare i nomi delle strutture al posto di Smerillo Albergo Diffuso

		
		  if (number == 2){
		  GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<span style=font-size:11px;><a href=\"http://www.albergodiffusosmerillo.com/albergodiffuso/rose.html\" title=\"Casa Delle rose\"><img src=\"/immagini/thumbs/forno/2.png\" alt=\"Casa Delle Rose\" style=\"border:0px;\"></a><br/><b>Casa delle Rose</b> : <br/>Via Indipendenza, 11 <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 334 9946996 <br/></span>");
         });
		  }
// 	  else if (number == 3){
//		  GEvent.addListener(marker, "click", function() {
//            marker.openInfoWindowHtml("<span style=font-size:11px;><a href=\"http://www.albergodiffusosmerillo.com/albergodiffuso/rose.html\" title=\"Alloggio CEA\"><img src=\"/immagini/thumbs/forno/2.png\" alt=\"Alloggio CEA\" style=\"border:0px;\"></a><br/><b>Alloggio CEA </b> : <br/>Via A. Nobili 9 <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 334 9946996 <br/></span>");
//          });
//		  }
		  else if (number == 4){
		  GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<span style=font-size:11px;><a href=\"http://www.albergodiffusosmerillo.com/albergodiffuso/orchidea.html\" title=\"Casa Orchidea\"><img src=\"/immagini/thumbs/rocca/11.png\" alt=\"Casa Orchidea\" style=\"border:0px;\"></a><br/><b>Casa Orchidea </b> : <br/>Via della Rocca, 1 <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 334 9946996 <br/></span>");
          });
		  }
		  else if (number == 5){
		  GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<div style=\"height:200px;\"><span style=font-size:11px;><a href=\"http://www.albergodiffusosmerillo.com/albergodiffuso/primule.html\" title=\"Casa Delle Primule\"><img src=\"/immagini/thumbs/conca/14.jpg\" alt=\"Casa Delle Primule\" style=\"border:0px;\"></a><br/><b>Casa delle Primule</b> : <br/>C/da Ceresola, 33 <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 334 9946996 <br/><a href=\"/contatti.php\" title=\"contattaci via web\">Contattaci</a></span></div>");
          });
		  }
		  else if (number == 6){
		  GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<div style=\"height:200px;\"><span style=font-size:11px;><a href=\"http://www.albergodiffusosmerillo.com/albergodiffuso/margherite.html\" title=\"Casa Delle Margherite\"><img src=\"/immagini/thumbs/faggio/1p.jpg\" alt=\"Casa Delle Margherite\" style=\"border:0px;\"></a><br/><b>Casa delle Margherite</b> : <br/>C/da San Martino al Faggio <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 334 9946996 <br/><a href=\"/contatti.php\" title=\"contattaci via web\">Contattaci</a></span></div>");
          });
		  }
		  else if (number == 7){
		  GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<div style=\"height:200px;\"><span style=font-size:11px;><a href=\"http://www.albergodiffusosmerillo.com/albergodiffuso/ciclamini.html\" title=\"Casa Deli Ciclamini\"><img src=\"/immagini/thumbs/forno/2.png\" alt=\"Casa Dei Ciclamini\" style=\"border:0px;\"></a><br/><b>Casa dei Ciclamini</b> : <br/>C/da Durano 12 <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 334 9946996 <br/><a href=\"/contatti.php\" title=\"contattaci via web\">Contattaci</a></span></div>");
          });
		  }
		  else if (number == 8){
		  GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<div style=\"height:200px;\"><span style=font-size:11px;><a href=\"http://www.albergodiffusosmerillo.com/albergodiffuso/giglio.html\" title=\"Casa Del Giglio\"><img src=\"/immagini/thumbs/paciotti/1.png\" alt=\"Casa Del Giglio\" style=\"border:0px;\"></a><br/><b>Casa del Giglio</b> : <br/>C/da San Giovanni,9 <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 334 9946996 <br/><a href=\"/contatti.php\" title=\"contattaci via web\">Contattaci</a></span></div>");
          });
		  }
		  else if (number == 9){
		  GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<div style=\"height:200px;\"><span style=font-size:11px;><a href=\"http://www.albergodiffusosmerillo.com/albergodiffuso/girasoli.html\" title=\"Casa Dei Girasoli\"><img src=\"/immagini/thumbs/castellano/2.jpg\" alt=\"Casa Dei Girasoli\" style=\"border:0px;\"></a><br/><b>Casa dei Girasoli</b> : <br/>C/da Ceresola, 5  <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 334 9946996 <br/><a href=\"/contatti.php\" title=\"contattaci via web\">Contattaci</a></span></div>");
          });
		  }
		  else if (number == 10){
		  GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<div style=\"height:200px;\"><span style=font-size:11px;><a href=\"http://www.albergodiffusosmerillo.com/albergodiffuso/tulipani.html\" title=\"Casa Dei tulipani\"><img src=\"/immagini/thumbs/colle/esterno2.jpg\" alt=\"Casa Dei tulipani\" style=\"border:0px;\"></a><br/><b>Casa dei Tulipani</b> : <br/>C/da Colle Molino, 7 <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 334 9946996 <br/><a href=\"/contatti.php\" title=\"contattaci via web\">Contattaci</a></span></div>");
          });
		  }
		  else if (number == 11){
		  GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<div style=\"height:200px;\"><span style=font-size:11px;><a href=\"http://www.albergodiffusosmerillo.com/albergodiffuso/ristorazione.php\" title=\"Ristorante Le Logge\"><img src=\"/immagini/thumbs/ristorante/2.png\" alt=\"Ristotante le Logge\" style=\"border:0px;\"></a><br/><b>Le Logge</b> : <br/>Parco della Fessa 1 <a href=\"mailto:info@albergodiffusosmerillo.com\" title=\"invia email albergo diffuso smerillo\">Email</a>  tel: (+39) 334 9946996 <br/><a href=\"/contatti.php\" title=\"contattaci via web\">Contattaci</a></span></div>");
          });
		  }


          return marker;
        }


// Modifica qui di seguito le coordinate ;)

  var point = new GLatLng(43.0055,13.4448)  
  var point2 = new GLatLng(43.004,13.4452)  
  var point3 = new GLatLng(43.0053,13.4448)  
  var point4 = new GLatLng(43.0035,13.4456)  
  var point5 = new GLatLng(42.9891,13.4281)  
  var point6 = new GLatLng(43.0007,13.4142)  
  var point7 = new GLatLng(43.0114,13.4509)  
  var point8 = new GLatLng(43.0088,13.4325)  
  var point9 = new GLatLng(42.991,13.4359)  
  var point10 = new GLatLng(43.0188,13.4431)  
  var point11 = new GLatLng(43.0057,13.4451)  



   map.addOverlay(createMarkerHome(point,1));
   map.addOverlay(createMarker(point2,2));
   map.addOverlay(createMarker(point3,3));
   map.addOverlay(createMarker(point4,4));
   map.addOverlay(createMarker(point5,5));
   map.addOverlay(createMarker(point6,6));
   map.addOverlay(createMarker(point7,7));
   map.addOverlay(createMarker(point8,8));
   map.addOverlay(createMarker(point9,9));
   map.addOverlay(createMarker(point10,10));
   map.addOverlay(createMarker(point11,11));


    }
    
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }

    }

    //]]>

