//*****************************************************************
//
// Funzione di controllo validitŕ campi
//
// Versione 1.0
// Versione 1.1 multilingua
//
//*****************************************************************

function check_mezzi(lingua){

//controlla i campi obbligatori
if ((document.mezzi.EMAIL.value=="") || (document.mezzi.NOME.value=="") || (document.mezzi.COGNOME.value=="") || (document.mezzi.RESIDENZA.value=="") || (document.mezzi.RESIDENZA_PROV.value=="") || (document.mezzi.DOMICILIO.value=="") || (document.mezzi.DOMICILIO_PROV.value=="") || (document.mezzi.PARTITAIVA.value=="") || (document.mezzi.CELLULARE.value=="") || (document.mezzi.PATENTE.value=="") || (document.mezzi.DDN.value=="")){ 
	
	//versione singolo campo (commentare quella non necessaria):
	//if(lingua=="01") alert("Il campo email č obbligatorio!");
	//if(lingua=="02") alert("The field email is mandatory!");
	//if(lingua=="03") alert("Bitte füllen Sie in jedem Fall das Feld email aus!");
	//if(lingua=="04") alert("El campo email es obligatorio!");
	//if(lingua=="05") alert("Le champ email est obligatoire!");	
	
	//versione tutti i campi (commentare quella non necessaria):
	if(lingua=="01") alert("Completi i campi obbligatori!");
	if(lingua=="02") alert("Please fill in the compulsory fields!");
	if(lingua=="03") alert("Bitte fuellen Sie die obligatorischen Felder aus.");
	if(lingua=="04") alert("Complete los campos obligatorios!");
	if(lingua=="05") alert("Pričre de remplir les champs obligatoires!");	
	
	return false;
}else{

//controlla la privacy
if (!document.mezzi.PRIVACY.checked){
	if(lingua=="01") alert("La preghiamo di darci l'autorizzazione al trattamento dei dati.\nSenza tale autorizzazione non possiamo procedere con la registrazione.");
	if(lingua=="02") alert("Not accepting Italian 'privacy' Law will not permit us to proceed with your request.");
	if(lingua=="03") alert("Bitte geben Sie uns Ihr Einverständniserklärung, ansonsten können wir nicht Ihre Anmeldung aufnehmen.");
	if(lingua=="04") alert("Le rogamos nos dé autorización para el uso de sus datos. Sin tal autorización no podremos proceder con el registro.");
	if(lingua=="05") alert("Pričre de nous autoriser au traitement des données. En l’absence de ladite autorisation,\nnous ne sommes pas en mesure de traiter l’enregistrement.");
	return false;
}else{
	return true;


}
}
return false;
}

function check_autisti(lingua){

//controlla i campi obbligatori
if ((document.autisti.EMAIL.value=="") || (document.autisti.NOME.value=="") || (document.autisti.COGNOME.value=="")  || (document.autisti.PROVINCIA.value=="") || (document.autisti.CELLULARE.value=="") || (document.autisti.PATENTE.value=="") || (document.autisti.DDN.value=="")){ 
	
	//versione singolo campo (commentare quella non necessaria):
	//if(lingua=="01") alert("Il campo email č obbligatorio!");
	//if(lingua=="02") alert("The field email is mandatory!");
	//if(lingua=="03") alert("Bitte füllen Sie in jedem Fall das Feld email aus!");
	//if(lingua=="04") alert("El campo email es obligatorio!");
	//if(lingua=="05") alert("Le champ email est obligatoire!");	
	
	//versione tutti i campi (commentare quella non necessaria):
	if(lingua=="01") alert("Completi i campi obbligatori!");
	if(lingua=="02") alert("Please fill in the compulsory fields!");
	if(lingua=="03") alert("Bitte fuellen Sie die obligatorischen Felder aus.");
	if(lingua=="04") alert("Complete los campos obligatorios!");
	if(lingua=="05") alert("Pričre de remplir les champs obligatoires!");	
	
	return false;
}else{

//controlla la privacy
if (!document.autisti.PRIVACY.checked){
	if(lingua=="01") alert("La preghiamo di darci l'autorizzazione al trattamento dei dati.\nSenza tale autorizzazione non possiamo procedere con la registrazione.");
	if(lingua=="02") alert("Not accepting Italian 'privacy' Law will not permit us to proceed with your request.");
	if(lingua=="03") alert("Bitte geben Sie uns Ihr Einverständniserklärung, ansonsten können wir nicht Ihre Anmeldung aufnehmen.");
	if(lingua=="04") alert("Le rogamos nos dé autorización para el uso de sus datos. Sin tal autorización no podremos proceder con el registro.");
	if(lingua=="05") alert("Pričre de nous autoriser au traitement des données. En l’absence de ladite autorisation,\nnous ne sommes pas en mesure de traiter l’enregistrement.");
	return false;
}else{
	return true;


}
}
return false;
}


