﻿function ValidateAreYouAOther(src, args) {
    // default to valid
    args.IsValid = true;
    // check if other is selected
    if ($("select.areyoua").val().toLowerCase() == "other") {
        // check they've entered an other value
        args.IsValid = ($.trim($("input.areyoua").val()).length > 0);
    }
}
function ValidateTelephoneNumber(src, args) {
    // default to valid
    args.IsValid = (($.trim($("input.telarea").val()).length + $.trim($("input.telnumber").val()).length) > 0);
}
function ValidateTelephoneNumberWithoutArea(src, args) {
    // default to valid
    args.IsValid = ($.trim($("input.telnumber").val()).length > 0);
}

function ValidateHowDidYouHear(src, args) {
    // default to valid
    args.IsValid = true;
    // check if other is selected
    if ($("select.howheard").val().toLowerCase() == "other") {
        // check they've entered an other value
        args.IsValid = ($.trim($("input.howheard").val()).length > 0);
    }
}
