$("document").ready(function() {
    $("a.deletechild").off("click.deletechild");
    $("a.deletechild").on("click.deletechild", function() {
        if (!confirm(CommonResources.SureDeleteElement))
            return false;

        var child = $(this);

        $.get(child.attr("href"), { json: "json" }, function() {
            var ul = child.closest("ul.items");
            child.closest("li").remove();
            if (!ul.children("li").size()) {
                ul.closest("div").append('<div class="details">' + CategoryResources.NoChilds +  '</div>');
                ul.remove();
            }
        });
        return false;
    });
});
function selectCategoryNameLanguage() {
    var url = 'fieldlanguage.ivp/load?required=true&table=Categories&field=NameXml&id=' + $('#id').val();
    openDialog(url, 'selectlanguage', { width: 900, height: 650 });
    return false;
}
 function selectCategoryDescriptionLanguage() {
     var url = 'fieldlanguage.ivp/load?textarea=true&table=Categories&field=DescriptionXml&id=' + $('#id').val();
    openDialog(url, 'selectlanguage', { width: 900, height: 650 });
    return false;
}