var Lm={q:{},l:[],f:{},p:0,o:0,A:function(a,b,c,d){if(a.c)this.l.push(a);b=document;if(b.createElement){c="Lm_"+a.a;if(!b.getElementById(c)){try{eval(a.e)}catch(e){};
d=b.createElement('script');d.language='javascript';d.type='text/javascript';d.src=a.b;d.id=c;b.getElementsByTagName("head")[0].appendChild(d)}}},LOAD:function(a,b,c,d){
this.f[a]=0;c=this.l.length;for(b=this.p;b<c;b++){d=this.l[b];if(this.f[d.a]==0){this.f[d.a]=++this.p;try{eval(d.d)}catch(e){}}else return;}if(this.p==c&&this.o==0)this.o=1},
EV:function(a,b,c,d){if(a.addEventListener){a.addEventListener(b,c,false)}else if(a.attachEvent){a.attachEvent(((d==1)?"":"on")+b,c)}}}

Lm.config={
  src:"/includes/analytics/", //path to JS files, need trailing /
  lc:"20090624",
  ni_load:1,
  //ni_sample:100,
  ni_title:0,
  hbx_load:0
}

//if(Lm.config.ni_sample<100){
  //SAMPLING PLUGIN
  // Lm.sampleObj={v:parseInt(Lm.config.ni_sample),INIT:function(a,b){a=document.cookie;if(a.indexOf("trackSample=")>-1){if(a.indexOf("trackSample=1")>-1)Lm.config.ni_load&=1;else Lm.config.ni_load=0;return}
  // b=Math.random()*100;if(Math.floor(b)<=this.v){Lm.config.ni_load&=1;document.cookie="trackSample=1;"}else{Lm.config.ni_load=0;document.cookie="trackSample=0; path=/;"}}};Lm.sampleObj.INIT();
  //END  
//}

if(Lm.config.ni_load){
  Lm.A({a:"ntpagetag",b:Lm.config.src+"ntpagetag.js?v="+Lm.config.lc,c:1,e:"NTPT_NOINITIALTAG='true';"});
  Lm.A({a:"migration",b:Lm.config.src+"migration.js?v="+Lm.config.lc,c:1,d:"_HM.INIT(hbx)"});
}

if(Lm.config.hbx_load){
  Lm.A({a:"hbx",b:Lm.config.src+"hbx_original.js?v="+Lm.config.lc,c:1,d:"_PV()"});  
}

Lm.ONLOAD=function(p){
  
  if(Lm.config.hbx_load){
    _hbSetOld=_hbSet;
    _hbSendOld=_hbSend;    
  }else{
    _hbSetOld=function(){};
    _hbSendOld=function(){};
  }
  
  _hbPageView=function(a,b){_HM.SP(a,b);_HM.SN();_hbSetOld("n",a);_hbSetOld("vcon",b);_hbSendOld()}
  _hbLink=function(a,b){_HM.SC("tracklink","||||"+a+"||"+b+"||txt||");_hbSetOld("lid",a);_hbSetOld("lpos",b);_hbSendOld()}
  _hbExitLink=function(a,b,c){_HM.ST("m.el",a);_HM.SP(b,c);_HM.SN("exitlink");_hbSetOld("el",a);_hbSendOld()}
  _hbDownload=function(a,b,c){_HM.ST("m.fn",a);_HM.SP(b,c);_HM.SN("download");_hbSetOld("fn",a);_hbSendOld()}
  _hbCampaign=function(a,b,c){_HM.ST("m.campaign",a);_HM.SP(b,c);_HM.SN();_hbSetOld("cmp",a);_hbSendOld()}
  _hbGoalPage=function(a,b,c){_HM.ST("m.gp",a);_HM.SP(b,c);_HM.SN();_hbSetOld("gp",a);_hbSendOld()}
  _hbVisitorSeg=function(a,b,c){_HM.ST("m.seg",a);_HM.SP(b,c);_HM.SN();_hbSetOld("seg",a);_hbSendOld()}
  _hbFunnel=function(a,b,c){var d=a.split(",");_HM.ST("m.fnl_id",d[0].replace(/\(/,""));_HM.ST("m.fnl_lvl",d[1].replace(/\)/,""));_HM.SP(b,c);_HM.SN();_hbSetOld("fnl",a);_hbSendOld()}
  _hbSet=function(a,b){_HM.ST("m."+a,b);_hbSetOld(a,b)}
  _hbSend=function(){_HM.SP();_HM.SN();_hbSendOld()}
}

Lm.EV(window,"load",Lm.ONLOAD);
