//触发服务器事件
function AjaxServer()
{

}

//创建XMLhttp对象
AjaxServer.CreateHttpObj=function(){
	var objhttp;
	try
	{
		//IE浏览器
		try
		{
			objhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			objhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	catch(e)
	{
		//不是IE浏览器
		try
		{
			objhttp = new XMLHttpRequest();
		}
		catch(e)
		{
			objhttp = null;
		}
	}
	return objhttp
}


//获取新闻点击量
AjaxServer.getHits = function(id,pathstr)
{
	var xmlhttp = AjaxServer.CreateHttpObj();
	if(xmlhttp)
	{
		xmlhttp.open("GET", pathstr +"www/js/server.asp?flag=hits&ID="+ id, false); 
		xmlhttp.send(); 
		if(xmlhttp.status==200)
		{
			document.getElementById("show").innerHTML = xmlhttp.responseText
		}
	}
}

