    //<![CDATA[
        var iconYellow = new GIcon(); 
    iconYellow.image = 'http://www.abcdent.ro/maps/icons/mm_20_yellow.png';
    iconYellow.shadow = 'http://www.abcdent.ro/maps/icons/mm_20_shadow.png';
    iconYellow.iconSize = new GSize(12, 20);
    iconYellow.shadowSize = new GSize(22, 20);
    iconYellow.iconAnchor = new GPoint(6, 20);
    iconYellow.infoWindowAnchor = new GPoint(5, 1);

    var iconRed = new GIcon(); 
    iconRed.image = 'http://www.abcdent.ro/maps/icons/mm_20_red.png';
    iconRed.shadow = 'http://www.abcdent.ro/maps/icons/mm_20_shadow.png';
    iconRed.iconSize = new GSize(12, 20);
    iconRed.shadowSize = new GSize(22, 20);
    iconRed.iconAnchor = new GPoint(6, 20);
    iconRed.infoWindowAnchor = new GPoint(5, 1);
	
	var iconBrown = new GIcon(); 
    iconBrown.image = 'http://www.abcdent.ro/maps/icons/mm_20_brown.png';
    iconBrown.shadow = 'http://www.abcdent.ro/maps/icons/mm_20_shadow.png';
    iconBrown.iconSize = new GSize(12, 20);
    iconBrown.shadowSize = new GSize(22, 20);
    iconBrown.iconAnchor = new GPoint(6, 20);
    iconBrown.infoWindowAnchor = new GPoint(5, 1);

    var customIcons = [];
    customIcons["yellow"] = iconYellow;
    customIcons["red"] = iconRed;
	customIcons["brown"] = iconBrown;
    var markerGroups = { "yellow": [], "red": [], "brown": []};

    if (GBrowserIsCompatible()) { 

      var gmarkers = [];

      // A function to create the marker and set up the event window
      function createMarker(point,label,html,adresa,icon) {
        var marker = new GMarker(point, customIcons[icon]);
		markerGroups[icon].push(marker);
		var html = "<b>" + html + "</b> <br/>" + adresa;
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        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("mapurgente"));
      map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(46,25),5, G_HYBRID_MAP);
		  
		  
		  // empty the arrays
          gmarkers = [];

      // Read the data from example.xml
      var request = GXmlHttp.create();
      request.open("GET", "maps/urgente.php", 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 adresa = markers[i].getAttribute("adresa");
			var html = markers[i].getAttribute("html");
			var label = markers[i].getAttribute("label");
			var icon = markers[i].getAttribute("icon");
            // create the marker
            var marker = createMarker(point,label,html,adresa,icon);
            map.addOverlay(marker);
          }


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

    // This Javascript is based on code provided by the
    // Blackpool Community Church Javascript Team
    // http://www.commchurch.freeserve.co.uk/   
    // http://econym.googlepages.com/index.htm

    //]]>
      // create the map
