<!--

var from = escape(document.referrer);
var query = location.search;
var colorDepth = window.screen.colorDepth;			
var res = window.screen.width + "," + window.screen.height;
document.write("<img src='statystyka/zlicz.php?referer=" + from + "&query=" + query + "&kolory=" + colorDepth + "&rozdzielczosc=" + res + "' align='middle' style='display:none'>");

function KontrolaIlosci(pole,msg) 
{
	WzorN = /^[0-9]{1,4}$/;
  	if(!WzorN.test(pole.value))
  	{
		window.alert(msg);
		pole.focus();
		return false;
  	}
  	return true;
}

var okno = null;
function PowiekszZdjecie(url, width, height)
{
	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);
  	okno = window.open("galeria.php?sciezka="+url, "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 SprawdzFormKontaktu(msg,msg2)
{
	var form = document.forms["kontakt"];
	if(form.elements["imie_i_nazwisko"].value.length == 0) 
  	{
		alert(msg);
		form.elements["imie_i_nazwisko"].focus();
		return false;
  	}
  	if(form.elements["email"].value.length == 0) 
  	{
		alert(msg);
		form.elements["email"].focus();
		return false;
  	}
  	else
  	{
  		if(!SprawdzEmail(form.elements["email"]))
  		{
  			alert(msg2);
  			form.elements["email"].focus();
			return false;
		}
  	}
  	if(form.elements["tresc"].value.length == 0) 
  	{
		alert(msg);
		form.elements["tresc"].focus();
		return false;
  	}
  	return true;
}

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;
   }		
}

-->