 xxx = window.setInterval(
		function() {
			$('#infomessage').slideUp('normal');
			window.clearInterval(xxx);
		}
		,3000);

   
   	function ShowPostMarker(post_id) {
        s = "http://walbrzychmiasto.pl/posts/getpos/"+post_id;
		GDownloadUrl(s, display_it);
	}
	
    function createMarker(point,name,html) {
        marker = new GMarker(point);
        if (html != '') {
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        }
      }
	function display_it (doc) {
        var jsonData = eval('(' + doc + ')');
        map.removeOverlay(marker);
		html = jsonData.marker.html;
        var position = new GLatLng(jsonData.marker.lat,jsonData.marker.lng);
        map.setCenter(position);
        createMarker(position, jsonData.marker.label, html);
        map.setZoom(parseInt(jsonData.marker.zoom));

        map.addOverlay(marker);
        if (html != '') {
        	marker.openInfoWindowHtml(html);
        }
	}
	

