    if (GBrowserIsCompatible()) {
      var side_bar_html = "";
      var gmarkers = [];
      var htmls = [];
      var i = 0;
      
      // Floraart icon 
      var floIcon = new GIcon();
      floIcon.image = "images/floraart.png";
      floIcon.shadow = "images/floraarts.png";
      floIcon.iconSize = new GSize(128, 34);
      floIcon.shadowSize = new GSize(140, 34);
      floIcon.iconAnchor = new GPoint(9, 34);
      floIcon.infoWindowAnchor = new GPoint(9, 2);
      floIcon.infoShadowAnchor = new GPoint(18, 25);

      // Zrinjevac icon       
      var zriIcon = new GIcon();
      zriIcon.image = "images/logo_zri32.png";
      zriIcon.shadow = "images/logo_zri32s.png";
      zriIcon.iconSize = new GSize(32, 32);
      zriIcon.shadowSize = new GSize(43, 32);
      zriIcon.iconAnchor = new GPoint(5, 34);
      zriIcon.infoWindowAnchor = new GPoint(5, 2);
      zriIcon.infoShadowAnchor = new GPoint(14, 25);
      
      var icons = [];
      icons[0] = floIcon;
      icons[1] = zriIcon;

      // the icon information is passed to this function
      function createMarker(point,name,html,icontype) {
        var marker = new GMarker(point,icons[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;
        // add a line to the side_bar html
        side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '<\/a><br>';
        i++;
        return marker;
      }

      function myclick(i) {
        gmarkers[i].openInfoWindowHtml(htmls[i]);
      }

      var map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(45.783, 15.983), 15);
      map.setUIToDefault();


      // Citanje podataka iz kakoDoFloraarta.xml
      var request = GXmlHttp.create();
      request.open("GET", "kakoDoFloraarta.xml", true);
      request.onreadystatechange = function() {
        if (request.readyState == 4) {
          var xmlDoc = GXml.parse(request.responseText);
          // polje markera
          var markers = xmlDoc.documentElement.getElementsByTagName("marker");
          
          for (var i = 0; i < markers.length; i++) {
            // Atributi markera
            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 icontype = parseInt(markers[i].getAttribute("icontype"));
            // Dodavanje markera
            var marker = createMarker(point,label,html,icontype);
            map.addOverlay(marker);
          }
          // put the assembled side_bar_html contents into the side_bar div
          //document.getElementById("side_bar").innerHTML = side_bar_html;
        }
      }
      request.send(null);
    }

    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }