function controlla(){
	if (document.getElementById('registra').cognome.value == "") {
		alert("Attenzione! Non è stato inserito il cognome.");
		return false;
	}
	if (document.getElementById('registra').nome.value == "") {
		alert("Attenzione! Non è stato inserito il nome.");
		return false;
	}
	if (document.getElementById('registra').rag_soc.value == "") {
		alert("Attenzione! Non è stata inserita la ragione sociale.");
		return false;
	}
	if (document.getElementById('registra').indirizzo.value == "") {
		alert("Attenzione! Non è stato inserito l'indirizzo.");
		return false;
	}
	if (document.getElementById('registra').cap.value == "") {
		alert("Attenzione! Non è stato inserito il CAP.");
		return false;
	}
	if (isNaN(parseInt(document.getElementById('registra').cap.value))) {
		alert("Attenzione! Errore nel formato del CAP.");
		return false;
	}
	if ((document.getElementById('registra').cap.value).length != 5) {
		alert("Attenzione! Errore nel formato del CAP.");
		return false;
	}
	if (document.getElementById('registra').citta.value == "") {
		alert("Attenzione! Non è stata inserita la città.");
		return false;
	}
	if (document.getElementById('registra').prov.value == "") {
		alert("Attenzione! Non è stata inserita la provincia.");
		return false;
	}
	if ((document.getElementById('registra').prov.value).length != 2) {
		alert("Attenzione! Errore nel formato della provincia.");
		return false;
	}
	if (document.getElementById('registra').telefono.value == "") {
		alert("Attenzione! Non è stato inserito il telefono.");
		return false;
	}
	if (isNaN(parseInt(document.getElementById('registra').telefono.value))) {
		alert("Attenzione! Errore nel formato del numero di telefono.");
		return false;
	}
	if (document.getElementById('registra').fax.value == "") {
		alert("Attenzione! Non è stato inserito il fax.");
		return false;
	}
	if (isNaN(parseInt(document.getElementById('registra').fax.value))) {
		alert("Attenzione! Errore nel formato del numero di fax.");
		return false;
	}
	if (document.getElementById('registra').mail.value == "") {
		alert("Attenzione! Non è stato inserito l'indirizzo E-Mail.");
		return false;
	}
	if (document.getElementById('registra').password.value == "") {
		alert("Attenzione! Non è stata inserita la password.");
		return false;
	}
	if (document.getElementById('registra').password2.value == "") {
		alert("Attenzione! Non è stata inserita la password di conferma.");
		return false;
	}
	if ((document.getElementById('registra').privacy).checked == false) {
		alert("Attenzione! Non è stata confermata l'autorizzazione per il trattamento dei dati personali.");
		return false;
	}
}
/**Fine controlla();*/
/**Inizio controllaLavoro();*/
function controllaLavoro(){

if (document.getElementById('richiesta_offerta').cognome) {
	if (document.getElementById('richiesta_offerta').cognome.value == "") {
		alert("Attenzione! Non è stato inserito il cognome.");
		return false;
	}
	if (document.getElementById('richiesta_offerta').nome.value == "") {
		alert("Attenzione! Non è stato inserito il nome.");
		return false;
	}
	if (document.getElementById('richiesta_offerta').rag_soc.value == "") {
		alert("Attenzione! Non è stata inserita la ragione sociale.");
		return false;
	}
	if (document.getElementById('richiesta_offerta').indirizzo.value == "") {
		alert("Attenzione! Non è stato inserito l'indirizzo.");
		return false;
	}
	if (document.getElementById('richiesta_offerta').cap.value == "") {
		alert("Attenzione! Non è stato inserito il CAP.");
		return false;
	}
	if (isNaN(parseInt(document.getElementById('richiesta_offerta').cap.value))) {
		alert("Attenzione! Errore nel formato del CAP.");
		return false;
	}
	if ((document.getElementById('richiesta_offerta').cap.value).length != 5) {
		alert("Attenzione! Errore nel formato del CAP.");
		return false;
	}
	if (document.getElementById('richiesta_offerta').citta.value == "") {
		alert("Attenzione! Non è stata inserita la città.");
		return false;
	}
	if (document.getElementById('richiesta_offerta').prov.value == "") {
		alert("Attenzione! Non è stata inserita la provincia.");
		return false;
	}
	if ((document.getElementById('richiesta_offerta').prov.value).length != 2) {
		alert("Attenzione! Errore nel formato della provincia.");
		return false;
	}
	if (document.getElementById('richiesta_offerta').telefono.value == "") {
		alert("Attenzione! Non è stato inserito il telefono.");
		return false;
	}
	if (isNaN(parseInt(document.getElementById('richiesta_offerta').telefono.value))) {
		alert("Attenzione! Errore nel formato del numero di telefono.");
		return false;
	}
	if (document.getElementById('richiesta_offerta').fax.value == "") {
		alert("Attenzione! Non è stato inserito il fax.");
		return false;
	}
	if (isNaN(parseInt(document.getElementById('richiesta_offerta').fax.value))) {
		alert("Attenzione! Errore nel formato del numero di fax.");
		return false;
	}
	if (document.getElementById('richiesta_offerta').mail.value == "") {
		alert("Attenzione! Non è stato inserito l'indirizzo E-Mail.");
		return false;
	}
	if (document.getElementById('richiesta_offerta').mail2.value != document.getElementById('richiesta_offerta').mail.value) {
		alert("Attenzione! L'indirizzo E-Mail di conferma è diverso da quello specificato.");
		return false;
	}
}
if (document.getElementById('richiesta_offerta').anni.value == "") {
		alert("Attenzione! Non sono stati specificati gli anni di esperienza nel settore.");
		return false;
}
if (isNaN(parseInt(document.getElementById('richiesta_offerta').anni.value))) {
		alert("Attenzione! Errore nel formato degli anni di esperienza nel settore.");
		return false;
}
if ((document.getElementById('richiesta_offerta').privacy).checked == false) {
		alert("Attenzione! Non è stata confermata l'autorizzazione per il trattamento dei dati personali.");
		return false;
}
return true;
}
/************************************/
function controllaMod(){
	if (document.getElementById('registra').cognome.value == "") {
		alert("Attenzione! Non è stato inserito il cognome.");
		return false;
	}
	if (document.getElementById('registra').nome.value == "") {
		alert("Attenzione! Non è stato inserito il nome.");
		return false;
	}
	if (document.getElementById('registra').rag_soc.value == "") {
		alert("Attenzione! Non è stata inserita la ragione sociale.");
		return false;
	}
	if (document.getElementById('registra').indirizzo.value == "") {
		alert("Attenzione! Non è stato inserito l'indirizzo.");
		return false;
	}
	if (document.getElementById('registra').cap.value == "") {
		alert("Attenzione! Non è stato inserito il CAP.");
		return false;
	}
	if (isNaN(parseInt(document.getElementById('registra').cap.value))) {
		alert("Attenzione! Errore nel formato del CAP.");
		return false;
	}
	if ((document.getElementById('registra').cap.value).length != 5) {
		alert("Attenzione! Errore nel formato del CAP.");
		return false;
	}
	if (document.getElementById('registra').citta.value == "") {
		alert("Attenzione! Non è stata inserita la città.");
		return false;
	}
	if (document.getElementById('registra').prov.value == "") {
		alert("Attenzione! Non è stata inserita la provincia.");
		return false;
	}
	if ((document.getElementById('registra').prov.value).length != 2) {
		alert("Attenzione! Errore nel formato della provincia.");
		return false;
	}
	if (document.getElementById('registra').telefono.value == "") {
		alert("Attenzione! Non è stato inserito il telefono.");
		return false;
	}
	if (isNaN(parseInt(document.getElementById('registra').telefono.value))) {
		alert("Attenzione! Errore nel formato del numero di telefono.");
		return false;
	}
	if (document.getElementById('registra').fax.value == "") {
		alert("Attenzione! Non è stato inserito il fax.");
		return false;
	}
	if (isNaN(parseInt(document.getElementById('registra').fax.value))) {
		alert("Attenzione! Errore nel formato del numero di fax.");
		return false;
	}
	if (document.getElementById('registra').mail.value == "") {
		alert("Attenzione! Non è stato inserito l'indirizzo E-Mail.");
		return false;
	}
	if (document.getElementById('registra').password_attuale.value == "") {
		alert("Attenzione! Non è stata inserita la password attuale.");
		return false;
	}
	if (document.getElementById('registra').password.value != "") {
		if (document.getElementById('registra').password2.value == "") {
			alert("Attenzione! Non è stata inserita la password di conferma.");
			return false;
		}
	}
}

