Atlas={Go:function(c,d,b,f,e){$(Atlas.m_image).load(Atlas.ImgLoadOrError);$(Atlas.m_image).error(Atlas.ImgLoadOrError);var a=document.referrer;this.m_dataMap.single.project=d;this.m_dataMap.pair.country.value=c;this.m_dataMap.pair.location.value=b;this.m_dataMap.pair.url.value=this.CleanString(a);this.m_dataMap.pair.domain.value=this.GetDomain(a);this.m_dataMap.pair.keywords.value=this.GetSearchKeywords(a);this.m_dataMap.pair.search.value=this.GetSearchResult(a);this.m_dataMap.pair.source.value=this.GetQuerystringValue("source");if(f)this.View();if(e)this.BindUnloadEvent();document.attachEvent("onclick",Atlas.Click)},ImgLoadOrError:function(){Atlas.m_tLoading=false;if(Atlas.m_queue.length!=0)Atlas.LoadImage(Atlas.m_queue.pop())},Queue:function(a){if(Atlas.m_tLoading)Atlas.m_queue.push(a);else Atlas.LoadImage(a)},SetCountry:function(a){this.m_dataMap.pair.country.value=a},SetLocation:function(a){this.m_dataMap.pair.location.value=a},SetLanguage:function(a){this.m_dataMap.pair.language.value=a},SetTimePivot:function(a){this.m_timePivot=a},GetSearchKeywords:function(b){for(var a in this.m_searchProviders)if(b.indexOf(this.m_searchProviders[a].form)==0)return this.GetQuerystringValue(this.m_searchProviders[a].key,b).replace(/[+]/g,",");return ""},GetSearchResult:function(b){for(var a in this.m_searchProviders)if(b.indexOf(this.m_searchProviders[a].form)==0)return a;return ""},GetDomain:function(b){var c="(?:http|https)://(.*?)/";if(b&&b.length>0){var a=b.match(c);if(a&&a.length>1)return this.CleanString(a[1])}return ""},GetQuerystringValue:function(b,e){b+="=";var a=e?e:window.location.href,c=a.indexOf(b),d="&";q=a.indexOf("?");if(q>0&&c>q){sh=a.substring(c+b.length);return sh.indexOf(d)>0?sh.substring(0,sh.indexOf(d)):sh}return ""},IsTestDomain:function(a){var a=typeof a!="undefined"&&a?a.toLowerCase():"",c=this.m_TestDomains;for(var b=0;b<c.length;b++)if(a.indexOf(c[b])>-1)return true;return false},m_actionListeners:[],m_timePivot:5,m_image:new Image,m_TestDomains:[".msn-int.com","localhost","msn-beetsh-dev"],m_queue:[],m_tLoading:false,m_dataMap:{single:{url:"switch.atdmt.com",type:"action",project:"",version:"v3"},pair:{language:{value:navigator.language?navigator.language:navigator.browserLanguage},country:{value:""},location:{value:""},action:{value:"",reset:1},actionname:{value:"",reset:1},section:{value:"",reset:1},source:{value:""},time:{value:""},videotime:{value:""},videosession:{value:""},var1:{value:""},var2:{value:""},var3:{value:""},resolution:{value:screen.width+"x"+screen.height},search:{value:""},keywords:{value:""},domain:{value:""},url:{value:""},test:{value:""}},buildUrl:function(){var b=["http:/"];for(var c in this.single)b.push(this.single[c]);for(var a in this.pair){var d=this.pair[a].value;if(d!="")b.push(a+"."+d);if(this.pair[a].reset)this.pair[a].value=""}return b.join("/")}},m_searchProviders:{Live:{form:"http://www.bing.com/search?",key:"q"},Google:{form:"http://www.google.com/search?",key:"q"},Yahoo:{form:"http://search.yahoo.com/search;",key:"p"},Ask:{form:"http://www.ask.com/web?",key:"q"},Baidu:{form:"http://www.baidu.com/s?",key:"wd"}},Click:function(){(new Atlas.Event).Send()},Action:function(e){var f=this.CleanString(e),b=f.split("|");if(b.length>5)for(var a=0;a<b.length;++a)switch(a){case 0:this.m_dataMap.pair.action.value=this.CleanString(b[a]);break;case 1:this.m_dataMap.pair.actionname.value=this.CleanString(b[a]);break;case 2:this.m_dataMap.pair.section.value=this.CleanString(b[a]);break;case 3:this.m_dataMap.pair.time.value=b[a];break;case 4:this.m_dataMap.pair.videotime.value=b[a];break;case 5:this.m_dataMap.pair.videosession.value=b[a];break;case 6:this.m_dataMap.pair.var1.value=this.CleanString(b[a]);break;case 7:this.m_dataMap.pair.var2.value=this.CleanString(b[a]);break;case 8:this.m_dataMap.pair.var3.value=this.CleanString(b[a])}else for(var a=0;a<b.length;++a)switch(a){case 0:this.m_dataMap.pair.action.value=this.CleanString(b[a]);break;case 1:this.m_dataMap.pair.actionname.value=this.CleanString(b[a]);break;case 2:this.m_dataMap.pair.section.value=this.CleanString(b[a]);break;case 3:this.m_dataMap.pair.var1.value=this.CleanString(b[a]);break;case 4:this.m_dataMap.pair.var2.value=this.CleanString(b[a]);break;case 5:this.m_dataMap.pair.var3.value=this.CleanString(b[a])}if(this.IsTestDomain(window.location.host))this.m_dataMap.pair.test.value="test";var c=this.m_dataMap.buildUrl();this.Queue(c);for(var a=0;a<this.m_actionListeners.length;++a){var d=this.m_actionListeners[a];if(typeof d=="function")d(c)}this.m_dataMap.pair.time.value="";this.m_dataMap.pair.videotime.value="";this.m_dataMap.pair.videosession.value="";this.m_dataMap.pair.var1.value="";this.m_dataMap.pair.var2.value="";this.m_dataMap.pair.var3.value=""},View:function(){this.Action("view")},OnAction:function(a){this.m_actionListeners.push(a)},Event:function(){var a=this;a.anchor=b(event.srcElement);this.Send=function(){var c=a.anchor;if(!c)return;var b=c.getAttribute("track");if(!b||b.length==0)return;Atlas.Action(b)};function b(a){while(a&&!(a.tagName=="A"))a=a.parentNode;return a}},BindUnloadEvent:function(){var a=new Date;window.attachEvent("onunload",function(){var b=Math.round(((new Date).getTime()-a.getTime())/1000);Atlas.m_dataMap.pair.time.value=b;Atlas.Action("unload");holdPageUnload(1000)})},LoadImage:function(a){this.m_tLoading=true;Atlas.m_image.src=a+"/"+Math.random()},CleanString:function(a){a=unescape(a);a=a.replace(/\/|\?|&|\.|#|:|%/g,"_");return a}};function holdPageUnload(d){var b=(new Date).getTime(),a=b;for(var c=0;b+d>a;c++){window.status="";a=(new Date).getTime()}}function __bindEventHdlr(a){if(a&&!a.attachEvent)a.attachEvent=function(b,d){b=b.substring(2);a.addEventListener(b,c,false);a.addEventListener(b,d,false);function c(a){try{var b=0;while(a.target&&a.target.nodeType!=1&&++b<50)a.target=a.target.parentNode}catch(c){try{a.target=null}catch(d){}}a.srcElement=a.target;window.event=a}}}__bindEventHdlr(window);__bindEventHdlr(document)