var xmlHttp = false;
try {
xmlHttp = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
xmlHttp = false;
}
}
}
if (!xmlHttp){
alert("无法创建 XMLHttpRequest 对象！");
}
//记录开始时间
 var beginTime = new Date();
 //存储页面信息	
 function ActionDo()
 {   
 	var endTime = new Date(); 
	var during_time = endTime.getTime() - beginTime.getTime();
		
	var types = document.getElementById("content_type").value;
 	var urlParam = location.href;  
	var url="index.php?controller=RecordPageAction&action=index&during_time="+escape(during_time)+"&type="+escape(types)+"&urlParam="+escape(urlParam);
	//alert(url);
	xmlHttp.open("GET", url, true);
	xmlHttp.onreadystatechange = updatePage;
	xmlHttp.setRequestHeader("If-Modified-Since","0");
	xmlHttp.send(null);
}
function updatePage(){
if(xmlHttp.readState<4)
{
	//document.getElementById("tip").innerHTML= "loading.....";
}
if (xmlHttp.readyState == 4) 
{
  if (xmlHttp.status==200 || xmlHttp.status==0) 

  {
    // alert(xmlHttp.responseText);
         //document.getElementById("time").value= xmlHttp.responseText;
  }
     //else alert("status is " + xmlHttp.status);
  }
} 





