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_prosba()
{


 
  
 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.firma.value == "")
  {
    alert("Proszę podać nazwę firmy !");
    return;
  };  
  
  if (document.Formularz.miejscowosc.value == "")
  {
    alert("Proszę podać miejscowość !");
    return;
  };

  if (document.Formularz.wojewodztwo.value == "")
  {
    alert("Proszę podać województwo !");
    return;
  };  
  
  
if (document.Formularz.kierunkowy.value != "" || document.Formularz.telefon.value != "")
{
  if (document.Formularz.kierunkowy.value == "")
  {
    alert("Proszę podać numer kierunkowy !");
    return;
  };
  
      
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu stacjonarnego!");
    return;
  };
};  

if (document.Formularz.telefon.value == "" && document.Formularz.komorka.value == ""  && document.Formularz.mail.value == ""){

alert("Nie wypełniono danych kontaktowych !");
 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.nasza_oferta_bhp.checked != true && document.Formularz.nadruki_reklamowe.checked != true && document.Formularz.outsourcing.checked != true && document.Formularz.oferta_dla_nas.checked != true && document.Formularz.inne.checked != true){

alert("Proszę podać temat sprawy !");
 return;

} 
 

 
  document.Formularz.submit();

}





function kontrola_zapytanie()
{


 
  
 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.firma.value == "")
  {
    alert("Proszę podać nazwę firmy !");
    return;
  };  
  
  if (document.Formularz.miejscowosc.value == "")
  {
    alert("Proszę podać miejscowość !");
    return;
  };

  if (document.Formularz.wojewodztwo.value == "")
  {
    alert("Proszę podać województwo !");
    return;
  };  
  
  
if (document.Formularz.kierunkowy.value != "" || document.Formularz.telefon.value != "")
{
  if (document.Formularz.kierunkowy.value == "")
  {
    alert("Proszę podać numer kierunkowy !");
    return;
  };
  
      
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu stacjonarnego!");
    return;
  };
};  

if (document.Formularz.telefon.value == "" && document.Formularz.komorka.value == ""){

alert("Nie wypełniono danych kontaktowych !");
 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;
		}

  };  
 
  
 
 

 
  document.Formularz.submit();

}






function kontrola_kontakt()
{


 
  
 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.firma.value == "")
  {
    alert("Proszę podać nazwę firmy !");
    return;
  };  
  
  if (document.Formularz.miejscowosc.value == "")
  {
    alert("Proszę podać miejscowość !");
    return;
  };

  if (document.Formularz.wojewodztwo.value == "")
  {
    alert("Proszę podać województwo !");
    return;
  };  
  
  
if (document.Formularz.kierunkowy.value != "" || document.Formularz.telefon.value != "")
{
  if (document.Formularz.kierunkowy.value == "")
  {
    alert("Proszę podać numer kierunkowy !");
    return;
  };
  
      
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu stacjonarnego!");
    return;
  };
};  

if (document.Formularz.telefon.value == "" && document.Formularz.komorka.value == ""  && document.Formularz.mail.value == ""){

alert("Nie wypełniono danych kontaktowych !");
 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;
		}

  };
  
 
 

 
  document.Formularz.submit();

}

function noSpam(user,domain) {
locationstring = "mailto:" + user + "@" + domain;
window.location = locationstring; }



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
/*
UŻYCIE PRELOAD IMAGES
<body onload="MM_preloadImages('menu_smocza_jama_on.gif','menu_galeria_on.gif','menu_cennik_on.gif','menu_kontakt_on.gif'); detect();">
*/


/* FUNKCJE ZAPYTANIA CENOWEGO */
//Funkcja pobiera wskazany parametr z "ciasteczek"
function get_val_cookie(nazwa)
{
  nazwa+="=";
  startCookie=document.cookie.indexOf(nazwa); 
  if (startCookie==-1) {return ""} 
  startCookie+=nazwa.length;
 if (document.cookie.indexOf(";",startCookie)==-1) 
   {
    koniecCookie=document.cookie.length;
   }
  else
   {
    koniecCookie=document.cookie.indexOf(";",startCookie);
   }
  textCookie=document.cookie.substring(startCookie,koniecCookie);
  textCookie=unescape(textCookie);
  return textCookie; 

}




//Pobieranie danych z "ciasteczek"
function z_ciacha()
{
  if (get_val_cookie("nazwisko")) {document.Formularz.nazwisko.value = get_val_cookie("nazwisko")};
  if (get_val_cookie("firma")) {document.Formularz.firma.value = get_val_cookie("firma")};
  if (get_val_cookie("miejscowosc")) {document.Formularz.miejscowosc.value = get_val_cookie("miejscowosc")};
  if (get_val_cookie("wojewodztwo")) {document.Formularz.wojewodztwo.value = get_val_cookie("wojewodztwo")};
  if (get_val_cookie("kierunkowy")) {document.Formularz.kierunkowy.value = get_val_cookie("kierunkowy")};
  if (get_val_cookie("telefon")) {document.Formularz.telefon.value = get_val_cookie("telefon")};
  if (get_val_cookie("komorka")) {document.Formularz.komorka.value = get_val_cookie("komorka")};
  if (get_val_cookie("mail")) {document.Formularz.mail.value = get_val_cookie("mail")};	
}


//ustawienie cistka
function set_val_cookie(param_name_, param_val_)
{
	param_val_=escape(param_val_);
	var waznosc=new Date(); 
	waznosc.setTime(waznosc.getTime()+1000*60*60*24*7); 
	document.cookie=param_name_ + "=" + param_val_ + ";expires=" + waznosc.toGMTString(); 
	
  
}
/* FUNKCJE ZAPYTANIA CENOWEGO ------ KONIEC-------*/

 