function check_preventivi(lingua){

//controlla i campi obbligatori
if ((document.preventivi.EMAIL.value=="") || (document.preventivi.NOME.value=="") || (document.preventivi.QUANTITA.value=="") || (document.preventivi.PARTITA_IVA.value=="")){ 
	
	//versione singolo campo (commentare quella non necessaria):
	//if(lingua=="01") alert("Il campo email č obbligatorio!");
	//if(lingua=="02") alert("The field email is mandatory!");
	//if(lingua=="03") alert("Bitte füllen Sie in jedem Fall das Feld email aus!");
	//if(lingua=="04") alert("El campo email es obligatorio!");
	//if(lingua=="05") alert("Le champ email est obligatoire!");	
	
	//versione tutti i campi (commentare quella non necessaria):
	if(lingua=="01") alert("Completi i campi obbligatori!");
	if(lingua=="02") alert("Please fill in the compulsory fields!");
	if(lingua=="03") alert("Bitte fuellen Sie die obligatorischen Felder aus.");
	if(lingua=="04") alert("Complete los campos obligatorios!");
	if(lingua=="05") alert("Pričre de remplir les champs obligatoires!");	
	
	return false;
}else{

//controlla la privacy
if (!document.preventivi.PRIVACY.checked){
	if(lingua=="01") alert("La preghiamo di darci l'autorizzazione al trattamento dei dati.\nSenza tale autorizzazione non possiamo procedere con la registrazione.");
	if(lingua=="02") alert("Not accepting Italian 'privacy' Law will not permit us to proceed with your request.");
	if(lingua=="03") alert("Bitte geben Sie uns Ihr Einverständniserklärung, ansonsten können wir nicht Ihre Anmeldung aufnehmen.");
	if(lingua=="04") alert("Le rogamos nos dé autorización para el uso de sus datos. Sin tal autorización no podremos proceder con el registro.");
	if(lingua=="05") alert("Pričre de nous autoriser au traitement des données. En l’absence de ladite autorisation,\nnous ne sommes pas en mesure de traiter l’enregistrement.");
	return false;
}else{
	return true;


}
}
return false;
}



function check_contatti(lingua){

//controlla i campi obbligatori
if ((document.contatti.EMAIL.value=="") || (document.contatti.NOME.value=="") || (document.contatti.COGNOME.value=="")){ 
	
	//versione singolo campo (commentare quella non necessaria):
	//if(lingua=="01") alert("Il campo email č obbligatorio!");
	//if(lingua=="02") alert("The field email is mandatory!");
	//if(lingua=="03") alert("Bitte füllen Sie in jedem Fall das Feld email aus!");
	//if(lingua=="04") alert("El campo email es obligatorio!");
	//if(lingua=="05") alert("Le champ email est obligatoire!");	
	
	//versione tutti i campi (commentare quella non necessaria):
	if(lingua=="01") alert("Completi i campi obbligatori!");
	if(lingua=="02") alert("Please fill in the compulsory fields!");
	if(lingua=="03") alert("Bitte fuellen Sie die obligatorischen Felder aus.");
	if(lingua=="04") alert("Complete los campos obligatorios!");
	if(lingua=="05") alert("Pričre de remplir les champs obligatoires!");	
	
	return false;
}else{

//controlla la privacy
if (!document.contatti.PRIVACY.checked){
	if(lingua=="01") alert("La preghiamo di darci l'autorizzazione al trattamento dei dati.\nSenza tale autorizzazione non possiamo procedere con la registrazione.");
	if(lingua=="02") alert("Not accepting Italian 'privacy' Law will not permit us to proceed with your request.");
	if(lingua=="03") alert("Bitte geben Sie uns Ihr Einverständniserklärung, ansonsten können wir nicht Ihre Anmeldung aufnehmen.");
	if(lingua=="04") alert("Le rogamos nos dé autorización para el uso de sus datos. Sin tal autorización no podremos proceder con el registro.");
	if(lingua=="05") alert("Pričre de nous autoriser au traitement des données. En l’absence de ladite autorisation,\nnous ne sommes pas en mesure de traiter l’enregistrement.");
	return false;
}else{
	return true;


}
}
return false;
}



