<!-- //

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 PowiekszZdjecie(url, width, height)
{
	var okno = null;
	height = height + 4;
	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 PokazInformacje(url, width, height)
{
	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(url, "oknododatkowe", "menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,resizable=no,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);
  	okno.focus();	
}

function sprawdz_form_kontaktu(msg,msg2)
{
	if(document.konakt.imie_i_nazwisko.value.length == 0 || document.konakt.email.value.length == 0 || document.konakt.tresc.value.length == 0) 
  	{
		alert(msg);
		return false;
  	}
  	if(!sprawdzemail(document.konakt.email))
  	{
  		alert(msg2);
  		document.konakt.email.focus();
		return false;
  	}
  	return true;
}

function sprawdz_form_zamowienia(msg,msg2)
{
	f = document.zamowienie;
	if(f.imie_i_nazwisko.value.length == 0 || f.email.value.length == 0) 
  	{
		alert(msg);
		return false;
  	}
  	if(!sprawdzemail(f.email))
  	{
  		alert(msg2);
  		f.email.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;
   }		
}

function PobierzPlik(id)
{
	var pobierzplik = null;
	width = 600;
	height = 300;
	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("pobierz_plik.php?id=" + id + "", "pobierzplik", "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();	
}

// -->
