/* 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-oferta-on.gif','img/menu-onas-on.gif','img/menu-kontakt-on.gif','img/drukuj-on.gif') ;
/* PRELOAD obrazków MENU */


/* liczenie ilości znaków textarea*/
function licz(pole,max){
  if(pole.value.length>max){ 
	/*alert('Możesz wpisać ograniczoną liczbę znaków '+max);  */
	alert('Możesz wpisać ograniczoną liczbę znaków.');
	pole.value=pole.value.substr(0,max);  
	}
} 
 
 

 
 // Poprawiona i bardziej szczegółowa kontrola danych zamawiającego przed wysłaniem zamówienia.
function kontrola()
{
 
  if (document.Formularz.nazwisko.value == "")
  {
    alert("Proszę podać Imię i Nazwisko lub nazwę firmy.");
    return;
  };
  
  
  
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu.");
    return;
  };
  
	
     if (document.Formularz.skadwiesz.value == "")	
  {
    alert("Proszę wypełnić wszystkie wymagane pola.");
    return;
  };
	
 
  


 
  document.Formularz.submit();

}



function kontrola1()
{
 
  if (document.Formularz.nazwisko.value == "")
  {
    alert("Proszę podać Imię i Nazwisko lub nazwę firmy.");
    return;
  };
  
  
  
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu.");
    return;
  };
  
    if (!document.Formularz.zgoda1.checked || !document.Formularz.zgoda2.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  };
  
   if (document.Formularz.skadwiesz.value == "")
  {
    alert("Proszę wypełnić wszystkie wymagane pola.");
    return;
  };

 
  document.Formularz.submit();

}
 
 
 
 
 
 
function kontrola2()
{
 
  if (document.Formularz.nazwisko.value == "")
  {
    alert("Proszę podać Imię i Nazwisko lub nazwę firmy.");
    return;
  }
  
  
  
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu.");
    return;
  }


    if (!document.Formularz.zgoda1.checked || !document.Formularz.zgoda2.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
	  
	
     if (document.Formularz.skadwiesz.value == "")	
  {
    alert("Proszę wypełnić wszystkie wymagane pola.");
    return;
	}
	
	document.Formularz.submit();
	
}




 
function kontrola3()
{
 
  if (document.Formularz.nazwisko.value == "")
  {
    alert("Proszę podać Imię i Nazwisko lub nazwę firmy.");
    return;
  }
  
  
  
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu.");
    return;
  }


    if (!document.Formularz.zgoda1.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
	  
	
     if (document.Formularz.skadwiesz.value == "")	
  {
    alert("Proszę wypełnić wszystkie wymagane pola.");
    return;
	}
	
	document.Formularz.submit();
	
}





function kontrola4Woj()
{
 
  if (document.Formularz.nazwisko.value == "")
  {
    alert("Proszę podać Imię i Nazwisko lub nazwę firmy.");
    return;
  }
  
   if (document.Formularz.wojewodztwo.value == "")
  {
    alert("Proszę podać województwo.");
    return;
  } 
  
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu.");
    return;
  }


    if (!document.Formularz.zgoda1.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
	  
	
     if (document.Formularz.skadwiesz.value == "")	
  {
    alert("Proszę wypełnić wszystkie wymagane pola.");
    return;
	}
	
	document.Formularz.submit();
	
}

function kontrolaKonsolidacyjny()
{
 
  if (document.Formularz.nazwisko.value == "")
  {
    alert("Proszę podać Imię i Nazwisko lub nazwę firmy.");
    return;
  }
  
   if (document.Formularz.wojewodztwo.value == "")
  {
    alert("Proszę podać województwo.");
    return;
  } 
  
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu.");
    return;
  }

  if (document.Formularz.email.value == "")
  {
    alert("Proszę podać adres e-mail.");
    return;
  }
	
    if (!document.Formularz.zgoda1.checked || !document.Formularz.zgoda2.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
	  
	
     if (document.Formularz.skadwiesz.value == "")	
  {
    alert("Proszę wypełnić wszystkie wymagane pola.");
    return;
	}
	
	document.Formularz.submit();
	
}







