function check(the_email)
{   
    var error_string = "";
    
    if (document.getElementById("campo_nome").value == "") { error_string += "Nome\n"; } 
    if (document.getElementById("campo_cognome").value == "") { error_string += "Cognome\n"; } 
    if (document.getElementById("campo_citta").value == "") { error_string += "Citta'\n"; } 
   	if (document.getElementById("campo_tel").value == "") { error_string += "Tel / Cell\n"; } 
    if (document.getElementById("campo_persone").value == "Seleziona") { error_string += "Numero Persone\n"; } 
	if (document.getElementById("campo_arrivo_g").value == "Giorno") { error_string += "Data di Arrivo: Giorno\n"; }
	if (document.getElementById("campo_arrivo_m").value == "Mese") { error_string += "Data di Arrivo: Mese\n"; }
	if (document.getElementById("campo_arrivo_a").value == "Anno") { error_string += "Data di Arrivo: Anno\n"; }
    if (document.getElementById("campo_partenza_g").value == "Giorno") { error_string += "Data di Partenza: Giorno\n"; }
	if (document.getElementById("campo_partenza_m").value == "Mese") { error_string += "Data di Partenza: Mese\n"; }
	if (document.getElementById("campo_partenza_a").value == "Anno") { error_string += "Data di Partenza: Anno\n"; }
   
	var the_at = the_email.indexOf("@");
    var the_dot = the_email.lastIndexOf(".");
    var a_space = the_email.indexOf(" ");
    
	if ((the_at != -1) && (the_at != 0) && (the_dot != -1) && 
        (the_dot > the_at + 1) && (the_dot < the_email.length - 1) && 
        (a_space  == -1)) {  }  
    else { error_string += "\n\nSpiacente, la tua e-mail inserita non e' valida!.\n"; }

	
	if (error_string == "") { return true; } 
    else 
    {
        error_string = "Completa il modulo di Richeista Disponibilita' con i seguenti campi:\n\n" + error_string;
        alert(error_string);
        return false;
    } 
}

function checkEmail(the_email)
{
        var the_at = the_email.indexOf("@");
        var the_dot = the_email.lastIndexOf(".");
        var a_space = the_email.indexOf(" ");
        if ((the_at != -1) &&  
        (the_at != 0) &&  
        (the_dot != -1) && 
        (the_dot > the_at + 1) &&  
        (the_dot < the_email.length - 1) && 
        (a_space  == -1)) 
        {
         return true;
        }  else {
         alert("Spiacente, la tua e-mail inserita non è valida!");
         return false;
    }
}