 if (GBrowserIsCompatible()) {
      
              // Create our "tiny" marker icon 
		var icon = new GIcon(G_DEFAULT_ICON); 
       // icon.image = "http://www.tropeaholiday.it/975.gif"; 
       // icon.shadow = "http://www.tropeaholiday.it/975.gif"; 
        //icon.iconSize = new GSize(32, 32); 
        //icon.shadowSize = new GSize(32, 32); 
        //icon.iconAnchor = new GPoint(0, 22); 
        icon.infoWindowAnchor = new GPoint(11, 1); 

	  // this variable will collect the html which will eventualkly be placed in the side_bar
      var side_bar_html = "";
    
      // arrays to hold copies of the markers and html used by the side_bar
      // because the function closure trick doesnt work there
      var gmarkers = [];
      var htmls = [];
      var i = 0;
		

      // A function to create the marker and set up the event window
      function createMarker(point,name,html) {
        var marker = new GMarker(point,icon);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);

        });
        // save the info we need to use later for the side_bar
        gmarkers[i] = marker;
        htmls[i] = html;
        // add a line to the side_bar html
        //side_bar_html += '<a href="javascript:myclick(' + i + ',0)" onMouseOver="myclick('+i+',0)" >' + name + '</a>';
        i++;
        return marker;
      }

		
		
      // This function picks up the click and opens the corresponding info window
     


      // create the map
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
	  map.addControl(new GHierarchicalMapTypeControl());
      map.setCenter(new GLatLng(38.58359966761715, 16.266632080078125), 10);
      map.setMapType(G_NORMAL_MAP);
//      map.enableContinuousZoom();
      map.enableDoubleClickZoom();
		
		function myclick(i,x) {
		//map.setZoom(20);
			if (x==0) 
			{
			     map.setMapType(G_NORMAL_MAP);

				map.setCenter(gmarkers[i].getLatLng(),12);
        		gmarkers[i].openInfoWindowHtml(htmls[i]);
			}
			
			if(x==1)
			{
				map.setMapType(G_SATELLITE_MAP);
				map.setCenter(gmarkers[i].getLatLng(),18);
        		//gmarkers[i].openInfoWindowHtml(htmls[i]);
			}
			
									//google earth
			if(x==2)
			{
				map.setMapType(G_SATELLITE_3D_MAP );
				map.setCenter(gmarkers[i].getLatLng(),16);
				gmarkers[i].closeInfoWindow();
			}
			
      }
	  
	  function avvisa()
	  {
		  alert('L\'area colorata indica la giusta posizione del lido privato della struttura. I limiti effettivi e la grandezza possono differire da quelli reali.');
	  }
	  
	  function spiaggia(x)
	  {
		if (x=="porto pirgos")
			{
				avvisa();
				map.setMapType(G_SATELLITE_MAP);
				map.setCenter( new GLatLng(38.69287083591998, 15.952486395835876),18);
				  var polygon = new GPolygon([
											  new GLatLng(38.69360773924093, 15.952051877975463),
											  new GLatLng(38.69306762334518, 15.951193571090698),
											  new GLatLng(38.69302156676227, 15.951536893844604),
											  new GLatLng(38.693436074940976, 15.952212810516357),
											  new GLatLng(38.69360773924093, 15.952051877975463)],
											  "red",1, 1, "#f06014", 0.5); 
				  map.addOverlay(polygon);
			}
			
			if (x=="capo vaticano beach resort")
			{
				avvisa();
				map.setMapType(G_SATELLITE_MAP);
				map.setCenter( new GLatLng(38.62876471873433, 15.831502676010131),16);
				  var polygon = new GPolygon([
											  new GLatLng(38.63029012523708, 15.830247402191162),
											  new GLatLng(38.62812772619344, 15.829335451126098),
											  new GLatLng(38.62806067401783, 15.829657316207885),
											  new GLatLng(38.63022307508374, 15.830590724945068),
											  new GLatLng(38.63029012523708, 15.830247402191162)],
											  "red",1, 1, "#f06014", 0.5); 
				  map.addOverlay(polygon);
			}	
			
			
			if ((x=="punta faro")||(x=='grotticelle'))
			{
				avvisa();
				map.setMapType(G_SATELLITE_MAP);
				map.setCenter( new GLatLng(38.61775065607757, 15.838379859924316),16);
				  var polygon = new GPolygon([
											  new GLatLng(38.6160992390748, 15.836995840072631),
											  new GLatLng(38.614934003185446, 15.838669538497924),
											  new GLatLng(38.61520226060694, 15.838905572891235),
											  new GLatLng(38.616292046065894, 15.83728551864624),
											  new GLatLng(38.6160992390748, 15.836995840072631)],
											  "red",1, 1, "#f06014", 0.5); 
				  map.addOverlay(polygon);
			}
				
			
			if (x=="torre ruffa")
			{
				avvisa();
				map.setMapType(G_SATELLITE_MAP);
				map.setCenter( new GLatLng(38.64277712282302, 15.8365398645401),18);
				  var polygon = new GPolygon([
											  new GLatLng(38.64318354222809, 15.83577811717987),
											  new GLatLng(38.642668185271205, 15.835520625114441),
											  new GLatLng(38.642638855902035, 15.835686922073364),
											  new GLatLng(38.643162592830556, 15.835922956466674),
											  new GLatLng(38.64318354222809, 15.83577811717987)],
											  "red",1, 1, "#f06014", 0.5); 
				  map.addOverlay(polygon);
			}				
			
			
			if (x=="maddalena")
			{
				avvisa();
				map.setMapType(G_SATELLITE_MAP);
				map.setCenter( new GLatLng(38.676414142544985, 15.894427299499511),16);
				  var polygon = new GPolygon([
											  new GLatLng(38.675471850900934, 15.888349413871765),
											  new GLatLng(38.67494835018307, 15.887566208839416),
											  new GLatLng(38.674663564184655, 15.888032913208007),
											  new GLatLng(38.67519963100547, 15.88871419429779),
											  new GLatLng(38.675471850900934, 15.888349413871765)],
											  "red",1, 1, "#f06014", 0.5); 
				  map.addOverlay(polygon);
			}
	  }
	  
      // add the points    

