    //<![CDATA[

    if (GBrowserIsCompatible()) {
    
      // because the function closure trick doesnt work there
      var gmarkers = [];
      var htmls = [];
      var i = 0;
      
      // === Create an associative array of GIcons() ===
//      var gicons = [];
//      gicons["ruralverde"] = new GIcon(G_DEFAULT_ICON, "http://www.atajorural.es/imagenes/googlemapsmarkerverde.png");

var icon = new GIcon(G_DEFAULT_ICON); //new GIcon();
icon.image = "http://www.atajorural.es/imagenes/googlemapsmarkerverde.png";
//icon.shadow = "http://labs.google.com/ridefinder/images/mm_16_shadow.png";
icon.iconSize = new GSize(12, 21);
//icon.shadowSize = new GSize(15, 28);
icon.iconAnchor = new GPoint(12, 21);
icon.infoWindowAnchor = new GPoint(5, 1);

	var gicons = [];
	gicons["ruralverde"] = icon;

      // A function to create the marker and set up the event window
      function createMarker(point,name,html,icontype) {
        // === create a marker with the requested icon ===
        var marker = new GMarker(point, gicons[icontype]);
        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;
        i++;
        return marker;
      }


      // This function picks up the click and opens the corresponding info window
      function myclick(i) {
        gmarkers[i].openInfoWindowHtml(htmls[i]);
      }


      // create the map
      var map = new GMap2(document.getElementById("mapa_casa_rural"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(latitud,longitud), profundidadZoom);


      // Read the data from example5.xml
      var request = GXmlHttp.create();
      request.open("GET", rutaXML, true);
      request.onreadystatechange = function() {
        if (request.readyState == 4) {
          var xmlDoc = GXml.parse(request.responseText);
          // 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");
            // === read the icontype attribute ===
            var icontype = markers[i].getAttribute("icontype");
            // === create the marker, passing the icontype string ===
            var marker = createMarker(point,label,html,icontype);
            map.addOverlay(marker);
          }
        }
      }
      request.send(null);
    }
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }

    //]]>
    
