﻿

var master ='ctl00_maincontent_'
function validate()
{
    if($("#" + master + "company").val() =="")
    {
        $("#" + master + "company").focus();
        alert("Please enter Company.");
        return false;
    }
    
    if($("#" + master + "firstname").val() =="")
    {
        $("#" + master + "firstname").focus();
        alert("Please enter First Name.");
        return false;
    }
    
    if($("#" + master + "lastname").val() =="")
    {
        $("#" + master + "lastname").focus();
        alert("Please enter Last Name.");
        return false;
    }
    
    if($("#" + master + "zip").val() =="")
    {
        $("#" + master + "zip").focus();
        alert("Please enter zip code.");
        return false;
    }
    
    if($("#" + master + "phone").val() =="")
    {
        $("#" + master + "phone").focus();
        alert("Please enter phone number.");
        return false;
    }
    
    if($("#" + master + "comment").val() =="")
    {
        $("#" + master + "comment").focus();
        alert("Please question/comment.");
        return false;
    }
    
    if($("#" + master + "comment").val().length <20)
    {
        $("#" + master + "comment").focus();
        alert("Question/Comment field must be more than 20 characters.");
        return false;
    }

    return true;
}

