var xmlhttp = null;
function doCounter(contextPath,url,siteId,channelId,infoId) {
	//alert(theA.href);
	CreateXmlHttpRequest();
	xmlhttp.onreadystatechange = handleStateChange;
	xmlhttp.open("POST",contextPath+"/view/servlet/Counter?url="+url+"&siteId="+siteId+"&channelId="+channelId+"&infoId="+infoId);
	xmlhttp.send(null);
}

function CreateXmlHttpRequest() {
	if (window.XMLHttpRequest) {
		xmlhttp = new XMLHttpRequest();
	}
	if (!xmlhttp && window.ActiveXObject) {
		xmlhttp = CreateHttpRequest();
	}
}
function CreateHttpRequest(){
	try{
		return new ActiveXObject('MSXML2.XMLHTTP.4.0');
	}catch(e){
		try{
			return new ActiveXObject('MSXML2.XMLHTTP.3.0');
		}catch(e){
			try{
				return new ActiveXObject('MSXML2.XMLHTTP.2.6');
			}catch(e){
				try{
					return new ActiveXObject('MSXML2.XMLHTTP');
				}catch(e){
					try{
						return new ActiveXObject('Microsoft.XMLHTTP');
					}catch(e){
						try{
							return new XMLHttpRequest();
						}catch(e){
							return null;
						}
					}
				}
			}
		}
	}
}

function handleStateChange(){

if(xmlhttp.readyState == 4){
			if(xmlhttp.status==200){
				//alert(xmlhttp.responseText);
				
				}
		}
}

