// modify Article
// autogenerated, remove this if edited
function article_modify(article_id, caller)
{
    ControlsManager.disable(caller);
    $('#intro_html').val(hb_intro.get_html());
    $('#content_html').val(hb_content.get_html());
    $.post("ajax.php?act=article_modify&id="+article_id,
        $("#article_form").serialize(),
        //handler for modify Article
        // autogenerated, remove this if edited
        function(response, textStatus)
        {
            if(ResponseMan.isSuccessful(response, textStatus))
            {
                ContentMan.changeIcon("#saveicon", 'images/tick30x30.png');
            }
            else
            {
                ResponseMan.displayMessage(response);
            }
            ControlsManager.enable(caller);
        },
        "json");
}

// create Article
// autogenerated, remove this if edited
function article_create(caller)
{
    ControlsManager.disable(caller);
    $('#intro_html').val(hb_intro.get_html());
    $('#content_html').val(hb_content.get_html());
    $.post("ajax.php?act=article_create",
        $("#article_form").serialize(),
        //handler for create Article
        // autogenerated, remove this if edited
        function(response, textStatus)
        {
            if(ResponseMan.isSuccessful(response, textStatus))
            {
                MessageMan.displaySuccess("Cikk létrehozva. Oldal frissítése...");
                ContentMan.changeIcon("#saveicon", 'images/tick30x30.png');
                window.setTimeout("loadPage('article.php?id="+response.article_id+"');", 2000)
            }
            else
            {
                ResponseMan.displayMessage(response);
            }
            ControlsManager.enable(caller);
        },
        "json");
}
