//function cdf_send(c, ct, table, id)
function cdf_ct_send(c, url)
{
    $.get(url, {} ,
        function(data)
        {
            $('#cdf_' + c).replaceWith(data)
        });    
}
function cdf_get(cdfId, url)
{
    $.get(url, {} ,
        function(data)
        {
            $(cdfId).replaceWith(data)
        });    
}

function del_file(filename)
{
    $.post("?c=DelFile",{file: filename}, function(str){} )
}
function del_file_and_tag(filename, tag_id)
{
    $.post("/del_file.php",{file: filename}, function(str){ $('#' + tag_id).remove() } )
}
function del_tag(tag_id)
{
    $('#' + tag_id).remove()
}
function del_img_tag(dir, id, tag_id)
{
    del_file(dir + "/" + id + ".jpg")
    $('#' + tag_id).remove()
}
function upd(table, fld, id)
{
    $('#status').text('');
    $.post("/a_upd.php", {table: table, fld: fld, val: $('#' + fld + id).val(), id: id},
        function(str){
            $('#status').text(str);
            $("#status").fadeIn(800).animate({g:1}, 2000).fadeOut(800);
        }
    )
}

