/*
**调用 EY.util.trackStatistics({
								srcType:1, 当为1时为静态页面，会从url上获取src。当为0或不定义时为动态页面，此时从src上获取
								src:"",
								opts :{}
							})
**
**
*/
(function(){
	EY.util.trackStatistics = function(config){
		var url = window.location, search = url.search, src, data;
		if(!config) return;
		var srcType = config.srcType;
		if(srcType){ //静态页面，通过url获取
			if(search){
				var srcArray = search.substring(1).split("&");
				src = "";
				$.each(srcArray, function(i,n){
					var hash = n.split("=");
					if($.trim(hash[0]) == "src"){
						src = hash[1];
						return false;
					}
				});
			}else{
				src = "";
			}
		}else{
			src = config.src || "";
		}
		data = $.extend({src:src,url:(url.host + url.pathname), time: (new Date).getTime()}, config.opts || {});
		var ul = "http://trace.yoee.com/index.html?" + decodeURIComponent($.param(data));
		//var ul = "/MyJsp.jsp?" + decodeURIComponent($.param(data));
		var tempimg = $('<img width="0" height="0" border="0" \/>');
		     tempimg.attr("src",ul); //设置地址
		$(document.body).append(tempimg);
		//var tempimg = new Image();
		//tempimg.src = ul;
	}
})()