$("document").ready(function() {
    if ($.multipleSelect) $.multipleSelect.initByClassName('.multipleselect', { maxwidth: '300px', init: true });

    $("form").validate({
        submitHandler: function(form) {
            if ( $("#taskroletypesids option:selected").length > 0 )
                form.submit();
            else
                $("#taskroletypesids").closest("div").append("<label for='workflowstatusid' generated='true' class='error'>" +
                CommonResources.NoOneSelected + "</label>");
        }
    });
})

function afterSave() {
   if (opener && opener.loadRecommendedActions) opener.loadRecommendedActions(true);
     self.close();
 }

 function selectRecommendedActionNameLanguage() {
     var url = 'fieldlanguage.ivp/load?textarea=true&table=WorkflowStatusRecommendedActions&field=RecommendedActionXml&id=' + $('#id').val();
     openDialog(url, 'selectlanguage', { width: 900, height: 650 });
     return false;
 }
 