﻿function ValidateForm()
{
    if(document.getElementById("NameTextBox").value=="")
    {
        ShowMessage("Your Name is required");
        return false;
    }
    if(document.getElementById("EmailTextBox").value=="")
    {
        ShowMessage("Your Email is required");
        return false;
    }
        
    if(!checkMail(document.getElementById("EmailTextBox").value))
    {
        ShowMessage("Valid Email is required");
        return false;
    }
            
    if(document.getElementById("SendButton")!=null)
    {
        document.getElementById("SendButton").click();
    }
}

function ClearForm()
{
    document.getElementById("NameTextBox").value="";
    document.getElementById("EmailTextBox").value="";
    document.getElementById("PhoneTextBox").value = "";
    document.getElementById("AddressTextBox").value = "";
    document.getElementById("MessageTextBox").value="";
}

