function pokaz_obrazek(patch,xx,yy,title,txt)
{
hg=yy+100;
wd=xx+10;
ext_pic=open('', '', 'width='+wd+', height='+hg+'');
ext_pic.document.write('<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-2\"><title>'+title+'</title></head><body topmargin=5 leftmargin=5 marginheight=5 marginwidth=5><img src=\"'+patch+'\" onclick="javascript:self.close();" alt="Kliknij, aby zamkn±ć!" /><br><br><table width="100%" border=0 cellpadding=0 cellspacing=0><tr bgcolor=#c3c3c3 height=1><td></td></tr><tr bgcolor=#e5e5e5><th height=30><font face="Verdana" size="2">'+txt+'</th></tr><tr bgcolor=#c3c3c3 height=1><td></td></tr></table></body></html>');
}

function checkForm()
{
var bledy=true;
var tekst="";

var wzorMaila = /^[0-9a-z_.-]+@[0-9a-z.-]+\.[a-z]{2,3}$/i;
var wzorLiczby = /^\d+$/;

if (document.formularz.imie.value=="" || document.formularz.nazwisko.value=="" || document.formularz.firma.value=="" || document.formularz.mail.value=="" || document.formularz.uwagi.value=="" || document.formularz.telefon.value==""){
  bledy=false;
  tekst+="Uzupełnij wymagane pola. "
}
if (!wzorMaila.test(document.formularz.mail.value)){
  bledy=false;
  tekst+="Nieprawidłowy format e-maila. "
}
if (!wzorLiczby.test(document.formularz.telefon.value) || document.formularz.telefon.value.length!=9){
  bledy=false;
  tekst+="Nieprawidłowy format numeru telefonu. "
}
document.getElementById('bledy').innerHTML=tekst;
return bledy;
}
