<!-- //

function BullStatistic()
{
	var colorDepth = window.screen.colorDepth;
	var res = window.screen.width + "," + window.screen.height;
	var referer = escape(document.referrer);
	document.write('<img src="/statystyka/zlicz.php?colors=' + colorDepth + '&resolution=' + res + '&referer=' + referer + '" style="width:0;height:0;" />');
}

function ZamknijOkno()
{
	jQuery('#kartka').hide();
} 

function SendForm()
{
	jQuery("#send").val("9837298");
	jQuery("#formular").submit();
}

function PowiekszZdjecie(url, width, height, info, tytul)
{
	var okno = null;
	if(okno) okno.close();
	ScrWidth = 640;
	ScrHeight = 480;
	if(window.screen)
  	{
   	ScrWidth = window.screen.width;
		ScrHeight = window.screen.height;
  	}
  	PosX = Math.round((ScrWidth - width) / 2);
  	PosY = Math.round((ScrHeight - height) / 2);
  	width = width;
  	height = height;
  	okno = window.open("", "zdjecie", "menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=no,resizable=no,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);
  	okno.document.clear();
	okno.document.write("<html><head><title>" + tytul + "</title><meta http-equiv='content-type' content='text/html; charset=ISO-8859-2'></head><style type=\"text/css\">body { margin:0; padding:0; }</style><body><div align=\"center\"><img src=\""+ url +"\" alt=\"" + info + "\" title=\"" + info + "\" border=\"0\" onclick=\"window.close();\" /></div></body></html>");
	okno.document.close();
  	okno.focus();
}

function PokazZdjecia(typ,id,zdjecie)
{
	var okno = null;
	if(okno) okno.close();
	var ScrWidth = 640;
	var ScrHeight = 480;
	var width = 700;
	var height = 600;
	if(window.screen)
  	{
   	ScrWidth = window.screen.width; 
		ScrHeight = window.screen.height;
  	}
  	PosX = Math.round((ScrWidth - width) / 2);
  	PosY = Math.round((ScrHeight - height) / 2);
  	width = width;
  	height = height;
  	okno = window.open("/pokaz_zdjecia.php?typ="+typ+"&id="+id+"&zdjecie="+zdjecie, "zdjecie", "menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=no,resizable=no,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);
  	okno.focus();	
}

function SprawdzEmail(adres)
{
   a = adres.value.search(/@/i);
   a1 = adres.value.substring(0,a);
   a2 = a1.length;
   a = a + 1;
   b = adres.value.indexOf(".");
   b1 = adres.value.substring(a,b);
   b2 = b1.length;
   b = b + 1;
   c = adres.value.length;
   c1 = adres.value.substring(b,c);
   c2 = c1.length;
   if(adres.value.indexOf("@") != "-1" && adres.value.indexOf(".") != "-1" && a2 >= 1 && b2 >= 1 && c2 >= 1)
   {
   	return true;
   }
   else
   {
   	return false;
   }
}

function Print(content,lang)
{
	var okno = null;
	ScrWidth = 640;
	 width = 700;
	ScrHeight = 480;
	height = 480;
	if(window.screen)
	{
		ScrWidth = window.screen.width;
		ScrHeight = window.screen.height;
	}
	if(okno != null && !document.layers)
	{
		okno.close();
	}
	PosX = Math.round((ScrWidth - width) / 2);
	PosY = Math.round((ScrHeight - height) / 2);
	okno = window.open("/print.php?content="+content+"&lang="+lang, "aktualnosci", "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);
	okno.focus();
}

function WyslijEmail(uzytkownik, domena, temat)
{
	var OtworzProgramPocztowy = "mailto:" + uzytkownik + "@" + domena + "?Subject=" + temat;
	window.location = OtworzProgramPocztowy;
}

function Search()
{
	var phrase = $('phrase').value;
	if(phrase.length < 3) { alert('Podaj co najmniej 3 znaki'); return false; }
	else if(phrase == 'wpisz szukane słowo') { alert('Podaj szukaną frazę'); return false; }
	else $('searching_form').submit();
}

function $(id)
{
	return document.getElementById(id);
}

var map='';

function loadMap()
{
	if (GBrowserIsCompatible())
	{
		map = new GMap2(document.getElementById("mapa_dojazdu"));
		map.setCenter(new GLatLng(51.774001, 19.481506), 13);
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
	}
}

function setMapPoint(address,zoom)
{
	if(zoom == '') zoom = 11;
	var geocoder = new GClientGeocoder();
	var marker;
			if(address)
			{
				  geocoder.getLatLng(
				    address,
				    function(point) {


				      if (!point) {
				        jQuery("#map").hide();
				      } else {
				      	map.addOverlay(new GMarker(point));
				      	map.setCenter(point, zoom);
				      }
				    }
				  );
			}
			else
			{
				var center = new GLatLng(51.774001, 19.481506);
				map.setCenter(center, 11);
			}
}

// -->