<!-- //

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 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 SprawdzFormularzKontaktu(msg1,msg2)
{
	var form = document.forms["FormularzKontaktu"];
	var error = false;
	if(form.elements["imie_i_nazwisko"].value == "")
	{
		alert(msg1);
		form.elements["imie_i_nazwisko"].focus();
		return false;
	}
	if(!error && form.elements["email"].value == "")
	{
		alert(msg1);
		form.elements["email"].focus();
		return false;
	}
	if(!error && form.elements["email"].value != "")
	{
		if(!SprawdzEmail(form.elements["email"]))
		{
			alert(msg2);
			form.elements["email"].focus();
			return false;
		}
	}
	if(!error && form.elements["tresc"].value == "")
	{
		alert(msg1);
		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;
   }
}

function Drukuj(podstrona_id,akcja,q,akt_id)
{
	var okno = null;
	okno = window.open("/drukuj.php?pod_id="+podstrona_id+"&action="+akcja+"&q="+q+"&akt_id="+akt_id+"", "wersja_do_druku", "menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,resizable=no,copyhistory=no,width=600,height=600,left=50,top=50");
	okno.focus();
}
function $(id)
{
	return document.getElementById(id);
}

function getContent(id)
{
	//alert(id);
	advAJAX.get({
   url: "/include/ajx_get_content.php?id="+id+"&lang="+lang,    onSuccess : function(obj) { $('main_right').innerHTML = obj.responseText; }});

}
// -->