function check_curriculum(lingua){

//controlla i campi obbligatori
if ((document.curriculum.EMAIL.value=="") || (document.curriculum.NOME.value=="") || (document.curriculum.COGNOME.value=="")){ 
	
	//versione singolo campo (commentare quella non necessaria):
	//if(lingua=="01") alert("Il campo email č obbligatorio!");
	//if(lingua=="02") alert("The field email is mandatory!");
	//if(lingua=="03") alert("Bitte füllen Sie in jedem Fall das Feld email aus!");
	//if(lingua=="04") alert("El campo email es obligatorio!");
	//if(lingua=="05") alert("Le champ email est obligatoire!");	
	
	//versione tutti i campi (commentare quella non necessaria):
	if(lingua=="01") alert("Completi i campi obbligatori!");
	if(lingua=="02") alert("Please fill in the compulsory fields!");
	if(lingua=="03") alert("Bitte fuellen Sie die obligatorischen Felder aus.");
	if(lingua=="04") alert("Complete los campos obligatorios!");
	if(lingua=="05") alert("Pričre de remplir les champs obligatoires!");	
	
	return false;
}else{

//controlla la privacy
if (!document.curriculum.PRIVACY.checked){
	if(lingua=="01") alert("La preghiamo di darci l'autorizzazione al trattamento dei dati.\nSenza tale autorizzazione non possiamo procedere con la registrazione.");
	if(lingua=="02") alert("Not accepting Italian 'privacy' Law will not permit us to proceed with your request.");
	if(lingua=="03") alert("Bitte geben Sie uns Ihr Einverständniserklärung, ansonsten können wir nicht Ihre Anmeldung aufnehmen.");
	if(lingua=="04") alert("Le rogamos nos dé autorización para el uso de sus datos. Sin tal autorización no podremos proceder con el registro.");
	if(lingua=="05") alert("Pričre de nous autoriser au traitement des données. En l’absence de ladite autorisation,\nnous ne sommes pas en mesure de traiter l’enregistrement.");
	return false;
}else{
	return true;


}
}
return false;
}

