

function counter(articleId, contextPath) 
{ 
	xml = new ActiveXObject("Microsoft.XMLHTTP");  
	var post = contextPath + "flowStat.asp?articleId="+articleId;//构造要携带的数据  
	xml.open("POST",post,false);//使用POST方法打开一个到服务器的连接，以异步方式通信  
	xml.setrequestheader("content-length",post.length);  
	xml.setrequestheader("content-type","application/x-www-form-urlencoded");  //中文请求
	xml.send(post);//发送数据  
	var v = xml.responseText;
} 

function checkEmpty(obj, msgName, allowSpace){
	if(obj != null && obj != "undefined"){
		var v = obj.value;
		if(allowSpace!=null && allowSpace!=undefined){
			if(!allowSpace) v = v.trim();
		}
		if(v == ""){alert("请填写'"+msgName+"'"); obj.value="";obj.focus(); return false;}
		return true;
	}else{
		return false;
	}
}

String.prototype.trim = function() 
{ 
	return this.replace(/(^\s*)|(\s*$)/g, ""); 
} 