var point = new GLatLng(38.622822028992104,15.836099982261657);
var descrizione=
"<table width=\"300\" border=\"0\" style=\"border:1px #003366 solid; margin:0x; padding:0px;\">"+
"  <tr>"+
"    <td colspan=\"2\"><img src=\"mappe/sopra.jpg\" width=\"300\" height=\"30\" "+
"style=\"margin:0px; padding:0px; border:0px;\" /></td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"244\" bgcolor=\"#eeeeee\">Hotel Residence &quot; Eolo &quot; </td>"+
"    <td width=\"52\"><div align=\"center\"><img src=\"home/star.gif\" "+
"width=\"12\" height=\"12\" /><img src=\"home/star.gif\" width=\"12\" "+
"height=\"12\" /><img src=\"home/star.gif\" width=\"12\" height=\"12\" "+
"/><img src=\"home/star.gif\" width=\"12\" height=\"12\" /></div></td>"+
"  </tr>"+
"  <tr>"+
"    <td colspan=\"2\" valign=\"top\"><div align=\"justify\">"+
"      <p align=\"left\" ><a "+
"href=\"http://www.maema-viaggi.it/Capo_Vaticano_Eolo.html\" target=\"_blank\"><img "+
"src=\"strutture/Eolo/logo.jpg\" alt=\"\" width=\"70\" height=\"56\" border=\"0\" "+
"align=\"left\" /></a></p>"+
"      <p><strong>Capo Vaticano</strong> e’ il luogo ideale per chi ama vivere a stretto "+
"contatto   con la natura, <strong>L' Eolo </strong>si sviluppa su due piani, in ogni piano si trovano   6 "+
"appartamenti , tutti con vista <strong>mare.</strong></p>"+
"      </div></td>"+
"  </tr>"+
"  <tr>"+
"    <td height=\"18\" colspan=\"2\" bgcolor=\"#eeeeee\"><div align=\"center\"> "+
"        <!-- INDIRIZZO PAGINA DETTAGLI -->"+
"        <a href=\"http://www.maema-viaggi.it/Capo_Vaticano_Eolo.html\" target=\"_blank\"> "+
"        <!-- FINE INDIRIZZO PAGINA DETTAGLI -->"+
"    Dettagli &amp; Prezzi </a></div></td>"+
"  </tr>"+
"</table>";
var marker = createMarker(point,"Hotel Residence Eolo 4 stelle",descrizione);
map.addOverlay(marker);

