function ys_GetCookieVal_link(offset) 
		//获得Cookie解码后的值 
		{ 
			var endstr = document.cookie.indexOf (";", offset); 
			if (endstr == -1) 
			endstr = document.cookie.length; 
			return unescape(document.cookie.substring(offset, endstr)); 
		} 
		function ys_SetCookie_link(name, value,exp,p) 
		//设定Cookie值 
		{ 
			var expdate = new Date(); 
			var argv = ys_SetCookie_link.arguments; 
			var argc = ys_SetCookie_link.arguments.length; 
			var expires = (argc > 2) ? argv[2] : null; 
			var path = (argc > 3) ? argv[3] : null; 
			var domain = (argc > 4) ? argv[4] : null; 
			var secure = (argc > 5) ? argv[5] : false; 
			if(expires!=null) expdate.setTime(expdate.getTime() + ( expires * 1000 )); 
			document.cookie = name + "=" + escape (value) +((expires == null) ? "" : ("; expires="+ expdate.toGMTString())) 
			+((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "" : ("; domain=" + domain)) 
			+((secure == true) ? "; secure" : ""); 
		} 
		function ys_DelCookie_link(name) 
		//删除Cookie 
		{ 
			var exp = new Date(); 
			exp.setTime (exp.getTime() - 1); 
			var cval = ys_GetCookie_link (name); 
			document.cookie = name + "=" + cval + "; expires="+ exp.toGMTString(); 
		} 
		function ys_GetCookie_link(name) 
		//获得Cookie的原始值 
		{ 
			var arg = name + "="; 
			var alen = arg.length; 
			var clen = document.cookie.length; 
			var i = 0; 
			while (i < clen) 
			{ 
			var j = i + alen; 
			if (document.cookie.substring(i, j) == arg) 
			return ys_GetCookieVal_link (j); 
			i = document.cookie.indexOf(" ", i) + 1; 
			if (i == 0) break; 
			} 
			return -1; 
		} 
		function statistics_link(subSysName,statisticType,companyId,businessId,path){
		//定义上次访问最后有效时间
		var ys_esTime = ys_GetCookie_link("ys_esTime");
		var ys_eTime=parseInt(new Date().getTime+360000);
		var ys_now = parseInt(new Date().getTime);
		var ys_cid =  ys_GetCookie_link("ys_cid");
		//cookie不在有效期内
		var ys_c_isnewCus = "0";
		if(ys_esTime==-1||ys_esTime > ys_eTime)
		{
				//重新生成cookie编号，标示客户端
				ys_cid = new Date().getTime();
				ys_c_isnewCus = 1;
		}
		
		var ys_c_subSysName=escape(subSysName);
		var ys_c_companyId = escape(companyId);
		var ys_c_statisticType = escape(statisticType);
		var ys_c_businessId = escape(businessId);
		var ys_c_pageReferer = escape(document.referrer.substr(0,512));
		var ys_c_resolution = window.screen.width+"x"+window.screen.height;
		
		var ys_data = "?subSysName="+ys_c_subSysName;
		if(ys_c_companyId.length>0)
		{
			
			ys_data=ys_data+"&companyId="+ys_c_companyId;
		}
		if(ys_c_statisticType.length>0)
		{
			
			ys_data=ys_data+"&statisticType="+ys_c_statisticType;
		}
		if(ys_c_businessId.length>0)
		{
			
			ys_data=ys_data+"&businessId="+ys_c_businessId;
		}
		if( document.referrer.split('/')[2]!=document.domain ){
			ys_data=ys_data+"&pageReferrer="+ys_c_pageReferer;
		}
		
		ys_data=ys_data+"&resolution="+ys_c_resolution;
		ys_data=ys_data+"&cookieId="+ys_cid;
		ys_data=ys_data+"&newflg="+ys_c_isnewCus;
		
		//在cookie中定义上次访问结束时间
		ys_SetCookie_link("ys_esTime",ys_eTime,3600,"/");
		ys_SetCookie_link("ys_cid",ys_cid,3600,"/");
		
		var ys_escriptElemeny=document.createElement('script');
		ys_escriptElemeny.setAttribute('src',path+'statistics/accsessStatistic.action'+ys_data);
		document.getElementsByTagName("head")[0].appendChild(ys_escriptElemeny);
	}
