/*  // 点击链接统计
	document.onclick = function() 
	{
		return;
		var linkSource = window.location.href;
		var elem = event.srcElement;
		var encodeHref = "";
		if(elem.tagName == "IMG")
		{
			if(elem.id == "imgLogin" || elem.id == "imgLogOut") return;			
			encodeHref = elem.parentElement.href;
			xmlHttp.open("post", "/Activity/AnchorStatistic/AnchorData.aspx?linkSource=" + linkSource + "&innerText=" + elem.innerText + "&href=" + encodeHref, true);
			xmlHttp.send(null);		
		}
		if(elem.tagName == "A")
		{
			var encodeHref = elem.href;
			xmlHttp.open("post", "/Activity/AnchorStatistic/AnchorData.aspx?linkSource=" + linkSource + "&innerText=" + elem.innerText + "&href=" + encodeHref, true);
			xmlHttp.send(null);		
		}
	}
*/
	function getHttpObject()
	{
		var xmlHttp = false;
		if(window.xmlHttpRequest)
		{   
			xmlHttp = new xmlHttpRequest();   
			if(xmlHttp.overrideMimeType)
			{    
				xmlHttp.overrideMimeType('text/xml');   
			}  
		}  
		else
		{   
			try
			{    
				xmlHttp = new ActiveXObject("Msxml2.xmlHttp");   
			}
			catch(e)
			{    
				try
				{
					xmlHttp = new ActiveXObject("Microsoft.xmlHttp");
				}
				catch(e)
				{
					xmlHttp = false;    
				}   
			}
		}  
		return xmlHttp;
	}

	// 打开页面统计
	function Stat()
	{

		xmlHttp = getHttpObject();
		var strLinkSource = window.document.referrer;
		var strInnerText = window.document.getElementsByTagName("TITLE")[0].innerText;
		var strHref = window.location.href

		if(strLinkSource.indexOf("google") == -1 && strLinkSource.indexOf("yahoo") == -1)
		{
			
			xmlHttp.open("post", "/Activity/AnchorStatistic/AnchorData.aspx?linkSource="+strLinkSource+"&innerText="+escape(strInnerText)+"&href="+strHref, true);
		}
		else
			xmlHttp.open("post", "/Activity/AnchorStatistic/UTF8/AnchorData.aspx?linkSource="+strLinkSource+"&innerText="+escape(strInnerText)+"&href="+strHref, true);
			
		xmlHttp.send(null);
	}
	function sunet_addEvent(obj, evType, fn)  
	{  
	if (obj.addEventListener){  
	obj.addEventListener(evType, fn, false);  
	return true;  
	}else if (obj.attachEvent){  
	var r = obj.attachEvent("on"+evType, fn);  
	return r;  
	}else{  
	return false;  
	}  
	}  
sunet_addEvent(window,'load',Stat);
function isIE()
{
    if (navigator.appName=="Microsoft Internet Explorer")
    {
        return true;
    }
    else
    {
        return false;
    }
}