function kontrolaGotowkowy()
{
 
  if (document.Formularz.nazwisko.value == "" || 
  	   document.Formularz.wojewodztwo.value == "" || 	
  	   document.Formularz.telefon.value == "" || 	
  	   document.Formularz.email.value == "" || 	 	
  	   document.Formularz.skadwiesz.value == "" )
  {
    alert("Wypełnij obowiązkowe pola formularza.");
    return;
  }
	 
    if (!document.Formularz.zgoda1.checked || !document.Formularz.zgoda2.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
	document.Formularz.submit();
	
}








function kontrolaLeasing()
{
 
  if (document.Formularz.nazwisko.value == "")
  {
    alert("Proszę podać Imię i Nazwisko lub nazwę firmy.");
    return;
  }
  
   if (document.Formularz.wojewodztwo.value == "")
  {
    alert("Proszę podać województwo.");
    return;
  } 
  
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu.");
    return;
  }
	
	if (document.Formularz.email.value == "")	
  {
    alert("Proszę wypełnić adres e-mail.");
    return;
	}

    if (!document.Formularz.zgoda1.checked || !document.Formularz.zgoda2.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
	  
	
     if (document.Formularz.skadwiesz.value == "")	
  {
    alert("Proszę wypełnić wszystkie wymagane pola.");
    return;
	}
 
	document.Formularz.submit();	
	
}










function kontrolaWniosekKredytowy()
{
 
  if (document.Formularz.nazwisko.value == "")
  {
    alert("Proszę podać Imię i Nazwisko lub nazwę firmy.");
    return;
  }
  
   if (document.Formularz.wojewodztwo.value == "")
  {
    alert("Proszę podać województwo.");
    return;
  } 
  
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu.");
    return;
  }

     if (document.Formularz.email1.value == "")	
  {
    alert("Proszę wypełnić adres e-mail.");
    return;
	}	

    if (!document.Formularz.zgoda1.checked || !document.Formularz.zgoda2.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
		
     if (document.Formularz.emailsprzedawca.value == "")	
  {
    alert("Proszę wypełnić adres e-mail.");
    return;
	}			
	
     if (document.Formularz.skadwiesz.value == "")	
  {
    alert("Proszę wypełnić wszystkie wymagane pola.");
    return;
	}
 
	
	document.Formularz.submit();	
	
}








function kontrolaHipoteczny()
{
 
  if (document.Formularz.nazwisko.value == "")
  {
    alert("Proszę podać Imię i Nazwisko lub nazwę firmy.");
    return;
  }
  
   if (document.Formularz.wojewodztwo.value == "")
  {
    alert("Proszę podać województwo.");
    return;
  } 	
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu.");
    return;
  }
   if (document.Formularz.aemail.value == "")
  {
    alert("Proszę podać adres e-mail.");
    return;
  }

    if (!document.Formularz.zgoda1.checked || !document.Formularz.zgoda2.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
	  
	
     if (document.Formularz.skadwiesz.value == "")	
  {
    alert("Proszę wypełnić wszystkie wymagane pola.");
    return;
	}
	
	document.Formularz.submit();
	
}



function kontrolaUbezpieczeniaKomunikacyjne()
{
  if (document.Formularz.rodzajpojazdu.value == "" || 
  	   document.Formularz.rokprodukcji.value == "" || 	
  	   document.Formularz.marka.value == "" || 	
  	   document.Formularz.model.value == "" || 	
  	   document.Formularz.pojemnosc.value == "" || 	
  	   document.Formularz.przebieg.value == "" || 	
  	   document.Formularz.sumaac.value == "" || 	
  	   document.Formularz.sumannw.value == "" || 	
  	   document.Formularz.liczbamiejsc.value == "" || 	
  	   document.Formularz.datarejestracji.value == "" || 	
  	   document.Formularz.kodpocztowy.value == "" || 	
  	   document.Formularz.wojew.value == "" || 	
  	   document.Formularz.zakladoc.value == "" || 	
  	   document.Formularz.zakladac.value == "" || 	
  	   document.Formularz.udzialwlasny.value == "" || 	
  	   document.Formularz.rozrzerzenie.value == "" || 	
  	   document.Formularz.brakkonsumpcji.value == "" || 	
  	   document.Formularz.brakamortyzacji.value == "" || 	
  	   document.Formularz.staleubezpieczenie.value == "" || 	
  	   document.Formularz.wylaczenieryzyka.value == "" || 	
  	   document.Formularz.nazwisko.value == "" || 	
  	   document.Formularz.wiek.value == "" || 	
  	   document.Formularz.iloscZnizek.value == "" || 	
  	   document.Formularz.wojewodztwo.value == "" || 	
  	   document.Formularz.telefon.value == "" || 	
  	   document.Formularz.email.value == "" || 	
  	   document.Formularz.skadwiesz.value == "" 	)
  {
    alert("Wypełnij obowiązkowe pola formularza.");
    return;
  }
	 
    if (!document.Formularz.zgoda1.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
	document.Formularz.submit();
	
}








function kontrola7()
{
  if (document.Formularz.nazwisko.value == "" || 
  	   document.Formularz.wojewodztwo.value == "" || 	
  	   document.Formularz.telefon.value == "" || 	
  	   document.Formularz.email.value == "" || 	
  	   document.Formularz.opis.value == "" || 	
  	   document.Formularz.skadwiesz.value == "" )
  {
    alert("Wypełnij obowiązkowe pola formularza.");
    return;
  }
	 
    if (!document.Formularz.zgoda1.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
	document.Formularz.submit();
	
}


/* kontrolaRestrukturyzacyjny */
/* ------------------------ */
function kontrolaRestrukturyzacyjny()
{
 
  if (document.Formularz.nazwisko.value == "")
  {
    alert("Proszę podać Imię i Nazwisko lub nazwę firmy.");
    return;
  }
  
   if (document.Formularz.wojewodztwo.value == "")
  {
    alert("Proszę podać województwo.");
    return;
  } 
  
  if (document.Formularz.telefon.value == "")
  {
    alert("Proszę podać numer telefonu.");
    return;
  }

  if (document.Formularz.email.value == "")
  {
    alert("Proszę podać adres e-mail.");
    return;
  }	
	
    if ( !document.Formularz.weksel.checked && !document.Formularz.poreczyciele.checked && !document.Formularz.zlecenieNaKoncie.checked && !document.Formularz.samochod.checked && !document.Formularz.hipoteka.checked )	
  {
    alert("Proszę wskazać zabezpieczenie kredytu.");
    return;
  }	

    if (!document.Formularz.zgoda1.checked || !document.Formularz.zgoda2.checked)	
  {
    alert("Proszę wyrazić zgodę na przetwarzanie Państwa danych osobowych.");
    return;
  }
  
	
     if (document.Formularz.skadwiesz.value == "")	
  {
    alert("Proszę wypełnić wszystkie wymagane pola.");
    return;
	}
	
	document.Formularz.submit();
	
} 