    //<![CDATA[
	
	var nrecords;
	
    if (GBrowserIsCompatible()) {
      // 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 id_hotel = [];
	  var id_foto = [];
	  var url = [];	  
      var i = 0;
	  var gicons = [];
	  
///////////// CREA ICONA HOTEL   	  
      var hotIcon = new GIcon();
      hotIcon.image = "http://www.nyceamsterdam.com/img-google-maps/puntatore1.png";
      hotIcon.iconSize = new GSize(15, 15);
      hotIcon.iconAnchor = new GPoint(7, 7);
      hotIcon.infoWindowAnchor = new GPoint(7, 7);
    
      var coldIcon = new GIcon(hotIcon);
      coldIcon.image = "http://www.nyceamsterdam.com/img-google-maps/puntatore.png"; 
	   	
 // There are now two arrays of markers, one for cold icons and one for hot
      var cmarkers = [];
      var hmarkers = [];
      var htmls = [];
      var i = 0;
	
////////////////////////FUNZIONE CREA AEROPORTI BERLIN////////////////////////
	  function createMarkerAir(point, testohtml) {
  		var markerAir = new GMarker(point,gicons["air"]);
		//alert(point);
  		GEvent.addListener(markerAir, "click", function() {
    	markerAir.openInfoWindowHtml(testohtml);
  		});
  		return markerAir;
		}
////////////////////////FUNZIONE CREA MONUMENTI BERLIN////////////////////////
	  function createMarkerSight(points, monumento, descrizione, foto) {
  		var markerSight = new GMarker(points,gicons["sight"]);
  		GEvent.addListener(markerSight, "click", function() {
    	markerSight.openInfoWindowHtml('<table width=260 border=0 cellpadding=2 cellspacing=0 bgcolor=#FFFFFF><tr><td><img src=http://www.nyceamsterdam.com/img-google-maps/major-sights-amsterdam/'+foto+'.gif width=90 height=70></td><td class=monumenti><span class=titolo13>'+monumento+'</span><br><br>'+descrizione+'</td></tr></table>');
  		});
  		return markerSight;
		}
		
////////////////////////FUNZIONE CREA MARKER + MOUSEOVER////////////////////////
     function createMarker(point,name,html,idhotel,urlvisit,idfoto) {
        var marker = new GMarker(point, coldIcon);
        GEvent.addListener(marker, "mouseover", function() {
		 //marker.openInfoWindowHtml(html);				 
         marker.openInfoWindowHtml('<table width="250" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF"><tr><td width=90><img src=http://www.nyceamsterdam.com/img-google-maps/'+idfoto+' width=90 height=70></td><td align="center" class=titolo13>'+html+'<p align="center"><a href=http://www.nyceamsterdam.com/accommodation/amsterdam-hotels/'+urlvisit+'-homepage.html class="visitbook" target="_blank">Visit the Hotel</a>&nbsp;&nbsp;&nbsp;<a href=http://www.nyceamsterdam.com/h_booking.php?id='+idhotel+' class="visitbook" target="_blank">Book now</a></p></td></tr></table>');
        });   
		
        // save two markers for each point, one with each of the possible icons
        cmarkers[i] = marker;
        hmarkers[i] = new GMarker(point,hotIcon);
        htmls[i] = html;
		id_hotel[i] = idhotel;
		id_foto[i] = idfoto;
		url[i] = urlvisit;		
        		
		// MENU DELLA DESTRA TUTTI GLI HOTELS
		if (i<1) { side_bar_html +='<ul>';}
        side_bar_html += '<li> <a href="javascript:myclick(' + i + ')" onmouseover="mymouseover('+i+')" onmouseout="mymouseout('+i+')"> ' + name + '</a></li><br>';
		if (i==(nrecords-1)) { side_bar_html +='</ul>';}
        i++;
        return marker;
      }
      // This function picks up the click and opens the corresponding info window
      function myclick(i) {
        hmarkers[i].openInfoWindowHtml('<table width="250" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF"><tr><td width=90><img src=http://www.nyceamsterdam.com/img-google-maps/'+id_foto[i]+' width=90 height=70></td><td align="center" class=titolo13>'+htmls[i]+'<p align="center"><a href=http://www.nyceamsterdam.com/accommodation/amsterdam-hotels/'+url[i]+'-homepage.html class="visitbook" target="_blank">Visit the Hotel</a>&nbsp;&nbsp;&nbsp;<a href=http://www.nyceamsterdam.com/h_booking.php?id='+id_hotel[i]+' class="visitbook" target="_blank">Book now</a></p></td></tr></table>');
      }      
      // This function is invoked when the mouse goes over an entry in the side_bar
      // It deletes the cold Icon marker and replaces it with the hot Icon marker      
      function mymouseover(i) {
        map.removeOverlay(cmarkers[i]);
        map.addOverlay(hmarkers[i]);
      }
      // This function is invoked when the mouse leaves an entry in the side_bar
      // It deletes the hot Icon marker and replaces it with the cold Icon marker      
      function mymouseout(i) {
        //map.removeOverlay(hmarkers[i]);
        map.addOverlay(cmarkers[i]);
      }      

////////////////////////CREA LA MAPPA PRINCIPALE + CONTROLLI
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
	  map.addControl(new GOverviewMapControl());
      map.setCenter(new GLatLng(52.366189,4.889999), 13); 
	  map.getPane(G_MAP_FLOAT_SHADOW_PANE).style.visibility="hidden"; 
		
      //CREA ICONA MONUMENTI
	  var url_img= "http://www.nyceamsterdam.com/img-google-maps/sight.png";
	  gicons["sight"] = new GIcon(G_DEFAULT_ICON, url_img);
      gicons["sight"].iconSize = new GSize(15, 15);
	  gicons["sight"].shadow = "";
	  gicons["sight"].iconAnchor = new GPoint(7, 7);
	  gicons["sight"].infoWindowAnchor = new GPoint(7, 7);
	  
	  //CREA ICONA AEROPORTO
	  var url_img= "http://www.nyceamsterdam.com/img-google-maps/aeroporto.png";
	  gicons["air"] = new GIcon(G_DEFAULT_ICON, url_img);
      gicons["air"].iconSize = new GSize(15, 15);
	  gicons["air"].shadow = "";
	  gicons["air"].iconAnchor = new GPoint(7, 7);
	  gicons["air"].infoWindowAnchor = new GPoint(7, 7);

////////////////////////MARKERS AIRPORTS
	 var point = new GLatLng(52.309106, 4.75992);
  	   map.addOverlay(createMarkerAir(point, '<table width="250" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF"><tr><td align="center" class=monumenti><span  class=titolo12>Amsterdam Schiphol Airport</span><p align="center">The airport is located about 15 Km to the southwest of Amsterdam.</p></td></tr></table>'));
 
	 
	 
////////////////////////LEGGE IL FILE HOTELS////////////////////////
      var request = GXmlHttp.create();
      request.open("GET", "http://www.nyceamsterdam.com/map-hotels-in-amsterdam/hotels.php", true);
      request.onreadystatechange = function() {
        if (request.readyState == 4) {
          var xmlDoc = request.responseXML;
          // obtain the array of markers and loop through it
          var markers = xmlDoc.documentElement.getElementsByTagName("marker");
          
          for (var i = 0; i < markers.length; i++) {
            // obtain the attribues of each marker
            var lat = parseFloat(markers[i].getAttribute("lat"));
            var lng = parseFloat(markers[i].getAttribute("lng"));
            var point = new GLatLng(lat,lng);
            var html = markers[i].getAttribute("html");
            var label = markers[i].getAttribute("label");
			var idhotel = markers[i].getAttribute("id_hotel");
			var urlvisit = markers[i].getAttribute("url");
			var idfoto = markers[i].getAttribute("foto");
            // create the marker
            var marker = createMarker(point,label,html,idhotel,urlvisit,idfoto);
            map.addOverlay(marker);
			nrecords=markers.length;
          }
          // put the assembled side_bar_html contents into the side_bar div
          document.getElementById("side_bar").innerHTML = side_bar_html;
        }
      }
request.send(null);
////////////////////////LEGGE IL FILE MONUMENTI XML////////////////////////
     
	 var request1 = GXmlHttp.create();
      request1.open("GET", "http://www.nyceamsterdam.com/map-hotels-in-amsterdam/monumenti.php", true);
      request1.onreadystatechange = function() {
        if (request1.readyState == 4) {
          var xmlDoc = request1.responseXML;
          // obtain the array of markers and loop through it
          var markers = xmlDoc.documentElement.getElementsByTagName("marker");
          
          for (var i = 0; i < markers.length; i++) {
            // obtain the attribues of each marker
            var lat = parseFloat(markers[i].getAttribute("lat"));
            var lng = parseFloat(markers[i].getAttribute("lng"));
            var points = new GLatLng(lat,lng);
            var monumento = markers[i].getAttribute("monumento");
			var descrizione = markers[i].getAttribute("des");
			var foto = markers[i].getAttribute("foto");
            // create the marker
           var marker = createMarkerSight(points, monumento, descrizione, foto);
            map.addOverlay(marker);
			nrecords=markers.length;
          }
        }
      }
      request1.send(null);

    }
////////////////////////SE NON è COMPATIBILE NON CARICA////////////////////////
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }