function commentCount(num){
	$("ctCount1").innerHTML=num;
}
function checkFavor(ans)
{
	alert(ans);
}
function checkRefuseKey(){
messBox(false,"您输入的信息带有敏感字符!");
return false;
}
function postDelReq(){
	var oId = $("delcmtid").value;
	var reason = $("delintro").value;
	var type = $("delcmttype").value;
	asyncProxy(postDomain+"/edit/delrequest.html",{
	objType : type,
	objId : oId,
	reason : reason
	},
	function(ans){
	hideDelReq();
	ans.evalScripts();
	}
	);
}
function delCmtReq(obj) {
		var winDiv=$('popupwindow');
		var po=getElementPosition(obj);
		$('PWID').innerHTML="请输入请求删除理由！";
		winDiv.style.left=(po.left-parseInt(winDiv.style.width))+"px";
		winDiv.style.top=po.top+"px";
		winDiv.style.visibility = 'visible';
		
		var oId = obj.getAttribute("cmtid");
		$("delcmtid").value = oId;
		$("delcmttype").value = 1;
		return false;
}
function hideDelReq(){
	var winDiv=$('popupwindow');
	$("delintro").value = "";
	$("delcmttype").value = "";
	$("delcmtid").value = "";
	winDiv.style.visibility = 'hidden';
}
function editCmt(obj){
	var cmtid = obj.getAttribute("cmtid");
	var score = obj.getAttribute("score");
	var rec = obj.getAttribute("rec");
	var intro = obj.getAttribute("intro");
	intro = intro.replaceAll("</br>","\n");
	intro = intro.replaceAll("<br/>","\n");
	intro = intro.replaceAll("&nbsp;"," ");
	intro = intro.replaceAll("&quot;","\"");
	
	starsClick(score,2);
	$("ctTag2").value=rec;
	$("ctCon2").value=intro;
	$("cmtID").value=cmtid;
}
function postTag(tag){
	$("postTag").value=tag;
	$("tagForm").submit();
}
function isChinese(obj){
if(/^[\u4e00-\u9fa5]+$/.test(obj))return true;
return false;
}
function checkTTLen(tagId){
var j=0;
var str=$(tagId).value;
for(var i=0;i<str.length;i++){
var tmp=str.charAt(i);
if(isChinese(tmp))j=j+3; //utf8???3???
else j=j+1;
}
return j;
}