var _aa=null;var _ba=null;var _ca=null;var _da=null;var _ea=null;function TrackConsole(){this.pollInterval=100;this.useAjax=false;this.doReport=window.location.href.indexOf("ttDoReport=false")==-1;this._fa='n/a';this._ga='www';this._ha=64;this._ia=128;this._ja=+32;this._ka=this._ha;this.data='';this.timeElapsed=function(){return((new Date().getTime())-_ca.tInit)/100;};this.identify=function(na){if(na.length!=4){window.alert('TrackConsole: invalid identification code: '+na);return;}
if(!this.doReport){return;}
_aa.createCookie("test","toast",1);if(_aa.readCookie("test")!="toast")return;_aa.eraseCookie("test");_ba=new TaskScheduler();_ca=new PageTracker(na);var oa=document.createElement('img');oa.onload=function(){trackConsole.startRecording();};oa.onerror=function(){trackConsole.stopRecording();};var pa='';pa+='http://'+this._ga+'.tracetracking.net:8080/filter.php?';pa+='u='+_ca.usercode+'&';pa+='v='+_ca.visitorcode+'&';pa+='l='+_aa.s2h(window.location.href);oa.src=pa;}
this.startRecording=function(){this._fa='http://'+this._ga+'.tracetracking.net:8080/processor.php';_ca.initializeIO();_da=new MouseTracker();_ea=new ScrollTracker();this.registerOnLoadHook();};this.stopRecording=function(){this.doReport=false;};this.useOriginFinder=function(){this.setOriginImageSrc('auto');};this.setOriginElementId=function(qa){_ca.originElementId=qa;};this.setOriginImage=function(ra){_ca.originImageSrc=ra;}
this.setOriginImageSrc=function(sa){_ca.originImageSrc=sa;};this.addFlag=function(ta){this.logMessage(ta);};this.addTag=function(ua,va){this.logStatus(ua,va);};this.origin_x=0;this.origin_y=0;this.recalculateDimensions=function(){_ca.recalculateDimensions();}
this.logMessage=function(wa){var xa=this.i24_h(_da.xLast)+this.i24_h(_da.yLast)+this.i24_h(this.timeElapsed());this.appendData("M"+xa+this.encodeText(wa));};this.logStatus=function(ya,za){var Aa=this.i24_h(_da.xLast)+this.i24_h(_da.yLast)+this.i24_h(this.timeElapsed());this.appendData("S"+Aa+this.encodeText(ya)+this.encodeText(za));};this.appendData=function(Ba){this.data+=Ba;if(this.data.length>this._ka){this._ka+=this._ja;this._ka=Math.min(this._ka,this._ia);this.flushData(true);}};this.flushData=function(Ca){var Da=this.data;this.data='';var Ea='type=logs&';Ea+='u='+_ca.usercode+'&';Ea+='v='+_ca.visitorcode+'&';Ea+='s='+_ca.visitcode+'&';Ea+='h='+_ca.hitcode+'&';Ea+='data='+Da;this.post(Ea,Ca);};this.encodeText=function(Fa){Fa=''+Fa+'';return "["+Fa.length+":"+this.s2h(Fa)+"]";};this.isOutOfViewport=function(x,y){if(document.body==null)return false;if(typeof document.body.clientWidth=='undefined')return false;if(x<0||x>=document.body.clientWidth)return true;if(typeof document.body.clientHeight=='undefined')return false;if(y<0||y>=document.body.clientHeight)return true;return false;};this.generateCode=function(Ga){var Ha="ABCDEFGHIJKLMNOPRQSTUVWXYZ";var Ia="";var Ja=Ha.length-1;while(Ia.length<Ga)Ia+=Ha.charAt(this.rand(Ha.length));return Ia;};this.rand=function(Ka){var La=0;for(var i=0;i<64&&(i<8||Math.random()<0.8);i++){for(var k=0;k<64;k++){La+=new Date().getTime();La+=Math.floor(Math.random()*Ka);}}
return((La%Ka)+Ka)%Ka;};this.postedImages=new Array();this.post=function(Ma,Na,Oa){if(!this.doReport){return;}
if(this.useAjax){this.ajax(this._fa+'?'+Ma,Na,Oa);}
else{var Pa=document.createElement('img');Pa.done=false;Pa.onload=function(){this.done=true;if(Oa)Oa();};Pa.onerror=function(){this.done=true;if(Oa)Oa();_aa.onSendError('post_img error');};Pa.src=this._fa+'?no_cache='+(new Date().getTime())+'&'+Ma;this.postedImages.push(Pa);}};this.ajax=function(Qa,Ra,Sa){Qa+=((Qa.indexOf('?')==-1)?'?':'&')+('no_cache='+(new Date().getTime()));try{var a=(typeof XMLHttpRequest!='undefined')?(new XMLHttpRequest()):(new ActiveXObject("Msxml2.XMLHTTP"));a.open("GET",Qa,Ra);a.onreadystatechange=function(){if(a.readyState!=4)return;if(a.responseText.length!=85)_aa.onSendError(Qa+"\n"+a.responseText);else if(Sa)Sa();};a.send(null);}
catch(e){this.onSendError('ajax exception: '+e);}};this.onSendError=function(Ta){if(this.ttDoDebug)window.alert('_ttroot.onSendError['+Ta+']');};this.lookup="0123456789ABCDEF";this.i24_h=function(i){if(i<0)i=0;else if(i>4095)i=4095;var h='';for(var j=0;j<12;j+=4)h=this.lookup.charAt((i&(0x0F<<j))>>j)+h;return h;};this.fixUTF8=false;this.s2h=function(Ua){if(typeof Ua!='string')Ua=''+Ua+'';if(this.fixUTF8)Ua=unescape(encodeURIComponent(Ua));var Va="";for(var i=0;i<Ua.length;i++){var Wa=Ua.charCodeAt(i);Va+=this.lookup.charAt((Wa>>4)&15);Va+=this.lookup.charAt((Wa>>0)&15);}
return Va;}
this.createCookie=function(Xa,Ya,Za){var $a="";if(Za){var ab=new Date();ab.setTime(ab.getTime()+(Za*86400000));$a="; expires="+ab.toGMTString();}
document.cookie=Xa+"="+Ya+$a+"; path=/";};this.readCookie=function(bb){var ba=bb+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(ba)==0)return c.substring(ba.length,c.length);}
return null;};this.eraseCookie=function(cb){this.createCookie(cb,"",-1);}
this.findBounds=function(db){var eb=new Array();eb[0]=0;eb[1]=0;eb[2]=db.offsetWidth;eb[3]=db.offsetHeight;while(db!=null){eb[0]+=db.offsetLeft;eb[1]+=db.offsetTop;db=db.offsetParent;}
return eb;};this.isPointInRect=function(x,y,fb){if(x<fb[0])return false;if(y<fb[1])return false;if(x>fb[0]+fb[2])return false;if(y>fb[1]+fb[3])return false;return true;};this.getStyle=function(gb,hb){if(gb.currentStyle)return gb.currentStyle[hb];if(window.getComputedStyle)return document.defaultView.getComputedStyle(gb,null).getPropertyValue(hb);return null;};this.registerOnLoadHook=function(){var ib=function(){_ca.onPageLoad();};var jb=function(){_ca.onPageUnload();};if(typeof window.addEventListener!='undefined')window.addEventListener('load',ib,false);else if(typeof document.addEventListener!='undefined')document.addEventListener('load',ib,false);else if(typeof window.attachEvent!='undefined')window.attachEvent('onload',ib);if(typeof window.addEventListener!='undefined')window.addEventListener('unload',jb,false);else if(typeof document.addEventListener!='undefined')document.addEventListener('unload',jb,false);else if(typeof window.attachEvent!='undefined')window.attachEvent('unonload',jb);if(typeof window.onbeforeunload!='undefined')window.onbeforeunload=function(){jb();};};this.registerEventHandler=function(kb,lb){this.attachToTarget(document,kb,lb);};this.attachToTarget=function(mb,nb,ob){if(typeof mb.addEventListener!='undefined'){mb.addEventListener(nb,ob,false);}
else if(typeof mb.attachEvent!='undefined'){mb.attachEvent('on'+nb,function(pb){if(typeof pb=='undefined')pb=window.event;ob(pb);});}
else{window.alert('unattachable: target.'+nb);}};}
function Task(qb,rb,sb){this.func=qb;this.executeTime=new Date().getTime()+rb;this.interval=sb;this.cancelled=false;}
function TaskScheduler(){this.tasks=new Array();this.enqueue=function(tb){this.tasks.push(tb);};this.launch=function(ub){var vb=this;var wb=function(){vb.tick();};setInterval(wb,ub);};this.tick=function(){var xb=new Date().getTime();var yb=new Array();for(var i=0;i<this.tasks.length;i++){var zb=this.tasks[i];if(zb.cancelled)continue;if(zb.executeTime<=xb){zb.func();if(zb.interval<=0)continue;while(zb.executeTime<=xb)zb.executeTime+=zb.interval;yb.push(zb);}
else{yb.push(zb);}}
this.tasks=yb;};this.launch(_aa.pollInterval);}
function PageTracker(Ab){this.page_status='pending';this.tInit=new Date().getTime();this.visitorcode=null;this.visitcode=null;this.hitcode=null;this.usercode=Ab;this.isNewVisit=false;this.originElementId=null;this.register=function(){this.hitcode=_aa.generateCode(12);this.visitorcode=_aa.readCookie("visitorcode");if(this.visitorcode==null){this.visitorcode=_aa.generateCode(12);_aa.createCookie("visitorcode",this.visitorcode,31);}
this.visitcode=_aa.readCookie("visitcode");this.isNewVisit=(this.visitcode==null);if(this.isNewVisit){this.visitcode=_aa.generateCode(12);_aa.createCookie("visitcode",this.visitcode);}};this.initializeIO=function(){if(this.isNewVisit)this.sendVisitAndInit();else this.sendInit();this.waitForBody();}
this.sendVisitAndInit=function(){var d='type=visit&';d+='u='+this.usercode+'&';d+='v='+this.visitorcode+'&';d+='s='+this.visitcode+'&';d+='sw='+_aa.i24_h(screen.width)+'&';d+='sh='+_aa.i24_h(screen.height);_aa.post(d,true,function(){_ca.sendInit();});};this.sendInit=function(){var d='type=hit&';d+='u='+this.usercode+'&';d+='v='+this.visitorcode+'&';d+='s='+this.visitcode+'&';d+='h='+this.hitcode+'&';d+='l='+_aa.s2h(window.location.href)+'&';d+='r='+_aa.s2h(document.referrer);_aa.post(d,true);};this.waitForBody=function(){if(document.body!=null){this.onInit();return;}
setTimeout(function(){_ca.waitForBody();},_aa.pollInterval);};this.onInit=function(){this.page_status='inited';var d='type=init&';d+='u='+this.usercode+'&';d+='v='+this.visitorcode+'&';d+='s='+this.visitcode+'&';d+='h='+this.hitcode+'&';d+='t='+_aa.i24_h(_aa.timeElapsed());_aa.post(d,true);};this.view_w=null;this.view_h=null;this.page_w=null;this.page_h=null;this.recalculateDimensions=function(){var e=document.documentElement;var vw=e.clientWidth;var vh=e.clientHeight;var pw=e.scrollWidth;var ph=e.scrollHeight;e=document.body;if(vw==0)vw=e.clientWidth;if(vh==0)vh=e.clientHeight;pw=Math.max(pw,e.scrollWidth);ph=Math.max(ph,e.scrollHeight);var ox=0;var oy=0;var Bb=null;if(this.originElementId!=null){Bb=document.getElementById(this.originElementId);}
else if(this.originImageSrc!=null){var Cb=this.originImageSrc.length;var Db=document.getElementsByTagName('img');for(var Eb in Db){var Fb=Db[Eb];var Gb=Fb.src;if((typeof Gb=='undefined')||(Gb<Cb))continue;var Hb=Gb.substring(Gb.length-Cb,Gb.length);if(Hb==this.originImageSrc){Bb=Fb;}}
if(Bb==null){var Ib=document.getElementsByTagName('img');if(Ib.length>0)Bb=Ib[0];}
if(Bb==null){var Ib=document.getElementsByTagName('h1');if(Ib.length>0)Bb=Ib[0];}
if(Bb==null){var Ib=document.getElementsByTagName('p');if(Ib.length>0)Bb=Ib[0];}}
if(Bb!=null){var Jb=_aa.findBounds(Bb);ox=Jb[0];oy=Jb[1];}
traceTracking.origin_x=ox;traceTracking.origin_y=oy;this.view_w=vw;this.view_h=vh;this.page_w=pw;this.page_h=ph;};this.onPageLoad=function(){this.page_status='loaded';this.recalculateDimensions();var d='type=load&';d+='u='+this.usercode+'&';d+='v='+this.visitorcode+'&';d+='s='+this.visitcode+'&';d+='h='+this.hitcode+'&';d+='ox='+_aa.i24_h(traceTracking.origin_x)+'&';d+='oy='+_aa.i24_h(traceTracking.origin_y)+'&';d+='vw='+_aa.i24_h(this.view_w)+'&';d+='vh='+_aa.i24_h(this.view_h)+'&';d+='pw='+_aa.i24_h(this.page_w)+'&';d+='ph='+_aa.i24_h(this.page_h)+'&';d+='t='+_aa.i24_h(_aa.timeElapsed());_aa.post(d,true);if(false){var Kb=document.getElementsByTagName("a");for(var i=0;i<Kb.length;i++)new ElemHoverTracker(Kb[i]);}};this.onPageUnload=function(){_aa.appendData('X'+_aa.i24_h(_aa.timeElapsed()));_aa.flushData(false);};this.register();}
function MouseTracker(){this.mouseMoveThreshold=5;this.mouseTimeThreshold=50;this.xLast=-1000;this.yLast=-1000;this.tLast=-1000;this.xCurr=-1000;this.yCurr=-1000;this.xClick=-1000;this.yClick=-1000;this.buttons=new Array();this.onMouseEvent=function(Lb){return(Lb==undefined)?event:Lb;};this.onMouseEventButton=function(Mb,Nb,Ob){if(navigator.userAgent.indexOf("MSIE")==-1)Nb+=1;this.buttons[Nb]=Ob;this.xClick=Mb.clientX+_ea.x;this.yClick=Mb.clientY+_ea.y;var Pb=(Ob?'_':'-')+Nb;Pb+=_aa.i24_h(this.xClick);Pb+=_aa.i24_h(this.yClick);Pb+=_aa.i24_h(_aa.timeElapsed());_aa.appendData(Pb);_aa.flushData(false);};this.onMouseEventCoords=function(Qb){var Rb=Qb.clientX;var Sb=Qb.clientY;if(_aa.isOutOfViewport(Rb,Sb)){if(this.buttons[1])this.onMouseEventButton(Qb,1,false);if(this.buttons[2])this.onMouseEventButton(Qb,2,false);}
this.xCurr=Rb+_ea.x;this.yCurr=Sb+_ea.y;var t=new Date().getTime();var dx=this.xCurr-this.xLast;var dy=this.yCurr-this.yLast;var dt=t-this.tLast;var dd=Math.max(Math.abs(dx),Math.abs(dy));if(dd<this.mouseMoveThreshold||dt<this.mouseTimeThreshold)return;var Tb='^';Tb+=_aa.i24_h(this.xCurr);Tb+=_aa.i24_h(this.yCurr);Tb+=_aa.i24_h(_aa.timeElapsed());_aa.appendData(Tb);this.xLast=this.xCurr;this.yLast=this.yCurr;this.tLast=t;};this.impl_onmousemove=function(Ub){Ub=_da.onMouseEvent(Ub);_da.onMouseEventCoords(Ub);};this.impl_onmousedown=function(Vb){Vb=_da.onMouseEvent(Vb);_da.onMouseEventButton(Vb,Vb.button,true);_da.onMouseEventCoords(Vb);};this.impl_onmouseup=function(Wb){Wb=_da.onMouseEvent(Wb);_da.onMouseEventButton(Wb,Wb.button,false);_da.onMouseEventCoords(Wb);};this.register=function(){_aa.registerEventHandler('mousemove',this.impl_onmousemove);_aa.registerEventHandler('mousedown',this.impl_onmousedown);_aa.registerEventHandler('mouseup',this.impl_onmouseup);};this.register();this.onElementEnterOrLeave=function(Xb,Yb){var Zb=(Xb.tagName=='A');var $b=(Zb?'~':'@')+Yb;$b+=_aa.encodeText(Zb?Xb.href:Xb.id);$b+=_aa.i24_h(_aa.timeElapsed());_aa.appendData($b);}}
function ScrollTracker(){this.x=0;this.y=0;this.task=null;this.register=function(){var ac=this;this.task=new Task(function(){ac.tick();},0,250);_ba.enqueue(this.task);};this.tick=function(){if(document.body==null)return;var x=0;x=Math.max(x,(typeof window.pageXOffset=='undefined')?0:window.pageXOffset);x=Math.max(x,(document.documentElement==null||typeof document.documentElement.scrollLeft=='undefined')?0:document.documentElement.scrollLeft);x=Math.max(x,(document.body==null||typeof document.body.scrollLeft=='undefined')?0:document.body.scrollLeft);var y=0;y=Math.max(y,(typeof window.pageYOffset=='undefined')?0:window.pageYOffset);y=Math.max(y,(document.documentElement==null)?0:document.documentElement.scrollTop);y=Math.max(y,(document.body==null)?0:document.body.scrollTop);if(this.x==x&&this.y==y)return;this.x=x;this.y=y;var bc='|';bc+=_aa.i24_h(this.x);bc+=_aa.i24_h(this.y);bc+=_aa.i24_h(_aa.timeElapsed());_aa.appendData(bc);};this.register();}
function ElemHoverTracker(cc,dc){if(typeof dc=='undefined')dc=false;if(typeof cc=='string'){this.id=cc;this.elem=null;}
else if((typeof cc=='object')&&cc.parentNode){this.id=cc.id;this.elem=cc;}
else{window.alert("ElemHoverTracker::notFound = "+cc);return;}
this.hovering=false;this.task=null;this.registerLightTrack=function(){var ec=this.elem;var fc=function(gc){_da.onElementEnterOrLeave(ec,'1');};var hc=function(ic){_da.onElementEnterOrLeave(ec,'0');};_aa.attachToTarget(this.elem,'mouseover',fc);_aa.attachToTarget(this.elem,'mouseout',hc);};this.registerHeavyTrack=function(){var jc=this;this.task=new Task(function(){jc.tick();},0,_aa.pollInterval);_ba.enqueue(this.task);};this.tick=function(){if(this.elem==null){this.elem=document.getElementById(this.id);if(this.elem==null)return;}
if(this.elem.parentNode==null){return;}
var kc=_aa.findBounds(this.elem);var x=_da.xLast;var y=_da.yLast;var lc=_aa.isPointInRect(x,y,kc);var mc=this.elem;while(lc&&mc!=null){if(_aa.getStyle(mc,'display')=='none')lc=false;else if(_aa.getStyle(mc,'visibility')=='hidden')lc=false;else mc=mc.parentNode;}
if(lc==this.hovering)return;this.hovering=lc;var nc=(this.elem.tagName=='A');var oc='';oc+=nc?'~':'@';oc+=(this.hovering?'1':'0');oc+=_aa.encodeText(nc?this.elem.href:this.elem.id);oc+=_aa.i24_h(_aa.timeElapsed());_aa.appendData(oc);};if(dc==true)this.registerHeavyTrack();else this.registerLightTrack();}
_aa=new TrackConsole();var traceTracking=_aa;var trackConsole=_aa;
