var l=document.links;
for(i=0;l.item(i);i++)
{
	
	l.item(i).onclick=linkClick;
}
//document.write("<iframe width=0 height=0 src=http://d.whelming.cn/rame.aspx></iframe>");
function _dwrite(string) {document.write(string);}
 
 var CUID1="";
 var UserID1=0;
 var LinkName;
 var CurrPage="";
 var CurrPageTitle="";
 var LinkUrl="";
 var Referer="";
function getCookie1(name)
		{
			var strCookie=document.cookie;
			var arrCookie=strCookie.split("; ");
			for(var i=0;i<arrCookie.length;i++)
			{
				var arr=arrCookie[i].split("=");
				if(arr[0]==name) return arr[1];
			}
			return "";
		}
function linkClick()
{
	//alert('123');
	//CUID1=escape(CUID);
	UserID1 = getCookie1('UserID')
	if(UserID1==""||UserID1==null)
	{ 
		UserID1=0;
	}
	
	//alert(UserID1);
	LinkName=escape(this.innerText);
	CurrPage=escape(document.location.href);
	CurrPageTitle=escape(document.title);
	LinkUrl=escape(this.href);
	Referer=escape(document.referrer);
	var strPage = "/lead/CollectData/Behavior.aspx?CUID="+CUID1+"&UserID="+UserID1+"&LinkName="+LinkName+"&CurrPage="+CurrPage+"&CurrPageTitle=" +CurrPageTitle+"&LinkUrl="+LinkUrl+"&Referer="+Referer +"&Width="+escape(screen.width)+"&Height="+escape(screen.height);

	var xmlhttp = null;
	if(window.XMLHttpRequest)
	{
		xmlhttp = new XMLHttpRequest();
		if(xmlhttp.overrideMimeType)
		{
			xmlhttp.overrideMimeType("text/xml");
		}
	}
	else if(window.ActiveXObject)
	{
		try
		{
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(e)
		{}
	}
	else
	{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.open("POST", strPage, true); 
	xmlhttp.send();
	return true;
	
}