function Init_mezzi(){
document.getElementById('TP_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('AS_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('MC_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('AI_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('DIM_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('PC_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('PU_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('ROLL_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('SP_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('NOTE_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('AT_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('ATP_FRIGO').style.backgroundColor='#EFEFEF'
document.getElementById('TP_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('AS_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('MC_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('AI_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('DIM_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('PC_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('PU_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('ROLL_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('SP_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('NOTE_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('AT_CENT').style.backgroundColor='#EFEFEF'
document.getElementById('TP_CASSONATI').style.backgroundColor='#EFEFEF'
document.getElementById('AS_CASSONATI').style.backgroundColor='#EFEFEF'
document.getElementById('MC_CASSONATI').style.backgroundColor='#EFEFEF'
document.getElementById('AI_CASSONATI').style.backgroundColor='#EFEFEF'
document.getElementById('DIM_CASSONATI').style.backgroundColor='#EFEFEF'
document.getElementById('PC_CASSONATI').style.backgroundColor='#EFEFEF'
document.getElementById('PU_CASSONATI').style.backgroundColor='#EFEFEF'
document.getElementById('NOTE_CASSONATI').style.backgroundColor='#EFEFEF'
document.getElementById('AT_CASSONATI').style.backgroundColor='#EFEFEF'
}

function abilita_frigo(){
	if (document.getElementById('MZ_FRIGO').checked){
	document.getElementById('TP_FRIGO').disabled=false;
	document.getElementById('AS_FRIGO').disabled=false;
	document.getElementById('MC_FRIGO').disabled=false;
	document.getElementById('AI_FRIGO').disabled=false;
	document.getElementById('DIM_FRIGO').disabled=false;
	document.getElementById('PC_FRIGO').disabled=false;
	document.getElementById('PU_FRIGO').disabled=false;
	document.getElementById('ROLL_FRIGO').disabled=false;
	document.getElementById('SP_FRIGO').disabled=false;
	document.getElementById('NOTE_FRIGO').disabled=false;
	document.getElementById('AT_FRIGO').disabled=false;
	document.getElementById('ATP_FRIGO').disabled=false;
	document.getElementById('TP_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('AS_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('MC_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('AI_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('DIM_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('PC_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('PU_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('ROLL_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('SP_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('NOTE_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('AT_FRIGO').style.backgroundColor='#FFFFFF'
	document.getElementById('ATP_FRIGO').style.backgroundColor='#FFFFFF'
	}else{
	document.getElementById('TP_FRIGO').disabled=true;
	document.getElementById('AS_FRIGO').disabled=true;
	document.getElementById('MC_FRIGO').disabled=true;
	document.getElementById('AI_FRIGO').disabled=true;
	document.getElementById('DIM_FRIGO').disabled=true;
	document.getElementById('PC_FRIGO').disabled=true;
	document.getElementById('PU_FRIGO').disabled=true;
	document.getElementById('ROLL_FRIGO').disabled=true;
	document.getElementById('SP_FRIGO').disabled=true;
	document.getElementById('NOTE_FRIGO').disabled=true;
	document.getElementById('AT_FRIGO').disabled=true;
	document.getElementById('ATP_FRIGO').disabled=true;
	document.getElementById('TP_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('AS_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('MC_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('AI_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('DIM_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('PC_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('PU_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('ROLL_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('SP_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('NOTE_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('AT_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('ATP_FRIGO').style.backgroundColor='#EFEFEF'
	document.getElementById('TP_FRIGO').value='';
	document.getElementById('AS_FRIGO').value='';
	document.getElementById('MC_FRIGO').value='';
	document.getElementById('AI_FRIGO').value='';
	document.getElementById('DIM_FRIGO').value='';
	document.getElementById('PC_FRIGO').value='';
	document.getElementById('PU_FRIGO').value='';
	document.getElementById('ROLL_FRIGO').value='';
	document.getElementById('SP_FRIGO').value='';
	document.getElementById('NOTE_FRIGO').value='';
	document.getElementById('AT_FRIGO').value='';
	document.getElementById('ATP_FRIGO').value='';
	}
}



function abilita_centinati(){
	if (document.getElementById('MZ_CENT').checked){
	document.getElementById('TP_CENT').disabled=false;
	document.getElementById('AS_CENT').disabled=false;
	document.getElementById('MC_CENT').disabled=false;
	document.getElementById('AI_CENT').disabled=false;
	document.getElementById('DIM_CENT').disabled=false;
	document.getElementById('PC_CENT').disabled=false;
	document.getElementById('PU_CENT').disabled=false;
	document.getElementById('ROLL_CENT').disabled=false;
	document.getElementById('SP_CENT').disabled=false;
	document.getElementById('NOTE_CENT').disabled=false;
	document.getElementById('AT_CENT').disabled=false;
	document.getElementById('TP_CENT').style.backgroundColor='#FFFFFF'
	document.getElementById('AS_CENT').style.backgroundColor='#FFFFFF'
	document.getElementById('MC_CENT').style.backgroundColor='#FFFFFF'
	document.getElementById('AI_CENT').style.backgroundColor='#FFFFFF'
	document.getElementById('DIM_CENT').style.backgroundColor='#FFFFFF'
	document.getElementById('PC_CENT').style.backgroundColor='#FFFFFF'
	document.getElementById('PU_CENT').style.backgroundColor='#FFFFFF'
	document.getElementById('ROLL_CENT').style.backgroundColor='#FFFFFF'
	document.getElementById('SP_CENT').style.backgroundColor='#FFFFFF'
	document.getElementById('NOTE_CENT').style.backgroundColor='#FFFFFF'
	document.getElementById('AT_CENT').style.backgroundColor='#FFFFFF'
	}else{
	document.getElementById('TP_CENT').disabled=true;
	document.getElementById('AS_CENT').disabled=true;
	document.getElementById('MC_CENT').disabled=true;
	document.getElementById('AI_CENT').disabled=true;
	document.getElementById('DIM_CENT').disabled=true;
	document.getElementById('PC_CENT').disabled=true;
	document.getElementById('PU_CENT').disabled=true;
	document.getElementById('ROLL_CENT').disabled=true;
	document.getElementById('SP_CENT').disabled=true;
	document.getElementById('NOTE_CENT').disabled=true;
	document.getElementById('AT_CENT').disabled=true;
	document.getElementById('TP_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('AS_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('MC_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('AI_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('DIM_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('PC_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('PU_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('ROLL_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('SP_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('NOTE_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('AT_CENT').style.backgroundColor='#EFEFEF'
	document.getElementById('TP_CENT').value=''
	document.getElementById('AS_CENT').value=''
	document.getElementById('MC_CENT').value=''
	document.getElementById('AI_CENT').value=''
	document.getElementById('DIM_CENT').value=''
	document.getElementById('PC_CENT').value=''
	document.getElementById('PU_CENT').value=''
	document.getElementById('ROLL_CENT').value=''
	document.getElementById('SP_CENT').value=''
	document.getElementById('NOTE_CENT').value=''
	document.getElementById('AT_CENT').value=''
	}
}


function abilita_cassonati(){
	if (document.getElementById('MZ_CAS').checked){
	document.getElementById('TP_CASSONATI').disabled=false;
	document.getElementById('AS_CASSONATI').disabled=false;
	document.getElementById('MC_CASSONATI').disabled=false;
	document.getElementById('AI_CASSONATI').disabled=false;
	document.getElementById('DIM_CASSONATI').disabled=false;
	document.getElementById('PC_CASSONATI').disabled=false;
	document.getElementById('PU_CASSONATI').disabled=false;
	document.getElementById('NOTE_CASSONATI').disabled=false;
	document.getElementById('AT_CASSONATI').disabled=false;
	document.getElementById('TP_CASSONATI').style.backgroundColor='#FFFFFF'
	document.getElementById('AS_CASSONATI').style.backgroundColor='#FFFFFF'
	document.getElementById('MC_CASSONATI').style.backgroundColor='#FFFFFF'
	document.getElementById('AI_CASSONATI').style.backgroundColor='#FFFFFF'
	document.getElementById('DIM_CASSONATI').style.backgroundColor='#FFFFFF'
	document.getElementById('PC_CASSONATI').style.backgroundColor='#FFFFFF'
	document.getElementById('PU_CASSONATI').style.backgroundColor='#FFFFFF'
	document.getElementById('NOTE_CASSONATI').style.backgroundColor='#FFFFFF'
	document.getElementById('AT_CASSONATI').style.backgroundColor='#FFFFFF'
	}else{
	document.getElementById('TP_CASSONATI').disabled=true;
	document.getElementById('AS_CASSONATI').disabled=true;
	document.getElementById('MC_CASSONATI').disabled=true;
	document.getElementById('AI_CASSONATI').disabled=true;
	document.getElementById('DIM_CASSONATI').disabled=true;
	document.getElementById('PC_CASSONATI').disabled=true;
	document.getElementById('PU_CASSONATI').disabled=true;
	document.getElementById('NOTE_CASSONATI').disabled=true;
	document.getElementById('AT_CASSONATI').disabled=true;
	document.getElementById('TP_CASSONATI').style.backgroundColor='#EFEFEF'
	document.getElementById('AS_CASSONATI').style.backgroundColor='#EFEFEF'
	document.getElementById('MC_CASSONATI').style.backgroundColor='#EFEFEF'
	document.getElementById('AI_CASSONATI').style.backgroundColor='#EFEFEF'
	document.getElementById('DIM_CASSONATI').style.backgroundColor='#EFEFEF'
	document.getElementById('PC_CASSONATI').style.backgroundColor='#EFEFEF'
	document.getElementById('PU_CASSONATI').style.backgroundColor='#EFEFEF'
	document.getElementById('NOTE_CASSONATI').style.backgroundColor='#EFEFEF'
	document.getElementById('AT_CASSONATI').style.backgroundColor='#EFEFEF'
	document.getElementById('TP_CASSONATI').value=''
	document.getElementById('AS_CASSONATI').value=''
	document.getElementById('MC_CASSONATI').value=''
	document.getElementById('AI_CASSONATI').value=''
	document.getElementById('DIM_CASSONATI').value=''
	document.getElementById('PC_CASSONATI').value=''
	document.getElementById('PU_CASSONATI').value=''
	document.getElementById('NOTE_CASSONATI').value=''
	document.getElementById('AT_CASSONATI').value=''
	}
}
