	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;
	}
	function  emreturn()
	{
		//判断是否有emfrom
		emfrom=readCookie("emfrom");
		if(emfrom!="")
		{
			//返回交易号到em的接受接口 cpa_end_do.php ，tid就是 tradeid 的 简写 即交易号
			//不明白下面这句话  将它注释
			//document.write('<img src=http://www.66vv.com/cpa_end_do.php?tid='+emfrom+' width=0 height=0>');
			windows.location.href='http://www.66vv.com/cpa_end_do.php?tid='+emfrom;//新加的 替换上面注释的那句
		}
	}
	 emreturn();