/* PRELOAD obrazków MENU */
function preload(){
  var x,y=[],i=0;while(x=arguments[i]){y[i]=new Image();y[i++].src=x}
}
preload('img/menu_kontaktON.gif','img/menu_ofirmieON.gif') ;
/* PRELOAD obrazków MENU */




function Okno( html, nameWindow, width, height ){
	    okno = window.open( html, 'okienko', "toolbar=no, location=no, directories=no, status=no, resizable=no, menubar=no, scrollbars=no, width="+width+", height="+height); okno.focus();
 }

 
 // Poprawiona i bardziej szczegółowa kontrola danych zamawiającego przed wysłaniem zamówienia.
function kontrola()
{


if (document.Formularz.oddzial.value == "")
  {
    alert("Proszę wybrać oddział naszej firmy !");
    return;
  };
  
  
  
 var dobreNazwisko = /^[^ ]+ [^ ]+$/;
 var dobryEmail=/^[^@]+@([a-z0-9\-]+\.)+[a-z]{2,4}$/i;

 
 if (dobreNazwisko.test(document.Formularz.nazwisko.value)) {
  
  }else{
    alert("Proszę podać imię i nazwisko !");
    return;
  };
  
  
  
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu !");
    return;
  };
  
  
  if (document.Formularz.mail.value != "")
  {
  
  		if (dobryEmail.test(document.Formularz.mail.value)){
  		
		}else {
  				alert('"' + document.Formularz.mail.value+'" to nie jest poprawny adres e-mail!');
				return;
		}

  };
  
 
  if (document.Formularz.tekst.value == "")
  {
    alert("Proszę wypełnić pole wiadomości !");
    return;
  };

 
  document.Formularz.submit();

}

function noSpam(user,domain) {
locationstring = "mailto:" + user + "@" + domain;
window.location = locationstring; }

 
