﻿// JavaScript File

function sendContact() {
    var hValidParamsInitial = $("hValidParamsInitial").value;
    var tel = $("txPhone").value;
    var email = $("txEmail").value;
    
    var error = getValidationError(hValidParamsInitial.split(", "), document);
    
//    if (tel.length <= 0 && email.length <= 0) {
//            error += "- You must fill in the \"Phone no.\" or the \"Email\" field;\n";   
//    }
    
    if (error.length <= 0) {
        //alert("dada");
        $("hAction").value = "SaveContact";
        $("frmMain").submit();
        
    } 
    else {
            alert("The form is not fully completed:\n"+error);
    }
}