function getFunc(func, elm) {
    if(func=='checkBox' && elm.id == "agreement") {
        return elm.checked;
    //only validate agreement chk box

    }else if(func=='checkBoxMulty'){
        var checkboxes = jQuery("input[name='"+elm.name+"']");
        var checkboxesLength = jQuery("input[name='"+elm.name+"']").length - 1;

        //validate only last checkbox, because validation validates all of them together
        if (checkboxes[checkboxesLength].id == elm.id){
            if (jQuery("input[name='"+elm.name+"']:checked").length>0){
                return true;
            } else{
                return false;
            }
        }else{
            return true;
        }

    } else{
        return true;
    }
}