<!--

function check_email(form) { 
var note; 
note = "";
if (form.imie.value.length < 4) 
 { note = "Proszę uzupełnić dane. "; 
 form.imie.focus()
 alert(note); 
 return false; }

if (form.nazwisko.value.length < 4) 
 { note = "Proszę uzupełnić dane. "; 
 form.nazwisko.focus()
 alert(note); 
 return false; }

if (form.opr.value.length < 2) 
 { note = "Proszę uzupełnić dane. "; 
 form.opr.focus()
 alert(note); 
 return false; }

if (form.typ_obiektu.value.length < 2) 
 { note = "Proszę uzupełnić dane. "; 
 form.typ_obiektu.focus()
 alert(note); 
 return false; }

return true; }


function check(form) { 
var note; 
note = "";
if (form.opr.value.length < 4) 
 { note = "Proszę wybrać rodzaj tranzakcji. "; 
 form.opr.focus()
 alert(note); 
 return false; }


//if (form.typ_obiektu.value.length < 4) 
// { note = "Proszę wybrać kategorię. "; 
// form.typ_obiektu.focus()
// alert(note); 
// return false; }

return true; }


function check_do(form) { 
var note; 
note = "";

if (form.rodzaj.value.length < 4) 
 { note = "Proszę wybrać kategorię. "; 
 form.rodzaj.focus()
 alert(note); 
 return false; }

return true; }

function OpenWin(www,szer,wys) {
     msg=open(www,"DisplayWindow",'toolbar=no,directories=no,menubar=yes,status=no,scrollbars=no,width='+szer+',height='+wys+'');
     }


function check_dodaj_oferte(form) { 
var note; 
note = "";
if (form.imie.value.length < 2) 
 { note = "Proszę wpisać imię. "; 
 form.imie.focus()
 alert(note); 
 return false; }

if (form.nazwisko.value.length < 2) 
 { note = "Proszę wpisać nazwisko. "; 
 form.nazwisko.focus()
 alert(note); 
 return false; }

if (form.tel_dom.value.length < 6 ) 
 { note = "Proszę wpisać nr telefonu"; 
 form.tel_dom.focus()
 alert(note); 
 return false; }

if (form.email.value.length < 5 ) 
 { note = "Proszę wpisać adres e-mail"; 
 form.email.focus()
 alert(note); 
 return false; }




if (form.miasto.value.length < 2) 
 { note = "Proszę uzupełnić dane "; 
 form.miasto.focus()
 alert(note); 
 return false; }

if (form.ulica.value.length < 2) 
 { note = "Proszę uzupełnić dane"; 
 form.ulica.focus()
 alert(note); 
 return false; }

if (form.rodzaj_tranzakcji.value.length < 2) 
 { note = "Proszę uzupełnić dane"; 
 form.rodzaj_tranzakcji.focus()
 alert(note); 
 return false; }

if (form.powierzchnia.value.length < 2) 
 { note = "Proszę uzupełnić dane"; 
 form.powierzchnia.focus()
 alert(note); 
 return false; }

if (form.cena.value.length < 2) 
 { note = "Proszę uzupełnić dane"; 
 form.cena.focus()
 alert(note); 
 return false; }


return true; }




//-->








function openNewWindow(theURL,winName) { 
  window.open(theURL,winName,'toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizeable=yes,width=840,height=600,top='+((screen.height/2)-(600/2))+',left='+((screen.width/2)-(840/2)));
}

function MM_openBrWindow(theURL,winName) { 
  window.open(theURL,winName,'toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizeable=yes,width=580,height=468,top='+((screen.height/2)-(468/2))+',left='+((screen.width/2)-(580/2)));
}

function MM_openBrWindow2(theURL,winName) { 
  window.open(theURL,winName,'toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,resizeable=yes,width=480,height=550,top='+((screen.height/2)-(550/2))+',left='+((screen.width/2)-(480/2)));
}


function OpenWinOpis(www) {
msg=open(www,"DisplayWindow",'toolbar=no,directories=no,menubar=no,status=no,scrollbars=no,width=700,height=550'); 
}


function check_rejestracja(form) { 

var note; 
note = "Proszę uzupełnić dane. "; 


if (form.name_u.value.length < 3) 
 { 
 form.name_u.focus()
 alert(note); 
 return false; }


if (form.email_u.value.indexOf("@") == -1 || form.email_u.value.indexOf(".") == -1 ) 
 { note = "Proszę wpisać poprawny adres e-mail "; 
 form.email_u.focus()
 alert(note); 
return false; }


if (form.password.value.length < 6) 
 { 
 form.password.focus()
 alert('Zbyt krótkie hasło - Hasło powinno mieć minimum 6 znaków'); 
 return false; }


if (form.ulica.value.length < 3) 
 { 
 form.ulica.focus()
 alert(note); 
 return false; }



if (form.numer.value.length < 1) 
 { 
 form.numer.focus()
 alert(note); 
 return false; }


if (form.kod.value.length < 2) 
 { 
 form.kod.focus()
 alert(note); 
 return false; }


if (form.miasto.value.length < 2) 
 { 
 form.miasto.focus()
 alert(note); 
 return false; }


if (form.panstwo.value.length < 1) 
 { 
 form.panstwo.focus()
 alert(note); 
 return false; }


//if (!form.reg_rej.checked && form.reg_rej.value != 2) 
//{ alert('Musisz zaakceptować Regulamin serwisu!'); 
//return false; }


return true; }




function check_zamowienie(form) { 

if (!form.platnosc[0].checked && !form.platnosc[1].checked && !form.platnosc[2].checked && !form.platnosc[3].checked)  {   
alert('Proszę wybrać formę płatności.');   
return false; }

if (!form.dostawa[0].checked && !form.dostawa[1].checked )  {   
alert('Proszę wybrać formę dostawy.');   
return false; }



return true; }

//-->
