function xmlData(x){x=x.responseXML?x.responseXML:x;return x.documentElement.firstChild.nodeValue}
function ajaxOkAdd(x,str){
	x=xmlData(x);
	if(x != 'succeed'){
		alert(x);
	}else{
		var i,l,s=str.split(',');
		for(i=0,l=s.length;i<l;i++)$(s[i]).html(parseInt($(s[i]).html()) + 1);
	}
}
function ajaxPraise(aid,str){
	$.ajax({url:base+'tools/praise.php?inajax=1&aid='+aid,success:function(x){ajaxOkAdd(x,str)}});
}
function ajaxDebase(aid,str){
	$.ajax({url:base + 'tools/debase.php?inajax=1&aid='+aid,success:function(x){ajaxOkAdd(x,str)}});
}
function ajaxComment(aid,cid,opt,str){
	$.ajax({url:base+'tools/comment.php?action=vote&inajax=1&aid='+aid+'&cid='+cid+'&option='+opt,success:function(x){ajaxOkAdd(x,str)}});
}
function ajaxMscore(mid,score){
	$.ajax({url:base + 'mspace/score.php?inajax=1&mid='+mid+'&score='+score,success:function(x){
		x=xmlData(x);
		alert(x=='succeed'?'ÆÀ·Ö³É¹¦£¡':x)
	}});
}
function ajaxUscore(aid,score,id){
	$.ajax({url:base + 'tools/score.php?inajax=1&aid='+aid+'&score='+score,success:function(x){ajaxOkAdd(x,id);
	}});
}