function digg(link_id, digg_type, update) 
{
	var url = '/link/userDiggLink/raw';
	var data = 'link_id='+link_id+'&digg_type='+digg_type;
	
	new Ajax(url, {
		method: 'post',
		onComplete: function() {
			var result = Json.evaluate(this.response.text);
			if (result.res==1) {
				if (update==1) {
					$('diggs-strong-'+link_id).setHTML(result.link.ding_count);
				} else{
					alert(result.msg);
				}
			} else {
				alert(result.msg);
			}
		}
	}).request(data);

}

function diggComment(link_id, comment_id, digg_type)
{
	
	var url = '/link/userDiggComment/raw';
	var data = 'link_id='+link_id+'&comment_id='+comment_id+'&digg_type='+digg_type;
	
	new Ajax(url, {
		method: 'post',
		onComplete: function() {
			var result = Json.evaluate(this.response.text);

			if (result.res==1) {
				$('all-diggs'+result.comment.id).setHTML((result.comment.diggs));
				// TVRCGO : 改变囧囧有声评论热度值 090724
				var prev_ding = parseInt(document.getElementById("comment-ding-"+comment_id).innerHTML);
				var prev_cai = parseInt(document.getElementById("comment-cai-"+comment_id).innerHTML);
				digg_type==1?$("comment-ding-"+comment_id).setHTML(prev_ding+1):$("comment-cai-"+comment_id).setHTML(prev_cai+1);
				// END
				try {
					$('hot-diggs'+result.comment.id).setHTML((result.comment.diggs));
				} catch(e) {
					
				}
			} else {
				alert(result.msg);
			}
		}
	}).request(data);
	
	return false;
}