function SendMail()
{
    var errors = "";
    
    if (trim($("txMsg").value).length == 0)
    {
        errors += " - Ompli el camp \"Missatge\";\n";
    }
    
    if (((trim($("txTelephone").value).length <= 0)||(!isPhoneValid( $("txTelephone").value)))&&((trim($("txEmail").value).length <= 0)||(!isEmail( $("txEmail").value))))
    {
        errors +=  " - Introdueixi valors vàlids en un dels camps: \"Telèfon\" o  \"Correu electrònic\";\n";
    }  
    
    
    if (errors.length > 0)
    {
        alert("Si us plau, corregeixi els següents problemes: \n" + errors);
        return false;
    }
    else
    {
        $("hAction").value = "Send";
        return true;
    }
}

