function reply(id){
	$("#_cmt_Form :input[name='reply']").val(id);
	window.scroll(0,$("#_cmt_Form").offset().top);
	$("#_cmt_Form #cmt_content").focus();
	$("#_cmt_Form #button1").val("取消回复"+$("#ayeahCmt"+id+" .nickname").text()+"["+$("#ayeahCmt"+id+" .floor span").html()+"楼]").show();
}

function voteSupport(id){
	$("#ayeahCmt"+id+" .status").text('正在投票...').show();
	$.ajax({
		url:appBase+"vote.asp",
		type:"post",
		data:"id="+id+"&action=support",
		cache:false,
		dataType:"json",
		success:function(data){
			if (data.result=="failed")
			{
				$("#ayeahCmt"+id+" .status").text('你已经投过票了。');
			}else{
				$("#ayeahCmt"+id+" .status").text('投票成功。');
				$("#ayeahCmt"+id+" .vote1").text(data.result);
			}
		},
		error:function(XMLHttpRequest, textStatus, errorThrown){
			//alert(textStatus);
		}
	});
}

function voteAgainst(id){
	$("#ayeahCmt"+id+" .status").text('正在投票...').show();
	$.ajax({
		url:appBase+"vote.asp",
		type:"post",
		data:"id="+id+"&action=against",
		cache:false,
		dataType:"json",
		success:function(data){
			if (data.result=="failed")
			{
				$("#ayeahCmt"+id+" .status").text('你已经投过票了。');
			}else{
				$("#ayeahCmt"+id+" .status").text('投票成功。');
				$("#ayeahCmt"+id+" .vote2").text(data.result);
			}
		},
		error:function(XMLHttpRequest, textStatus, errorThrown){
			//alert(textStatus);
		}
	});
}

function voteIllegal(id){
	$("#ayeahCmt"+id+" .status").text('正在提交...').show();
	$.ajax({
		url:appBase+"vote.asp",
		type:"post",
		data:"id="+id+"&action=illegal",
		cache:false,
		dataType:"json",
		success:function(data){
			if (data.result=="success")
			{
				$("#ayeahCmt"+id+" .status").text('举报成功，谢谢您的支持。您是第'+data.count+'个举报此评论的。');
			}else{
				$("#ayeahCmt"+id+" .status").text('举报出错，可能是您已经举报过此评论。');
			}
		},
		error:function(XMLHttpRequest, textStatus, errorThrown){
			//alert(textStatus);
		}
	});
}