//nowe okno o okreslonych wymiarach
function new_window(plik,sze,wys)
{
 x = Math.round((screen.width/2)-(sze/2));
 y = Math.round((screen.height/2)-(wys/2));
 window.open(plik,'popup','toolbar=no,scrollbars=yes,resizable=no,status=no,menubar=no,location=no,directories=no,width='+eval(sze)+',height='+eval(wys)+',left='+eval(x)+',top='+eval(y)+'')
}

//powiekszenia obrazków
function img_zoom(nazwa,x,y)
{
 if (y>screen.height)
  {
   x = x + 20;
   y = screen.height-100;
  }
 x = x+25;
 y = y+25; 
 okno=window.open("", "","scrollbars=yes, status=no, width="+x+", height="+y)
 napis="<html><head><title>Powiekszenie</title><style type=\"text/css\">body {background: url(img/loading.gif) fixed no-repeat center; }</style></head><body><div style='position:absolute; left:5; top:5'><a href='javascript:window.close()'><img src=\""+nazwa+"\" border=0></a></div></body></html>"
 okno.document.write(napis)
}

function check_newsletter(email, tryb)
{
 //Kontrola E-mail [Robert Kuśmierz | www.rob2.prv.pl | robertkusmierz(at)wp.pl]
 wzor_email=/^[0-9a-z._-]+(@|\(at\))+[0-9a-z._-]+\.[a-z]{2,3}$/i;
 pole = eval(email);
 pole = pole.value;
 if (document.newsletter.potwierdz.checked==false) { alert("Proszę zaakceptować politykę prywatności."); return false; } 
 if (!wzor_email.test(pole)) { alert("E-mail niepoprawny."); return false; }
 else
 {
  document.newsletter.tryb.value=tryb;
  document.newsletter.submit();
  return true;
 }
}
