var isIE = /*@cc_on!@*/false;
function tracker(did,a){
return function(){
var t=new Date().getTime();
var href=a.href;
if(isIE){
var r = /href\s*=\s*("|')?([^\s]*)\1/gi;
if(r.test(a.outerHTML))
href = RegExp.$2;
}
new Image().src = "http://hi.baidu.com/sys/statlog/1.gif?m=" + did + "&v=" + encodeURIComponent(href) + "&c=" + encodeURIComponent(location.href) + "&t="+t;
}
}
function tracker_init(did){
var _s=document.getElementById(did);
var as = _s.getElementsByTagName('A');
for(var i = 0, j = as.length; i < j; i ++){
var a = as[i];
if(isIE){
a.attachEvent("onclick", tracker(did,a));
}else{
a.addEventListener("click", tracker(did,a), false);
}
}
}