
	var baseIcon;

	var x1,y1,z1,x2,y2;
    function loadG(x,y,zoom,text,sdragable) {
		x1=x;
		y1=y;
		z1=zoom;
		x2=x;
		y2=y;
		baseIcon= new GIcon();
		//alert(text);
		
		  if (GBrowserIsCompatible()) 
		  {
	
				baseIcon= new GIcon();
				id_el=document.getElementById("mapaG");
				
				map = new GMap2(id_el);
				//alert(id_el);
				
			  
				map.addControl(new GSmallMapControl()); // jojstik
				//map.addControl(new GMapTypeControl()); // typ mapy
				map.setCenter(new GLatLng(x,y), zoom);
		
		
				map.openInfoWindowHtml(map.getCenter(),document.createTextNode(text));
// Our info window content
var infoTabs = [
  new GInfoWindowTab("Info", '<div class="infotab">'+text+'</div>'),
 ];
		
		
				// Place a marker in the center of the map and open the info window
				// automatically
				marker = new GMarker(map.getCenter(),{draggable:sdragable});
				

				map.addOverlay(marker);
				
				
				
		
				baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
				baseIcon.iconSize = new GSize(20, 34);
				baseIcon.shadowSize = new GSize(37, 34);
				baseIcon.iconAnchor = new GPoint(9, 34);
				baseIcon.infoWindowAnchor = new GPoint(9, 2);
				baseIcon.infoShadowAnchor = new GPoint(18, 25);
	
		  }
    }
	
	

	
function zdjecie(co)
{
	pokaz_okno(co);
}	

 function pokaz_mape_google (lok, lang) {
	
 ok=window.open('mapa_google.php?lok='+lok+"&lang="+lang,"mapa_G",  'width=600,height=750,resizable=1,scrollbars=no,menubar=no');
 ok.focus();
 
 } 
 
  function pokaz_mape_google2 (x, y, z, nazwa) {
	 ok=window.open('mapa_google.php?geo_x='+x+"&geo_y="+y+"&geo_zoom="+z+"&nazwa="+nazwa,"mapa_G",  'width=600,height=500,resizable=1,scrollbars=no,menubar=no');
 	ok.focus();
 
 } 
 function otworz_adres(adres,temat,cialo,rot)
 {
	 	
		//alert($adres)
		w6='o'; w5='t'; w2='a'; w1='m'; w7=':';
		w3='i';	w4='l';p1='d';p2='y';	s1='s';
		s2='u';	s3='b'; s4='j'; s5='e';s6='c';	s7='t'; s8='=';		
		
		//alert(rot,lin1k);
		
		//mpStr = String.reverse(adres);
		adres=unescape(adres);
		mpStr='';
		 for (i = 0; i <= adres.length; i++) {
    		mpStr = adres.charAt (i) + mpStr;
  		} 
		
		
		strLen = mpStr.length;
		if (strLen > 0)  {
			tmpStr='';
			for (index = 0; index < strLen; index++)  {
				
					if(Math.floor(index/2)==index/2)
					{
					//tmpChar = tmpStr.substring(0,1).toUpperCase();
					postString = String.fromCharCode(parseInt(mpStr.charCodeAt(index))-parseInt(rot));
					tmpStr = tmpStr + postString;
					//alert(postString);
					}
			}
			
			//alert(tmpStr);
		}
		
		lin1k=w1+w2+w3+w4+w5+w6+w7+tmpStr+'?'+s1+s2+s3+s4+s5+s6+s7+s8+''+temat+'&amp;'+s3+w6+p1+p2+s8+cialo;
		
		//alert(lin1k);
		window.open(lin1k);
 }

		  
	  


