function weryfikujKontakt() {
  var imie = document.getElementById('imie');
  var nazwisko = document.getElementById('nazwisko');
  var login = document.getElementById('login');
  var komunikat = '';
  var error = false;
  if (imie.value == "" || imie.value == null) {
    imie.style.border = "2px solid #FF0000";
    komunikat += ' Nie wypelniles pola z imieniem!';
    error = true;
  }
  if (nazwisko.value == "" || nazwisko.value == null) {
    nazwisko.style.border = "2px solid #FF0000";
    komunikat += ' Nie wypelniles pola z nazwiskiem!';
    error = true;
  }
  if (login.value == "" || login.value == null) {
    login.style.border = "2px solid #FF0000";
    komunikat += ' Nie wypelniles pola e-mail!';
    error = true;
  }
  if (error==true) {
	komunikat += ' Prosimy o poprawienie danych.';
	alert(komunikat);
    return false;
  }
  else {
	document.getElementById('kontakt').submit();
  	return true;
  }
}

function zaznacz(grupa)
{
		var zz,i,dl, pozycja;
	
		uchwyt=document.forms['koszyk'];
	
			//alert(uchwyt.elements[0].checked); 
	
		if (uchwyt.elements[0].checked!=true)
		{
				nowy_stan=false;
		}else
		{		nowy_stan=true;
				
		}
		
		//alert(nowy_stan);
		dl = uchwyt.elements.length;
		for(i=0;i<dl;i++)
			{
				//alert(dl);
			 pozycja = uchwyt.elements[i].id.indexOf(grupa);
			//alert(uchwyt.elements[i].type);
			
			if(uchwyt.elements[i].type == 'checkbox' && pozycja > 0 )
				{
					//alert(pozycja)
					uchwyt.elements[i].checked=nowy_stan;
				}
			}
	return false;	
}

function pow_zdj(duzy,width,height,extraduzy)
{
	
	document.getElementById('duzy_zdj').src='i/ladowanie_duzy.jpg';
	//document.getElementById('duzy_zdj').style.filter="alpha(opacity=0);";
	//document.getElementById('duzy_zdj').style['-moz-Opacity']="0;";
	//document.getElementById('duzy_zdj').style.opacity="0;";
	
	document.getElementById('cache_obr_id').src=duzy;	
	document.getElementById('cache_obr_id').onload=przenies(extraduzy);
	
	document.getElementById('duzy_zdj').width=width;
	document.getElementById('duzy_zdj').height=height;
	
}

function przenies(extraduzy)
{
		document.getElementById('duzy_zdj').src=document.getElementById('cache_obr_id').src;
		document.getElementById('powieksz').href=extraduzy;
}

var timeout_id;

function pokaz_powoli(obj,i)
{
		//for(i=0 ; i<=100 ; i++)
		//{
			if(i==0) clearTimeout(timeout_id);
			
			
			document.getElementById(obj).style.filter="alpha(opacity="+i+");";
			document.getElementById(obj).style['-moz-Opacity']=""+i/100+";";
			document.getElementById(obj).style.opacity=""+i/100+";";
			if(i<98)
			{
				timeout_id=setTimeout('pokaz_powoli(\''+obj +'\','+(i+2)+')',30);
			}else
			{
				clearTimeout(timeout_id);
				//alert(i);
			}
		//}
}

function pow3d(co)
{
		ok=window.open("360.php?plik=" + co,"Window","width=580,height=420,top=1,left=1,scrollbars=yes,resizable=yes,toolbar=no"); 
 		ok.focus(); 

}


function okno_sklep (co) { 
 ok=window.open("pow_sklep.php" + co,"Window","width=610,height=450,top=1,left=1,scrollbars=yes,resizable=yes,toolbar=no"); 
 ok.focus(); 
 }
 
function drukuj (co) { 
 ok=window.open("drukuj.php?file=" + co,"Window","width=680,height=510,top=1,left=1,scrollbars=yes,resizable=yes,toolbar=no"); 
 ok.focus(); 
 } 
 
function wyswietl(co, ile) {
for (var i = 1; i <= ile; i++)
if(co != i)
document.getElementById('w_'+i).style.display = 'none';
else
document.getElementById('w_'+i).style.display = 'block';
}

