var mapa;
	
	function mapaStart()
	{
		if(GBrowserIsCompatible())  
		{
			
			function dodajMarker(lat,lon,txt)
			{
				// tworzymy marker

				var ikona = new GIcon();
					ikona.image='img/ikony/marker.png';
					ikona.shadow='';
					ikona.iconSize=new GSize(16,16);
					ikona.iconAnchor=new GPoint(16,16);
					ikona.infoWindowAnchor=new GPoint(16,16);
					ikona.iconAnchor = new GPoint(8, 8);
					ikona.infoWindowAnchor = new GPoint(16, 0);
				
				
				var marker = new GMarker(new GLatLng(lat,lon),{icon: ikona});
				marker.txt=txt;
				
				

				mapa.addOverlay(marker);
				GEvent.addListener(marker,"click",function() {
					marker.openInfoWindowHtml(marker.txt);
				});
				return marker;
			}
		
			mapa = new GMap2(document.getElementById('mapka'));
			mapa.setCenter(new GLatLng(52.2165997, 20.9034694),15);
  			mapa.addControl(new GMapTypeControl());
			mapa.addControl(new GSmallMapControl());

			var typyMapy = mapa.getMapTypes();     
			typyMapy[0].getName = function() { return "Mapa";}      
			typyMapy[1].getName = function() { return "Satelita";}    
			typyMapy[2].getName= function() { return "Hybryda";}     


			var marker = dodajMarker(52.2165997, 20.9034694 ,'<div class="dymek"><h4>Oknotex</h4><p>ul. Fortuny 28, 01-339 Warszawa</p></div>');
					
			// marker.openInfoWindowHtml(marker.txt);

			/*var punkty1=[new GLatLng(52.2611315286944, 20.9212946891785), new GLatLng(52.2612694298222, 20.9212303161621),new GLatLng(52.2615714974607, 20.9214234352112),new GLatLng(52.2619195293626, 20.9213054180145),new GLatLng(52.2620508614459, 20.9205973148346),new GLatLng(52.2619326625884, 20.9200179576874),new GLatLng(52.2621099607565, 20.9195458889008),new GLatLng(52.2623857564978, 20.9193098545074),new GLatLng(52.2626549840193, 20.9185695648193)];
       
			var polilinia1 = new GPolyline(punkty1,'#f39f3f', 8, 0.75);   

			mapa.addOverlay(polilinia1); 

			var punkty2=[new GLatLng(52.2596736905436, 20.9224319458008), new GLatLng(52.2599889028533, 20.9218204021454), new GLatLng(52.2599889028533, 20.9216809272766), new GLatLng(52.2602909792143, 20.9210371971130), new GLatLng(52.2604354497901, 20.9210157394409), new GLatLng(52.2605536526383, 20.9211122989655)];
       
			var polilinia2 = new GPolyline(punkty2,'#f39f3f', 8, 0.75);   

			mapa.addOverlay(polilinia2); 

			GEvent.addListener(polilinia1,'click',function(pt)
				{
				mapa.openInfoWindowHtml(pt, '<div class="dymek"><p>Dojazd od ul. </p></div>');
				});

			GEvent.addListener(polilinia2,'click',function(pt)
				{
				mapa.openInfoWindowHtml(pt, '<div class="dymek"><p>Dojazd od ul. </p></div>');
				});
			*/
		}
	}

