function save_bug(forma) {
    var module  = encodeURIComponent(forma.module.value);
    var act     = encodeURIComponent(forma.act.value);
    var query_str = encodeURI(location.href);
    var etype   = encodeURIComponent(forma.etype.value);
    var priority   = encodeURIComponent(forma.priority.value);
    var descr   = encodeURIComponent(forma.descr.value);
    var actions = encodeURIComponent(forma.actions.value);
    AjaxRequest.get(
    {
        'url':"/system/ajax_bug.php?do=save_bug&module="+module+"&act="+act+"&etype="+etype+"&priority="+priority+"&descr="+descr+"&actions="+actions+"&query_str="+query_str
        ,
        'onLoading': function() {
            document.getElementById("bug_state_load").innerHTML = '<img src="/theme/default/images/load.gif">';
        }
        ,
        'onSuccess': function(req){
            document.getElementById("bug_state_load").innerHTML = '';
            eval(req.responseText);
        }
    }
    );
}
function bug_solved(id) {
    AjaxRequest.get(
    {
        'url':'/system/ajax_bug.php?do=solve_bug&id='+id
        ,
        'onLoading': function() {
            document.getElementById("bug"+id+"_state_load").innerHTML = '<img src="/theme/default/images/load.gif">';
        }
        ,
        'onSuccess': function(req){
            document.getElementById("bug"+id+"_state_load").innerHTML = req.responseText;
        }
    }
    );
}
function bug_accept(id) {
    AjaxRequest.get(
    {
        'url':'/system/ajax_bug.php?do=accept_bug&id='+id
        ,
        'onLoading': function() {
            document.getElementById("bug"+id+"_accept_load").innerHTML = '<img src="/theme/default/images/load.gif">';
        }
        ,
        'onSuccess': function(req){
            document.getElementById("bug"+id+"_accept_load").innerHTML = req.responseText;
        }
    }
    );
}
function bug_ready(id) {
    AjaxRequest.get(
    {
        'url':'/system/ajax_bug.php?do=ready_bug&id='+id
        ,
        'onLoading': function() {
            document.getElementById("bug"+id+"_ready_load").innerHTML = '<img src="/theme/default/images/load.gif">';
        }
        ,
        'onSuccess': function(req){
            document.getElementById("bug"+id+"_ready_load").innerHTML = req.responseText;
        }
    }
    );
}


