function statistics2(theid,action)
{
var webFileUrl = "saveclick.asp?id="+theid+"&action="+action; 
//alert (webFileUrl);
//return false;
var result = ""; 
if (window.ActiveXObject)
{xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");} 
else
if (window.XMLHttpRequest)
{xmlHttp = new XMLHttpRequest();} 
xmlHttp.open("Post", webFileUrl, false); 
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 
xmlHttp.send(""); 
xmlHttp.onreadystatechange=function() 
{ 
if (xmlHttp.readyState==4) 
{result = xmlHttp.responseText; } 
} 
if(xmlHttp.status!=200) 
{//alert ('系统故障，正在中断操作；(xmlHttp.status='+xmlHttp.status+')！'); 
 return false;
 } 
//result = xmlHttp.responseText; 
}


function writeCookie(name, value, hours)

{

var expire = "";

if(hours != null)

{

    expire = new Date((new Date()).getTime() + hours * 3600000);

    expire = "; expire=" + expire.toGMTString();

}

document.cookie = name + "=" + escape(value) + expire+";path=/";

}

//读取cookie
function readCookie(name)

{

var cookieValue = "";

var search = name + "=";

if(document.cookie.length > 0)

{

    offset = document.cookie.indexOf(search);

    if (offset != -1)

    {

      offset += search.length;

      end = document.cookie.indexOf(";", offset);

      if (end == -1) end = document.cookie.length;

      cookieValue = unescape(document.cookie.substring(offset, end))

    }

}

return cookieValue;
}

