<!--

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 PodswietlMenu(id,kolor)
{
	if(document.all)
	{
 		var styl = eval('document.all.'+id+'.style');
		styl.backgroundColor = kolor;
	}
	else
	{
		var styl = document.getElementById(id).style;
		//styl.bgColor = kolor;
		styl.backgroundColor = kolor;
	}
	return true;
}

function otworz(arg)
{
		nn4=(document.layers)?true:false;
		ie4=(document.all)?true:false;
		if(nn4) {
		  pozycja=(window.innerWidth/2)-300;
		} else if(ie4) {
		  pozycja=(document.body.clientWidth/2)-300;
		}
		pozycja=parseInt(pozycja);
		window.open("zdjecie.php?"+arg+"&pozycja="+pozycja,"zdjecie","toolbar=no,location=no,directories=no,scrollbars=yes,scrolling=auto,menubar=no,status=no,resizable=yes,screenx="+pozycja+",screeny=30,width=600,height=480");
}

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 CzyscFormOpinii()
{
	document.dane.uzytkownik.value = "";
	document.dane.opinia.value = "";
}
function SprawdzFormOpinii()
{
	if(document.dane.uzytkownik.value.length == 0)
  	{
		alert("Wypełnij pole nick.");
		document.dane.uzytkownik.focus();
		return false;
  	}
  	if(document.dane.opinia.value.length == 0)
  	{
		alert("Wpisz opinię na temat tego produktu.");
		document.dane.opinia.focus();
		return false;
  	}
  	return true;
}

var okno = null;
function PowiekszZdjecie(url, width, height, nazwa)
{
	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();	
}

var okno = null;
function PowiekszZdjecie2(url, width, height, nazwa)
{
	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=yes,resizable=yes,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 otworz(arg)
{
		nn4=(document.layers)?true:false;
		ie4=(document.all)?true:false;
		if(nn4) {
		  pozycja=(window.innerWidth/2)-300;
		} else if(ie4) {
		  pozycja=(document.body.clientWidth/2)-300;
		}
		pozycja=parseInt(pozycja);
		window.open("XXXXX.htm?"+arg+"&pozycja="+pozycja,"zdjecie","toolbar=no,location=no,directories=no,scrollbars=yes,scrolling=auto,menubar=no,status=no,resizable=yes,screenx="+pozycja+",screeny=30,width=600,height=480");
}


function setStyle(x) { document.getElementById(x).style.background="#ffaf59" };
function resetStyle(x) { document.getElementById(x).style.background="#e85a08" };


//-->
