/*publish time:2011-08-22 18:28:39*/
(function(O){if(O._tb_tracer){return }var M=document,AF="http://110.75.1.110/monitor.htm",F=(new Date()).getTime(),W=5000,S=null,AC=O.g_hb_monitor_st,J=F,AE=0,Y=location.href,Z=M.referrer,I=Y.indexOf("tb-tracer-ignore=true")!=-1,AD=0,U=1024,AG="tps/i4/T1pkSfXexkXXXXXXXX-1-1.gif",AB=0,V={},G=[],T=Math.random(),K=F+"."+T,AH=!!M.attachEvent,AI="attachEvent",AA="addEventListener",L=false,X=function(A){return typeof A=="number"},Q=function(d,D){var h,g,c,f,b,A,B,e,E=0,C=0,a={};a.tpath=H(d);while(d){e=d.tagName;if(e&&e!="HTML"){E=1}if(e=="A"||e=="AREA"){h=d.getAttribute("href",2)||"";C=1;A=e}else{if(e=="IMG"||e=="BUTTON"||e=="INPUT"||e=="SELECT"){C=1}}if(C){b=b||d;A=A||e;B=B||d.id||"-"}if((d.id&&(g=V[d.id]))||!(c=d.parentNode)){break}d=c}if(!E||(!g&&AB>0)){return }if(h){a.href=h}if(A){a.et=A}if(B&&B!="-"){a.elid=B}a.pos=N(b,D).join(",");AE++;a.cc=AE;f=(new Date()).getTime();a.t=f-F;a.t2=f-J;J=f;P.send(a)},N=function(f,a){var D=M.compatMode=="BackCompat"?M.body:M.documentElement,d=Math.max(D.scrollWidth,D.clientWidth),C=D.scrollTop,c=D.scrollLeft;var A=a.pageX,B=a.pageY;if(!X(A)){A=a.clientX+c;B=a.clientY+C}var E=-1,b,g;if(f){if(f.getBoundingClientRect){g=f.getBoundingClientRect();E=g.left+c;b=g.top+C}else{}}if(P.layout==0){var e=d>>1;A-=e;E-=e}return X(b)?[A,B,E,b,f.offsetWidth,f.offsetHeight]:[A,B]},R=function(A){var C=[],B;for(B in A){C.push(B+"="+encodeURIComponent(A[B]))}return C.join("&")},AJ=function(A){var E=A.split("&"),D=0,a=E.length,C,B={};for(;D<a;D++){C=E[D].split("=");B[C[0]]=decodeURIComponent(C[1]||"")}return B},H=function(B){var D=[],C,A,E;while(B){A=B.tagName;if(B.id){D.unshift(A+"#"+B.id);break}if(A=="BODY"||A=="HTML"){break}E=0;C=B;while(C=C.previousSibling){if(C.tagName==A){E++}}D.unshift(A+(E?"["+E+"]":""));B=B.parentNode}return D.join(" ")};var P={init0:function(){if(I){return }var A=AH?AI:AA;M[A]((AH?"on":"")+"mousedown",function(B){B=B||O.event;var C=B.target||B.srcElement;if(C){Q(C,B)}},L);if(AC){O[A]((AH?"on":"")+"load",function(B){var C={type:2,loadtime:(new Date()).getTime()-AC};P.send(C)},L)}P.checkTrigger()},init:function(C,a,A){AD=1;P.tid=C;P.eid=(a||0).toString();P.cfg=X(A)?{layout:A}:(A||{});P.layout=P.cfg.layout||0;var E=parseFloat(P.cfg.sample_rate),B=M.cookie.match(new RegExp("\\b"+(P.cfg.cookie_id||"t")+"=([^;]+)")),D={type:"pv",sw:O.screen.width,sh:O.screen.height};if(Z){D.referrer=Z}if(!isNaN(E)&&T>E){AD=2;return }P.cid=B?B[1]:"";P.send(D)},watch:function(A){for(var B=0,C=A.length;B<C;B++){V[A[B]]=1}AB+=C},send:function(C){if(AD==2){return }var A=Math.random(),B="rnd_id_"+A,D;C.f="tb-tracer";C.pvid=K;C.tid=P.tid;C.eid=P.eid;C.r=A;C.url=Y;if(P.layout){C.layout=P.layout}if(P.cid){C.cid=P.cid}if(AD==0){G.push(C)}else{if(AD==1){D=new Image();O[B]=D;D.onload=D.onerror=function(){O[B]=S;if(G[0]){P.send(G.shift())}};D.src=AF+"?"+R(C);D=S;setTimeout(function(){O[B]&&(O[B].src="")},W)}}},checkTrigger:function(){if(AD!=0||U<=0){return }U--;var E=document.images,A=0,D=E.length,B,C;for(;A<D;A++){if((B=E[A].src)&&B.indexOf(AG)!=-1&&(B=B.split("?")[1])&&(C=B.match(/.*?\btracer=([\w\-\/]+)&?/))&&P.trigger(C[1].split("/"),AJ(B))){return }}setTimeout(P.checkTrigger,200)},trigger:function(A,B){P.init(A[0],A[1],B);B.hasOwnProperty("watch")&&P.watch(B.watch.split(","));return 1}};P.init0();O._tb_tracer={version:"0.1.1",init:function(B,C,A){if(!B||I){return }P.init(B,X(C)?C:0,A||(typeof C=="object"?C:S));return this},watch:function(A){P.watch([].slice.call(arguments,0));return this}}})(window);