 
if(isAuth == "1" && UserID1 == "0")
{
}
else if(document.referrer.indexOf('AuthLogin1.aspx') > 0)
{
}
else
{
	_write();		
}



var CUID;
var Cookid;
var showUserID;
function _write()
{       

  if (window.XMLHttpRequest)
   {
		req = new XMLHttpRequest();
		req.onreadystatechange = processAjaxResponse;
		req.open("GET", "/lead/Rand.asp?str=1", true);
		req.send();
   } 

  else if (window.ActiveXObject) 
  {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    if (req) 
    {
      req.onreadystatechange = processAjaxResponse;
      req.open("post", "/lead/Rand.asp?str=1", true);
      req.send();
    }
  }
  
}

function processAjaxResponse()
 {
  if (req.readyState == 4)
   {
    if (req.status == 200) 
    { 
	
		show(req.responseText);		
    } 
    else
     {     
    }

  }
}

function getCookie(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 show(s)
{
		
	    var st = new Array();
		st=s.split(',');			
		CUID=st[0];
		Visit=st[1];
		//showUserID=st[2];
		try
		{
			showUserID = getCookie('UserID');
		}
		catch(err)
		{
			showUserID = 0;
		}

		//链接采集
	var l=document.links;
	for(i=0;l.item(i);i++)
	{
		
		l.item(i).onclick=linkClick;
		
	}	
	//访问量采集
	var url_fangwen = "/lead/CollectData/AccessAmount.aspx?Visit="+Visit+"&CUID="+escape(CUID)+"&CurrPage="+escape(document.location.href)+"&Referer="+escape(document.referrer) +"&Width="+escape(screen.width)+"&Height="+escape(screen.height);

	_write1(url_fangwen);
	//搜寻页面采集
		if(document.referrer == "" || document.referrer.indexOf("jichuangwang.com") < 0)
		{
			if(showUserID == "" || showUserID == null)
				showUserID = 0;
		var souUrl = "/lead/CollectData/BehaviorMainPage.aspx?UserID="+showUserID+"&CUID="+escape(CUID)+"&CurrPage="+escape(document.location.href)+"&Referer="+escape(document.referrer) +"&Width="+escape(screen.width)+"&Height="+escape(screen.height);
		_write1(souUrl);
		}
}


///////////行为信息采集 
function linkClick()
{

	var strPage = "/lead/CollectData/Behavior.aspx?CUID="+CUID+"&UserID="+showUserID+"&LinkName="+escape(this.innerText)+"&CurrPage="+escape(document.location.href)+"&CurrPageTitle=" +escape(document.title)+"&LinkUrl="+escape(this.href)+"&Referer="+escape(document.referrer) +"&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;
	
}


////////访问量采集


function _write1(url)
{ 
      
	 
  if (window.XMLHttpRequest)
   {
		req = new XMLHttpRequest();
		req.onreadystatechange = processAjaxResponse1;
		req.open("GET", url, true);
		req.send();
   } 

  else if (window.ActiveXObject) 
  {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    if (req) 
    {
	
      req.onreadystatechange = processAjaxResponse1;
      req.open("post", url, true);
      req.send();
    }
  }
}

function processAjaxResponse1()
 {
  if (req.readyState == 4)
   {
    if (req.status == 200) 
    {    
    } 
    else
     {     
    }

  }

}
/////////搜寻页面访问量

	 

