votecomment = function(ploginusername, pusername, debateid, sideid, id, val) {
	if (ploginusername == '') {
		uilogin();
		return;
	}
	/* if (pusername=='') {
		alert(tranhluan_msg_error_votedcomment_visitor);
		return;
	} */
	if (ploginusername==pusername) {
		alert(tranhluan_msg_error_votedcomment_myself);
		return;
	}
	var purl = HOST_TRANHLUAN+'ajax/votecomment';
	var pdata = {
		username: pusername,
		debateid: debateid,
		sideid: sideid,
		id: id,
		point: val
	}
	$.ajax({
		cache	: false,
		async	: false,
		data	: pdata,
		url		: purl,
		dataType: 'jsonp',
		jsonp	: 'callback',
		success	: function(response) {
			var error 	= response['error'];
			var msg 	= response['msg'];
			var html 	= response['html'];
			var html2 	= response['html2'];
			var html3 	= response['html3'];
			if (error == 2) {
				uiupdateinfo(debateid);
			}
			if (msg) {
				if (error==0) {
					$('#idpoint'+id).html(html);
					if (html>='10' && $('#ididea'+id)) {
						$('#ididea'+id).attr('class', 'contentIdea highLight');
					}
					if (sideid>0 && $('#idscore'+sideid)) {
						$('#idscore'+sideid).html(html2);
					}
					if (sideid==-1 && $('#idscorea')) {
						$('#idscorea').html(html2);
					}
					if (sideid==-2 && $('#idscoreb')) {
						$('#idscoreb').html(html2);
					}
					if ($('#idscores')) {
						$('#idscores').html(html3);
					}
					showUIMessage(msg);
				} else {
					alert(msg);
				}
			}
		}
	});
}
