// ====================================================================
//                      FUNZIONI DI VALIDAZIONE FORM
//                  copyright Antares di Sbrana Saverio
// ====================================================================

function checkFormContatti(elemento)
{	
	if(conSeVuoto(elemento.nome))
	{
		erroreMsg("Inserire il nome",elemento.nome)
		return false;
	}
	if(conSeVuoto(elemento.cognome))
	{
		erroreMsg("Inserire il cognome",elemento.cognome)
		return false;
	}
	if(conSeVuoto(elemento.email))
	{
		erroreMsg("Inserire l'email",elemento.email)
		return false;
	}
	if(conEmail(elemento.email))
	{
		erroreMsg("Inserire l'email correttamente",elemento.email)
		return false;
	}
	if(conSeVuoto(elemento.messaggio))
	{
		erroreMsg("Inserire il messaggio",elemento.messaggio)
		return false;
	}
	if(elemento.privacy[1].checked)
	{
		erroreMsg("E' necessario accettare la legge sulla privacy",elemento.privacy[1])
		return false;
	}	
	inviaEmail();
	return false;
}

