

$(document).ready(function () {

    $("#frm1").submit(function (event) {
        var group_parent = $('#tree input:radio[name=gp]:checked').val();

        if (group_parent == undefined)
        {
            alert('Choose only one Group parent.');

            event.preventDefault();
            return false;
        }

        group_parent = parseInt(group_parent);

        $('#group_parent').val(group_parent);

    });

});

