    var map = null;
    var geocoder = null;

	function initialize() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_div"));
        map.setCenter(new GLatLng(50.308451,17.381676), 13);
		map.setUIToDefault();
		map.enableRotation();
        geocoder = new GClientGeocoder();
      }
      
    } 
    
    function getIcon(img) {
      
        var icon = new GIcon();
        icon.image = img;
        icon.iconAnchor = new GPoint(40, 40);
        icon.infoWindowAnchor = new GPoint(0, 0);
        icon.iconSize = new GSize(93, 49);

      return icon;
    }

   
    function createMarker(point, t, i) {
          // Create a lettered icon for this point using our icon class

          var letteredIcon = getIcon("img/logo_m.jpg");

          // Set up our GMarkerOptions object
          markerOptions = { icon:letteredIcon };
          var marker = new GMarker(point, markerOptions);

          GEvent.addListener(marker, "click", function() {
            	map.setCenter(marker.getLatLng(), i);
				map.openInfoWindow(map.getCenter(), t);
          });
          return marker;
        }
        

    function addAddress(x, y, message) {
      
              var marker = new createMarker(new GLatLng(x,y), message, 15);
              map.addOverlay(marker);
   }

