﻿function ValidateBMFContact(sender, args) {
    args.IsValid = validate('bmf_contact');
}

function ValidateBMFOtherContact(sender, args) {

    args.IsValid = validate('bmf_other_contact');
}

function validate(id) {
    var check = false;
    var div = document.getElementById(id);

    var chk = div.getElementsByTagName('input');
    var len = chk.length;

    for (var i = 0; i < len; i++) {
        if (chk[i].type === 'radio') {
            if (chk[i].checked == 1) {
                check = true;
            }
        }
    }
    return check;
}

