
function reportAbuse( BB_id, BBC_id )
{
    // check for active user
    if (!BDP.AU_id && !BDP.U_id) {
        return false;
    }

    // init abuse Jsr (global)
    if (typeof(oJsr_abuse) == "undefined") {
        oJsr_abuse = new Jsr();
    }

    // onload - result
    oJsr_abuse.onresults = function (oThis) {
        if (oThis.results.abuse) {
            BDP.message('abuse_done');
        } else {
            BDP.error('Can not report abuse BBC_id: ' + BBC_id);
        }
    };

    // call
    oJsr_abuse.call('buzzbite', 'abuse', {'BB_id': BB_id, 'BBC_id': BBC_id});
}

function voteComment( BB_id, BBC_id, type )
{
    // check for active user
    if (!BDP.U_id) {
        showTip();
        return false;
    }

    // init voteComment Jsr (global)
    if (typeof(oJsr_voteComment) == "undefined") {
        oJsr_voteComment = new Jsr();
    }

    // onload - result
    oJsr_voteComment.onresults = function (oThis) {
        if (oThis.results.voteComment) {
            // BDP.message('abuse_done');
            if (oThis.results.voteComment == 'already_voted') {
                BDP.message('comment_vote_already');
            } else if (oThis.results.voteComment == 'self_comment_vote') {
                BDP.message('comment_vote_self');
            } else {
                //BDP.message('comment_vote_done');
                var votesUp = document.getElementById('bbc_vote_up_' + BBC_id);
                var votesDown = document.getElementById('bbc_vote_down_' + BBC_id);
                votesUp.innerHTML = oThis.results.voteComment.up;
                votesDown.innerHTML = oThis.results.voteComment.down;
            }
        } else {
            BDP.error('Can not register vote BBC_id: ' + BBC_id);
        }
    };

    // call
    oJsr_voteComment.call('buzzbite', 'voteComment', {'BB_id': BB_id, 'BBC_id': BBC_id, 'type': type});
}

function showTip() {
    obj = document.getElementById('bbCutsTip');
    obj.style.display='block';
}

function hideTip() {
    obj = document.getElementById('bbCutsTip');
    obj.style.display='none';
    return false;
}