var point = new GLatLng(38.623153122687036,15.836915373802185);
var descrizione=
"<table width=\"300\" border=\"0\" style=\"border:1px #003366 solid; margin:0x; padding:0px;\">"+
"  <tr>"+
"    <td colspan=\"2\"><img src=\"mappe/sopra.jpg\" width=\"300\" height=\"30\" "+
"style=\"margin:0px; padding:0px; border:0px;\" /></td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"245\" bgcolor=\"#eeeeee\">Hotel Residence &quot; Costa Azzurra "+
"&quot;</td>"+
"    <td width=\"51\"><div align=\"center\"><img src=\"home/star.gif\" width=\"12\" "+
"height=\"12\" /><img src=\"home/star.gif\" width=\"12\" height=\"12\" /><img "+
"src=\"home/star.gif\" width=\"12\" height=\"12\" /></div></td>"+
"  </tr>"+
"  <tr>"+
"    <td colspan=\"2\"><div align=\"justify\"><a "+
"href=\"http://www.maema-viaggi.it/Capo_Vaticano_Costa_Azzurra.html\" "+
"target=\"_blank\"><img src=\"strutture/Costa Azzurra/logo.jpg\" "+
"alt=\"\" width=\"70\" height=\"56\" border=\"0\" align=\"left\" /></a>"+
"      <p align=\"left\" >Situato sul promontorio di <strong><U>Capo   Vaticano</U></a></strong>, a 9 km da <strong><U>Tropea</U> </strong>in <strong>Calabria</strong>, immerso in un'oasi di colori e "+
"profumi di vegetazione   mediterranea, sorge l' <strong>Hotel Residence &quot;Costa "+
"Azzurra&quot;</strong>."+
"      </p>"+
"    </div></td>"+
"  </tr>"+
"  <tr>"+
"    <td colspan=\"2\" bgcolor=\"#eeeeee\"><div align=\"center\"> "+
"        <!-- INDIRIZZO PAGINA DETTAGLI -->"+
"        <a href=\"http://www.maema-viaggi.it/Capo_Vaticano_Costa_Azzurra.html\" "+
"target=\"_blank\"> "+
"        <!-- FINE INDIRIZZO PAGINA DETTAGLI -->"+
"        Dettagli &amp; Prezzi </a></div></td>"+
"  </tr>"+
"</table>";
var marker = createMarker(point,"Hotel Costa Azzurra 3 stelle",descrizione);
map.addOverlay(marker);

var point = new GLatLng(38.66901367835128,15.91144859790802);
var descrizione=
"<table width=\"300\" border=\"0\" style=\"border:1px #003366 solid; margin:0x; padding:0px;\">"+
"  <tr>"+
"    <td colspan=\"2\"><img src=\"mappe/sopra.jpg\" width=\"300\" height=\"30\" "+
"style=\"margin:0px; padding:0px; border:0px;\" /></td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"259\" bgcolor=\"#eeeeee\" class=\"titolo\">Hotel Residence &quot; Maddalena &quot; </td>"+
"    <td width=\"37\"><div align=\"center\"><img src=\"home/star.gif\" width=\"12\" "+
"height=\"12\" /><img src=\"home/star.gif\" width=\"12\" height=\"12\" /><img "+
"src=\"home/star.gif\" width=\"12\" height=\"12\" /></div></td>"+
"  </tr>"+
"  <tr>"+
"    <td colspan=\"2\"><div align=\"justify\"><a "+
"href=\"http://www.maema-viaggi.it/Drapia_Maddalena.html\" target=\"_blank\"><img "+
"src=\"strutture/Maddalena/logo.jpg\" alt=\"\" width=\"70\" height=\"56\" "+
"border=\"0\" align=\"left\" /></a>"+
"      <p align=\"left\" >situato in una splendida e tranquilla posizione   collinare, immerso "+
"nel verde a soli 6 km dal <strong><U>mare</U>/strong> e dalla caratteristica cittadina di "+
"<strong><U>Tropea</U></strong>."+
"      </p>"+
"    </div></td>"+
"  </tr>"+
"  <tr>"+
"    <td colspan=\"2\" bgcolor=\"#eeeeee\"><div align=\"center\"> "+
"        <!-- INDIRIZZO PAGINA DETTAGLI -->"+
"        <a href=\"http://www.maema-viaggi.it/Drapia_Maddalena.html\" target=\"_blank\"> "+
"        <!-- FINE INDIRIZZO PAGINA DETTAGLI -->"+
"        Dettagli &amp; Prezzi</a></div></td>"+
"  </tr>"+
"</table>";
var marker = createMarker(point,"Hotel Residence  Maddalena 3 stelle",descrizione);
map.addOverlay(marker);

