    //<![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()) { 

      // ========== Read paramaters that have been passed in ==========
      
      // Before we go looking for the passed parameters, set some defaults
      // in case there are no parameters
      var id;
      var index = -1;

      // If there are any parameters at eh end of the URL, they will be in  location.search
      // looking something like  "?marker=3"

      // skip the first character, we are not interested in the "?"
      var query = location.search.substring(1);

      // split the rest at each "&" character to give a list of  "argname=value"  pairs
      var pairs = query.split("&");
      for (var i=0; i<pairs.length; i++) {
        // break each pair at the first "=" to obtain the argname and value
	var pos = pairs[i].indexOf("=");
	var argname = pairs[i].substring(0,pos).toLowerCase();
	var value = pairs[i].substring(pos+1).toLowerCase();

        // process each possible argname  -  use unescape() if theres any chance of spaces
        if (argname == "id") {id = unescape(value);}
        if (argname == "marker") {index = parseFloat(value);}
      }


      var gmarkers = [];
      var idmarkers = [];

      // A function to create the marker and set up the event window
      function createMarker(point,id,html,adresa,icon) {
        var marker = new GMarker(point, customIcons[icon]);
		var html = "<b>" + html + "</b> <br/>" + adresa;
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        // save the info we need to find this marker
        gmarkers.push(marker);
        idmarkers[id.toLowerCase()] = marker;
        return marker;
      }

      // create the map
      var map = new GMap2(document.getElementById("maplaborator"));
      map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(44.427,26.087),15, G_HYBRID_MAP);

      // Read the data from romania-laborator-dentar.php
      var request = GXmlHttp.create();
      request.open("GET", "maps/romania-laborator-dentar.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);
          }
          // ========= If a parameter was passed, open the info window ==========
          if (id) {
            if (idmarkers[id]) {
              GEvent.trigger(idmarkers[id],"click");
            } else {
              alert("Laboratorul cu 'id-ul': "+id+" nu se afla pe harta!");
            }
          }
          if (index > -1) {
            if (index < gmarkers.length) {
              GEvent.trigger(gmarkers[index],"click");
            } else {
              alert("marker "+index+" does not exist");
            }
          }


        }
      }
      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
