function SprawdzFormularz(f) { 
if (f.email.value=='') { alert('Nie podałeś/aś adresu e-mail.'); return false; } 
if ( ((f.email.value.indexOf('@',1))==-1)||(f.email.value.indexOf('.',1))==-1 ) { alert('Podałeś/aś błędny adres e-mail'); return false; } 
if (f.imie.value=='') { alert('Nie podałeś/aś swojego imienia'); return false; } 
if (f.nazwisko.value=='') { alert('Nie podałeś/aś swojego nazwiska'); return false; } 
if (f.pp.checked == false ) { alert('Musisz zgodzić się z Polityką Prywatności.'); return false; } 
else { return true; } 
} 

function ClosePOP() 
{
 try
 {  
  zamknal = 1;
  if (!(document.all))  //Mozilla
  {
  document.getElementById('popup22').style.display = 'none';
  document.getElementById('popup22').innerText='';}
  else {
  document.all('popup22').style.display = 'none';
  document.all['popup22'].innerText='';}
 }catch (e) {}
}

function PobierzWartoscCookie(nazwa) {
 var dc = document.cookie;
 var prefix = nazwa + "=";
 var begin = dc.indexOf("; " + prefix); 
 if (begin == -1) { 
   begin = dc.indexOf(prefix);
   if (begin != 0) return null;
 } else 
   begin += 2;
 var end = document.cookie.indexOf(";", begin);
 if (end == -1) 
   end = dc.length;
 return unescape(dc.substring(begin + prefix.length, end)); 
}

var byl;
var zamknal=0;

function floatLayer(){
var xx=80;
var yy=220;

if (PobierzWartoscCookie('layer')=='byl') 
{
  if (byl!='byl')
  {
	  ClosePOP();
	  return false;
  }
}
else
{
	document.cookie="layer=byl;";
	byl = 'byl';
}

  if (!(document.all)) 
  {
	document.getElementById('popup22').style.display = 'block';
	document.getElementById("popup22").style.left= window.scrollX+xx+ "px";
	document.getElementById("popup22").style.top= window.scrollY+yy+ "px";
  }
  else{
	document.all.popup22.style.display = 'block';
	document.all.popup22.style.left= document.body.scrollLeft+xx+"px";	
	document.all.popup22.style.top= document.body.scrollTop+yy+ "px";
  }
  
  //if (zamknal!=1)
//	floatLayer('floatLayer()',25);
} 