var point = new GLatLng(38.705099936361094,15.968987345695495);
var descrizione=
"<table width=\"300\" border=\"0\" style=\"border:1px #003366 solid; margin:0x; padding:0px;\">"+
"  <tr>"+
"    <td colspan=\"2\"><img src=\"mappe/sopra.jpg\" width=\"300\" height=\"30\" "+
"style=\"margin:0px; padding:0px; border:0px;\" /></td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"234\" bgcolor=\"#eeeeee\">Hotel Residence &quot; Sciabache &quot;</td>"+
"    <td width=\"62\"><div align=\"center\"><img src=\"home/star.gif\" width=\"12\" "+
"height=\"12\" /><img src=\"home/star.gif\" width=\"12\" height=\"12\" /><img "+
"src=\"home/star.gif\" width=\"12\" height=\"12\" /></div></td>"+
"  </tr>"+
"  <tr>"+
"    <td colspan=\"2\"><div align=\"justify\"><a "+
"href=\"http://www.maema-viaggi.it/Zambrone_Sciabache.html\" target=\"_blank\"><img "+
"src=\"http://www.maema-viaggi.it/strutture/Sciabache/logo.jpg\" alt=\"\" width=\"70\" height=\"56\" "+
"border=\"0\" align=\"left\" /></a>"+
"      <p align=\"left\">Direttamente sul mare cristallino il complesso si sviluppa su un area  "+
" completamente pianeggiante di circa 40.000mq...Inserito nella marina del Comune   di "+
"<strong>Zambrone</strong>,fuori dal centro abitato;dista 8 km dalla Citta di <strong><U>Tropea</U></strong>"+
"      </p>"+
"    </div></td>"+
"  </tr>"+
"  <tr>"+
"    <td colspan=\"2\" bgcolor=\"#eeeeee\"><div align=\"center\"> "+
"        <!-- INDIRIZZO PAGINA DETTAGLI -->"+
"        <a href=\"http://www.maema-viaggi.it/Zambrone_Sciabache.html\" target=\"_blank\"> "+
"        <!-- FINE INDIRIZZO PAGINA DETTAGLI -->"+
"        Dettagli &amp; Prezzi </a></div></td>"+
"  </tr>"+
"</table>";
var marker = createMarker(point,"Hotel Residence Sciabache 3 stelle",descrizione);
map.addOverlay(marker);

var point = new GLatLng(38.71152555116423,15.980553030967712);
var descrizione=
"<table width=\"300\" border=\"0\" style=\"border:1px #003366 solid; margin:0x; padding:0px;\">"+
"  <tr>"+
"    <td height=\"32\" colspan=\"2\"><img src=\"mappe/sopra.jpg\" width=\"300\" "+
"height=\"30\" style=\"margin:0px; padding:0px; border:0px;\" /></td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"248\" bgcolor=\"#eeeeee\" class=\"titolo\"><strong>Residenza Mediterranea </strong></td>"+
"    <td width=\"48\"><div align=\"center\"><img src=\"home/star.gif\" width=\"12\" height=\"12\" /><img "+
"src=\"home/star.gif\" width=\"12\" height=\"12\" /><img src=\"home/star.gif\" "+
"width=\"12\" height=\"12\" /></div></td>"+
"  </tr>"+
"  <tr>"+
"    <td colspan=\"2\" valign=\"top\"><div align=\"justify\">"+
"      <p align=\"left\"><a "+
"href=\"http://www.maema-viaggi.it/Zambrone_Mediterranea.html\" target=\"_blank\"><img "+
"src=\"http://www.maema-viaggi.it/strutture/Mediterranea/logo.jpg\" alt=\"\" width=\"70\" height=\"56\" border=\"0\" "+
"align=\"left\" /></a></p>"+
"      <p align=\"justify\">Il villaggio turistico Residenza Mediterranea si trova a Zambrone "+
"a pochi   chilometri da Tropea su una collinetta da dove si può ammirare un bellissimo   panorama. </div></td>"+
"  </tr>"+
"  <tr>"+
"    <td height=\"18\" colspan=\"2\" bgcolor=\"#eeeeee\"><div align=\"center\"> "+
"        <!-- INDIRIZZO PAGINA DETTAGLI -->"+
"        <a href=\"http://www.maema-viaggi.it/Zambrone_Mediterranea.html\" target=\"_blank\"> "+
"        <!-- FINE INDIRIZZO PAGINA DETTAGLI -->"+
"    Dettagli &amp; Foto</a></div></td>"+
"  </tr>"+
"</table>";
var marker = createMarker(point,"Residenza Mediterranea tre stelle",descrizione);
map.addOverlay(marker);

// put the assembled side_bar_html contents into the side_bar div
      document.getElementById("side_bar").innerHTML = side_bar_html;
      
    }

    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
