<!--
function digg_mv(type,id){
    digg(type,id,'');
}
function digg_video(type,id){
    digg(type,id,'');
}
function digg_journal(type,id){
    digg(type,id,'');
}
function digg_cartoon(type,id){
    cat_id = 0;
    
    var rand = Math.round(100000*Math.random())
    var url = "/ajax/digg/" + type + '_'+ id + '_' + rand;;

    var myAjax = new Ajax.Request(url,{method: 'get', parameters: null, onComplete: showResponse});
}
function digg(type,id,ext_params){
    cat_id = 0;
    
    var rand = Math.round(100000*Math.random())
    var url = "/common/digg.php";
    var pars = 'type=' + type + '&id='+id + ext_params + '&rand='+rand;

    //alert(url+pars);

    var myAjax = new Ajax.Request(url,{method: 'get', parameters: pars, onComplete: showResponse});

}

function showResponse(response){
    var JSONobj = eval('('+ response.responseText +')');

    var type   = JSONobj.type;
    var id     = JSONobj.id;
    var count  = JSONobj.count;

    //alert(type+id+count);

    var module_id = "digg_" + type + "_" + id ;
    $(module_id).hide();

    var done_module_id      = "digg_" + type + "_" + id + "_done";
    $(done_module_id).show();
    $(done_module_id).innerHTML = '已顶(' + count + ')';
    //window.setTimeout('new Effect.SlideDown(' + done_module_id + ', {duration:.4})',500);
    //$(done_module_id).style.cursor = 'default';
}


//-->
