function loadMap(x, y, markerx, markery, zoom, adres) {
  if (GBrowserIsCompatible()) {
	var map = new GMap2(document.getElementById("map"));
	var point = new GLatLng(x,y);
	var marker = new GLatLng(markerx, markery);
	//var adres = "<strong>Cyfrowe.pl</strong><br />ul. Kartuska 149/11, 80-138 Gdańsk";
	map.setCenter(point, zoom);
	
	geocoder = new GClientGeocoder();

	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	
	// dodatkowe punkty
	
	// definiuje nowa ikone
	// createNewIcon(adres_do_obrazka, szerokosc, wysokosc, kotwica_x, kotwica_y, pozycja_wyswietlanej_chmurki_x, pozycja_wyswietlanej_chmurki_windowy)

	//var icon = createNewIcon('/images/mc.gif', 20, 20, 10, 10, 12, 0);
	//var icon2 = createNewIcon('/images/parking.gif', 20, 20, 10, 10, 12, 0);
	//var icon3 = createNewIcon('/images/land_b.gif', 63, 43, 31, 21, 40, 0);
	//var icon4 = createNewIcon('/images/land_a.gif', 63, 43, 31, 21, 40, 0);
	
	// dodaje nowy marker
	// addNewMarker(map, szerokosc_geogr, wysokosc_geogr, wyswietlany_tekst, zmienna_ikony)
	
	//addNewMarker(map, '52.172921', '21.020413', 'McDonald&rsquo;s', icon);
	//addNewMarker(map, '52.171321', '21.026019', 'Parking', icon2);
	//addNewMarker(map, '52.172521', '21.025119', 'Centrum Handlowe LAND<br /> Budynek B', icon3);
	//addNewMarker(map, '52.171721', '21.025719', 'Centrum Handlowe LAND<br /> Budynek A', icon4);
	

	map.addOverlay(createMarker(marker, adres, ''));
  }
}

function createMarker(point, text, icon) {
	if (icon) {
		var marker = new GMarker(point, icon, false);
	} else {
		var marker = new GMarker(point);
	}

	GEvent.addListener(marker, "click", function() {
	marker.openInfoWindowHtml(text);
	});

	return marker;
}

function addNewMarker(map, x, y, adres, icon) {
	var point = new GLatLng(x,y);
	
	var marker = createMarker(point, adres, icon);
	map.addOverlay(marker);
}

function createNewIcon(url, sizex, sizey, anchorx, anchory, windowx, windowy) {
	var icon = new GIcon();
	icon.image = url;
	icon.iconSize = new GSize(sizex,sizey);
	icon.iconAnchor = new GPoint(anchorx,anchory);
	icon.infoWindowAnchor = new GPoint(windowx,windowy);
	
	return icon;
}
