// ====================================================================
//                      FUNZIONI DI VALIDAZIONE FORM
//                   copyright Antares di Sbrana Saverio
// ====================================================================


function checkRichiestaInfoMaster(elemento)
{
          
         if(conSeVuoto(elemento.cognome))
          {
		 	erroreMsg("Attenzione inserire il cognome",elemento.cognome)
            return false;
         }
		 if(conSeVuoto(elemento.nome))
		 {
		 	erroreMsg("Attenzione inserire il nome",elemento.nome)
         	return false;
         }
		  if(conSeVuoto(elemento.via))
		 {
		 	erroreMsg("Attenzione inserire l'indirizzo",elemento.via)
         	return false;
         }
		  if(conSeVuoto(elemento.n))
		 {
		 	erroreMsg("Attenzione inserire il numero civico",elemento.n)
         	return false;
         }
		 if(conSeVuoto(elemento.citta))
		 {
		 	erroreMsg("Attenzione inserire la citta'",elemento.citta)
         	return false;
         }
          if(conSeVuoto(elemento.cap))
		 {
		 	erroreMsg("Attenzione inserire il cap'",elemento.cap)
         	return false;
         }
		 if(conSeVuoto(elemento.tel))
		 {
		 	erroreMsg("Attenzione inserire un numero di telefono",elemento.tel)
         	return false;
         }
		 
          if(conSeVuoto(elemento.email))
          {
		 	erroreMsg("Attenzione inserire l'indirizzo e-mail",elemento.email)
         	return false;
         }
         if(conEmail(elemento.email))
          {
		 	erroreMsg("Attenzione inserire l' indirizzo e-mail corretto",elemento.email)
         	return false;
         }
		 if(conSeVuoto(elemento.universita))
          {
		 	erroreMsg("Attenzione inserire l'universita'",elemento.universita)
         	return false;
         }
          if(conSeVuoto(elemento.note))
          {
		 	erroreMsg("Attenzione inserire le motivazioni",elemento.note)
         	return false;
         }
		 if(!elemento.accetta.checked)
		 {
			 erroreMsg("Attenzione per inviare il form accettare il trattamento dei dati.",elemento.note)
			 return false;
		}
		return true;
}
function checkRichiestaInfoSsml(elemento)
{
          
         if(conSeVuoto(elemento.cognome))
          {
		 	erroreMsg("Attenzione inserire il cognome",elemento.cognome)
            return false;
         }
		 if(conSeVuoto(elemento.nome))
		 {
		 	erroreMsg("Attenzione inserire il nome",elemento.nome)
         	return false;
         }
		  if(conSeVuoto(elemento.via))
		 {
		 	erroreMsg("Attenzione inserire l'indirizzo",elemento.via)
         	return false;
         }
		 if(conSeVuoto(elemento.citta))
		 {
		 	erroreMsg("Attenzione inserire la citta'",elemento.citta)
         	return false;
         }
		 if(conSeVuoto(elemento.pr))
		 {
		 	erroreMsg("Attenzione inserire la provincia'",elemento.pr)
         	return false;
         }
		 if(conSeVuoto(elemento.tel))
		 {
		 	erroreMsg("Attenzione inserire un numero di telefono",elemento.tel)
         	return false;
         }
		 if(conSeVuoto(elemento.cell))
		 {
		 	erroreMsg("Attenzione inserire un numero di cellulare",elemento.cell)
         	return false;
         }
		 
          if(conSeVuoto(elemento.email))
          {
		 	erroreMsg("Attenzione inserire l'indirizzo e-mail",elemento.email)
         	return false;
         }
         if(conEmail(elemento.email))
          {
		 	erroreMsg("Attenzione inserire l' indirizzo e-mail corretto",elemento.email)
         	return false;
         }
		 if(conSeVuoto(elemento.provenienza))
          {
		 	erroreMsg("Attenzione inserire la scuola/universitā di provenienza'",elemento.provenienza)
         	return false;
         }
		 if(conSeVuoto(elemento.dellacittadi))
          {
		 	erroreMsg("Attenzione inserire la cittā di provenienza'",elemento.dellacittadi)
         	return false;
         }
		 if(conSeVuoto(elemento.lingue))
          {
		 	erroreMsg("Attenzione inserire le lingue",elemento.lingue)
         	return false;
         }
          if(conSeVuoto(elemento.note))
          {
		 	erroreMsg("Attenzione inserire le informazioni che volete richiedere",elemento.note)
         	return false;
         }
		 if(conSeVuotoTextArea(elemento.note))
{
         if (elemento.value=="") return true;
         return false
}
		 if(elemento.accetta.checked)
		 {
			 erroreMsg("Attenzione per inviare la richiesta č necessario accettare il trattamento dei dati.",elemento.checked)
			 return false;
		}

		return true;
}

