
function validate_form_1051(){
    reset_input("form_1051");
    with (document.form_1051){
            
        if(inputObj=document.getElementById("contract_firstname")){
            if(contract_firstname.value==""){
                inputError("Please enter your first name", inputObj);
                inputObj.focus();
                return false;
            }
        }
        if(inputObj=document.getElementById("contract_lastname")){
            if(contract_lastname.value==""){
                inputError("Please enter your last name", inputObj);
                inputObj.focus();
                return false;
            }
        }
        if(inputObj=document.getElementById("contract_company_name")){
            if(contract_company_name.value==""){
                inputError("Please enter the name of your company", inputObj);
                inputObj.focus();
                return false;
            }
        }
        if(inputObj=document.getElementById("contract_company_industry")){
            if(contract_company_industry.value==""){
                inputError("Please enter what kind of industry your company is in", inputObj);
                inputObj.focus();
                return false;
            }
        }
        if(inputObj=document.getElementById("contract_company_website")){
            if(contract_company_website.value==""){
                inputError("Please enter the URL of your website", inputObj);
                inputObj.focus();
                return false;
            }
        }
        if(inputObj=document.getElementById("contract_company_location")){
            if(!selectBoxIsSelected("contract_company_location")){
                inputError("Please choose the location of your company", inputObj);
                inputObj.focus();
                return false;
            }
        }
        if(inputObj=document.getElementById("contract_position")){
            if(contract_position.value==""){
                inputError("Please enter the name of your position", inputObj);
                inputObj.focus();
                return false;
            }
        }
        if(inputObj=document.getElementById("contract_business_desc")){
            if(contract_business_desc.value==""){
                inputError("Please write briefly about your business", inputObj);
                inputObj.focus();
                return false;
            }
        }
        if(inputObj=document.getElementById("contract_contact_number")){
            if(contract_contact_number.value==""){
                inputError("Please enter a valid phone number", inputObj);
                inputObj.focus();
                return false;
            }
                else
                if(!is_phone_number("contract_contact_number")){
                    inputError("Please enter a valid phone number", inputObj);
                inputObj.focus();
                return false;
                }
        }
        if(inputObj=document.getElementById("contract_email")){
            if(contract_email.value==""){
                inputError("Please enter a valid email address", inputObj);
                inputObj.focus();
                return false;
            }
                else
                if(!isValidEmail("contract_email")){
                    inputError("Please enter a valid email address", inputObj);
                inputObj.focus();
                return false;
                }
        }
        if(inputObj=document.getElementById("contract_capacity")){
            if(contract_capacity.value==""){
                inputError("Please enter a numerical value", inputObj);
                inputObj.focus();
                return false;
            }
                else
                if(!IsNumeric("contract_capacity")){
                    inputError("Please enter a numerical value", inputObj);
                inputObj.focus();
                return false;
                }
        }
        if(inputObj=document.getElementById("contract_capacity_unit")){
            if(!selectBoxIsSelected("contract_capacity_unit")){
                inputError("Please select the unit", inputObj);
                inputObj.focus();
                return false;
            }
        }
        if(document.getElementsByName("contract_capability").length>0){
            if(!radioIsChecked("contract_capability")){
                groupError("Please choose the capabiliy", "contract_capability_group");
                return false;
            }
        }
        if(document.getElementsByName("contract_availability").length>0){
            if(!radioIsChecked("contract_availability")){
                groupError("Please choose the availability", "contract_availability_group");
                return false;
            }
        } 
        }
        var formObj=document.getElementById("form_1051");
            formObj.target="upload1051";
            return true;
    }