// Copyright TagMan Ltd 2012: T 2.50 V branches/2.5_MAPPINGS_STABLE C Wed Feb  1 16:57:04 2012
//
// Copyright TagMan 2011: V branches/2.5_MAPPINGS_STABLE R 4772 C 2011-03-14 10:31:58
(function(f){function j(a,b){if(arguments.length<1)throw Error("`code` argument is required");b||(b={});this.code=a;this.id=b.id;this.position=b.position||0;this.async="async"in b?b.async:false;this.movable="movable"in b?b.movable:true;this.canExecute=b.canExecute||o;this.timeout=b.timeout||false;this.pageLoadTimeout=b.pageLoadTimeout||0;if("opv"in b)this.opv=b.opv||this.OPV_INTERVAL;this.requiredScripts=b.requiredScripts||[];this.executeRequiredScripts="executeRequiredScripts"in b?b.executeRequiredScripts:
false;this._requiredScriptsLoadResults={};this._executed=false}function h(a,b,c){if(arguments.length<2)throw Error("`account` and `id` arguments are required");c=c||{};this.param=c.param||{};this.account=a;this.id=b;this.tags=[];c.tags&&this.addTags.apply(this,c.tags);c.mapping&&TMAN.tagLibrary.addMapping(this.account,c.mapping);this._setOptions(c);this.host=this.host.replace(/^(?:https?:)?\/\//i,"")}function l(){TMAN.doTags(TMAN.position.WINDOW_LOADED)}var o=function(){return true};if(!f.TMAN)f.TMAN=
{startTime:+new Date};if(!TMAN.util)TMAN.util={K:function(a){return a},extend:function(a,b){for(var c in b)a[c]=b[c];return a},isInIframe:function(){return(window.top!==window)>>0},createImage:function(a){(new Image).src=a},append:function(a){if(!a.id)a.id="tmap_"+TMAN.num.getCacheBuster(5);if(document.body)document.body.appendChild(a);else{var b=document.getElementsByTagName("head")[0]||document.documentElement;if(b)b.insertBefore(a,b.lastChild);else{b=document.getElementsByTagName("script")[0];
b.parentNode.insertBefore(a,b)}}return a.id},appendIframe:function(a,b){var c=document.createElement("iframe");if(b){c.width="18px";c.height="18px"}else{c.width="0";c.height="0"}c.style.cssText="position:absolute;left:-999em;top:0";var e=TMAN.util.append(c);c.src=a;return e},appendObject:function(a){var b=document.createElement("object");b.width=b.height=0;var c=TMAN.util.append(b);b.data=a;return c},appendScript:function(a,b){var c=document.createElement("script");c.async=true;if(b)c.text=a;else c.src=
a},log:function(a,b){b&&b.toLowerCase();if(!(b=!TMAN.debugMode)){a="TagMan ("+b+"): "+a;if((TMAN.util.cookie("tmDebug")!=null||location.host=="127.0.0.1")&&typeof console=="object"&&console.log)console.log(a)}},logStats:function(a){if(TMAN.contStatsURL){a=[TMAN.contStatsURL+"uid="+TMAN.util.encode(TMAN.uid),"type="+TMAN.util.encode(a.eventType),"acc="+TMAN.util.encode(a.account),"cid="+TMAN.util.encode(a.containerId),"tid="+TMAN.util.encode(a.tagId),"tt="+TMAN.util.encode(a.totalTime),"tv="+TMAN.util.encode(a.timeoutValue),
"tl="+TMAN.util.encode(a.timeoutLevel),"rf="+TMAN.util.encode(a.referrer)].join("&");(new Image).src=a}},getUID:function(){function a(){for(var b="",c=16;c--;)b+="abcdef0123456789".charAt(Math.floor(Math.random()*16));return b}TMAN.uid=a();return a}(),getProtocol:function(){return location.protocol+"//"},appendImage:function(a){var b=new Image;b.src=a;b.style.width=b.style.height=b.style.border="0";return TMAN.util.append(b)},killById:function(a){a=document.getElementById(a);if(!a)return false;if("src"in
a)a.src=null;else if("data"in a)a.data=null;else a.text=null;return true},timeOutById:function(a,b){a&&b&&setTimeout(function(){_this.setTimedOut()},this.timeout)},decode:function(a){return decodeURIComponent(a)},encode:function(a){return encodeURIComponent(a)},load:function(a,b){var c=document.getElementsByTagName("script");c=new TMAN.Loader(b,c[c.length-1]);c.load.apply(c,typeof a==="string"?[a]:a);return c},writeImage:function(a,b,c){if(TMAN.isDomReady){TMAN.util.log("ignoring attempt to document.write image ["+
a+"] after dom ready","error");return false}var e="tmim_"+TMAN.num.getCacheBuster(5);document.write('<img id="'+e+'" src="'+a+'" width="'+(b||0)+'" height="'+(c||0)+'" border="0">');return e},writeJS:function(a,b){return TMAN.util.writeScript(a,!b)},writeScript:function(a,b){if(TMAN.isDomReady){TMAN.util.log("ignoring attempt to document.write script ["+a+"] after dom ready","error");return false}var c="tmjs_"+TMAN.num.getCacheBuster(5);document.write('<script id="'+c+'"'+(!b?' src="'+a+'">':">")+
(!b?"":a)+"<\/script>");return c},writeIframe:function(a,b){if(TMAN.isDomReady){TMAN.util.log("ignoring attempt to document.write iframe ["+a+"] after dom ready","error");return false}var c="tmif_"+TMAN.num.getCacheBuster(5),e='<iframe id="'+c+'" src="" style="position:absolute;top:0;left:-999em" ';e+=b?'width="18px" height="18px"':'width="0" height="0"';document.write(e+"></iframe>");document.getElementById(c).src=a;return c},parseKeyValue:function(a,b,c,e){b=RegExp("([^=]+?)=([^"+b+"]*?)(?:"+b+
"\\s*|$)","g");var d={},g;e=c?e||TMAN.util.decode:TMAN.util.K;if(a.charAt(0)==="?")a=a.slice(1);for(;g=b.exec(a);){c=e(g[1]);g=e(g[2]);if(d[c]){if(typeof d[c]==="string")d[c]=[d[c]];d[c].push(g)}else d[c]=g}return d},setKeyValue:function(a,b,c,e,d,g){g=d?g||TMAN.util.encode:TMAN.util.K;c=g(b)+"="+g(c);a=a.replace(RegExp("(^|"+e+"\\s*|\\?)"+g(b)+"=[^"+e+"]*?("+e+"\\s*|$)","g"),function(m,n,k){return n+c+k});return a.indexOf(c)<0?a+e+c:a},forEach:function(){function a(g,m){for(var n in this)b.call(this,
n)&&g.call(m,this[n],n,this)}var b={}.hasOwnProperty,c="hasOwnProperty.isPrototypeOf.propertyIsEnumerable.toLocaleString.toString.valueOf".split("."),e=c.length,d;for(d in{toString:true})if(d==="toString")return a;return function(g,m){a.call(this,g,m);for(var n=0,k;n<e;++n)if(b.call(this,k=c[n]))g.call(m,this[k],k,this)}}(),preloadResource:function(a,b,c){function e(){if(!m){m=true;clearInterval(r);b("loaded")}}function d(u){p.push(u);k||(k=setInterval(function(){if(document.body||document.getElementsByTagName("head")[0]){clearInterval(k);
clearInterval(r);for(var t=p.length;t--;)TMAN.util.preloadResource(p[t],b,c)}},100))}TMAN.util.log('preloading resource "'+a+'"');var g,m=false,n=typeof window.opera!=="undefined"&&Object.toString.call(window.opera)==="[object Opera]"||typeof window.chrome==="object",k,p=[];if(c)var r=setInterval(function(){if(!m&&c()){m=true;clearInterval(r);g["src"in g?"src":"data"]=null;b&&b("timeout")}},100);if(n){g=new Image;g.onload=g.onerror=e;g.src=a;g=null}else if(document.body||document.getElementsByTagName("head")[0]){TMAN.util.log("body exists; injecting object with url of "+
a,"debug");g=document.createElement("object");g.onload=e;g.data=a;g.width=g.height=0;(document.body||document.getElementsByTagName("head")[0]).appendChild(g)}else{TMAN.util.log("body does NOT exist; queueing resource "+a,"debug");d(a)}},cookie:function(a,b,c){if(arguments.length>1&&(b===null||typeof b!=="object")){c=TMAN.util.extend({},c);if(b===null)c.expires=-1;if(typeof c.expires==="number"){var e=c.expires,d=c.expires=new Date;d.setDate(d.getDate()+e)}return document.cookie=[encodeURIComponent(a),
"=",c.raw?String(b):encodeURIComponent(String(b)),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join("")}c=b||{};d=c.raw?function(g){return g}:decodeURIComponent;return(e=RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)").exec(document.cookie))?d(e[1]):null},scramble:function(a){if(a==null)return null;if(a.length==0)return a;var b=[1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=["4","!",'"',"#","$","1","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":","2","<","3",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}"],e="",d=a.length;
for(i=0;i<d;i++){var g=(a.charAt(i).charCodeAt(0)+i+62)%94;if(b[g])e+="%";e+=c[g]}return e},unscramble:function(a){if(a==null)return null;if(a.length==0)return a;var b=0,c="",e=a.length;for(i=0;i<e;i++){var d=a.charAt(i);if(d=="%"){i++;d=a.charAt(i);if(d=="4")d=" ";else if(d=="3")d="=";else if(d=="2")d=";";else if(d=="1")d="%";else{i--;continue}}c+=String.fromCharCode((156+d.charCodeAt(0)-b++%94)%94+32)}return c},getBrowser:function(a){agt=a||navigator.userAgent;agt=agt.toLowerCase();if(agt.indexOf("msie")!=
-1)return"IE";if(agt.indexOf("firefox")!=-1)return"FF";if(agt.indexOf("chrome")>-1)return"CR";if(agt.indexOf("safari")>-1)return"SF";if(agt.indexOf("opera")>-1)return"OP";return"OT"},getOS:function(a){a=a||navigator.userAgent;a=a.toLowerCase();if(a.indexOf("windows ca")!=-1)return"WMB";if(a.indexOf("windows")!=-1)return"WIN";if(a.indexOf("ipad")!=-1)return"IPA";if(a.indexOf("ipod")!=-1)return"IPO";if(a.indexOf("symbian")!=-1)return"SYM";if(a.indexOf("android")!=-1)return"AND";if(a.indexOf("macintosh")!=
-1)return"MAC";return"OTH"}};if(!TMAN.String){TMAN.String=function(a){this.value=a};TMAN.String.prototype={replaceIfMatch:function(a,b){var c=this.value.match(a);if(!c){this.value="";return this}c=c[0];if(!b){this.value=c;return this}this.value=c.replace(a,b);return this},replace:function(a,b){this.value=this.value.replace(a,b);return this},toString:function(){return this.value},callIfMatch:function(a){for(var b=1,c=arguments.length;b<c;b++)if(this.value.match(arguments[b]))return a()}};TMAN.String.escape=
function(a){return escape(a).replace(/\//g,"%2F")};TMAN.String.doubleEscape=function(a,b){var c=TMAN.String.escape(TMAN.String.escape(a));return b?c.replace(RegExp("^(.{1,"+b+"})(?:%25.*|$)"),"$1"):c};TMAN.String.getParam=function(a,b){return a&&b&&TMAN.util.parseKeyValue(a,"&",false)[b]};TMAN.String.setParam=function(a,b,c){var e=TMAN.util.parseKeyValue(a||"?","&",false);e[b]=c;return(a.charAt(0)==="?"?"?":"")+TMAN.String.objectToQuery(e)};TMAN.String.objectToQuery=function(a){typeof a!="object"&&
TMAN.util.log("objectToQuery not passed object: "+a,"debug");var b=[],c;for(c in a)b.push("&",encodeURIComponent(c),"=",encodeURIComponent(a[c]));return b.slice(1).join("")};TMAN.String.queryToObject=function(a){return TMAN.util.parseKeyValue(a||"?","&",true,encodeURIComponent)};TMAN.String.printR=function(a,b){var c=[],e=Array(b?++b:b=1).join("\t");if(a==null)c.push(e,a===null?"null":"undefined","<br>");else switch(typeof a){case "function":case "string":a=(""+a).replace(/</g,"&lt;").replace(/(\r\n|\n|\r)/g,
"$1"+e);case "boolean":case "number":c.push(e,a,"<br>");break;default:if(a.length){c.push(e,"ArrayObject<br>");for(var d=0,g=a.length;d<g;++d)c.push(e,"[",d,"] ",TMAN.String.printR(a[d],b).toString().replace(/^\s+/,""),"<br>")}else{c.push(e,a.name||"Generic"," Object<br>");for(d in a)c.push(e,"['",d,"'] ",TMAN.String.printR(a[d],b).toString().replace(/^\s+/,""),"<br>")}}return c.join("").replace(/<br><br>/g,"<br>")};TMAN.String.subString=function(a,b,c){var e="".substr;return c?e.call(a||"",b,c):
e.call(a||"",b)};TMAN.String.regEx=function(a,b){if(a&&b){var c=RegExp(b).exec(a);if(c){c.splice(0,1);return c.join("")}}return""};TMAN.String.isFound=function(a,b){if(a&&b)return a.indexOf(b)==-1?0:1;return 0};TMAN.String.getStem=function(a,b){if(a&&b){var c="";b=","+b+",";for(var e=a.split("/"),d=e.length*-1,g=0;g<e.length;g+=1){if(b.indexOf(","+g+",")>-1||b.indexOf(","+d+",")>-1){if(c)c+="/";c+=e[g]}d+=1}return c}};TMAN.String.trim=function(a){a=a.replace(/^\s\s*/,"");for(var b=/\s/,c=a.length;b.test(a.charAt(--c)););
return a.slice(0,c+1)}}(function(){function a(k){if((k=b(k))&&k.innerHTML)try{Function(k.innerHTML)()}catch(p){LEVU.LE('Error in `evaluateScript`. Script contents: "'+k.innerHTML+'"',"Error")}}function b(k){for(var p=document.getElementsByTagName("script"),r=p.length;r--;)if(p[r].src.indexOf("/"+k)>-1)return p[r];return""}function c(k){var p=b(k);if(p){var r=p.src.indexOf("/"+k+"?");if(r>-1)return p.src.substr(r+k.length+2)}return""}function e(k){TMAN.djs=(TMAN.djs||"")+k;if(typeof LEVU!="undefined")LEVU.djs=
TMAN.djs}function d(){if(TMAN.djs){var k=TMAN.util.getProtocol();k=k+(k==="https://"?n:m);typeof LEVU=="undefined"?TMAN.util.writeJS(k+"/js/TMAN.hack.WDW.js",1):TMAN.util.writeJS(k+"/js/LEVU.WDW.xjs",1)}}function g(){if(TMAN.djs){var k=TMAN.djs;TMAN.djs="";TMAN.util.writeScript(k,true)}}var m="res.levexis.com",n="sec.levexis.com";if(!TMAN.hack)TMAN.hack={evalScript:a,findScript:b,getScriptParams:c,addDelayedWrite:e,initDelayedWrite:d,writeDelayedWrite:g,WDW:g}})();if(!TMAN.num)TMAN.num={getCacheBuster:function(a){return(Math.random()+
"").substr(2,a)},doSample:function(a){return(Math.random()*100<=(a||0))>>0}};LEVU={};LEVU.ABoH=TMAN.util.append;LEVU.AIF=TMAN.util.appendIframe;LEVU.GPR=TMAN.util.getProtocol;LEVU.GP=TMAN.String.getParam;LEVU.SP=TMAN.String.setParam;LEVU.OTQ=TMAN.String.objectToQuery;LEVU.QTO=TMAN.String.queryToObject;LEVU.RX=TMAN.String.regEx;LEVU.SS=TMAN.String.subString;LEVU.FD=TMAN.String.isFound;LEVU.GS=TMAN.String.getStem;LEVU.PR=TMAN.String.printR;LEVU.LES=TMAN.String.lescape;LEVU.DLE=TMAN.String.doubleLescape;
LEVU.WIF=TMAN.util.writeIframe;LEVU.AJS=TMAN.util.appendScript;LEVU.CIm=TMAN.util.createImage;LEVU.LE=TMAN.util.log;LEVU.IIF=TMAN.util.isInIframe;LEVU.WJS=TMAN.util.writeJS;LEVU.PKV=TMAN.util.parseKeyValue;LEVU.SKV=TMAN.util.setKeyValue;LEVU.ES=TMAN.hack.evalScript;LEVU.SQ=TMAN.hack.getScriptParams;LEVU.FS=TMAN.hack.findScript;LEVU.ADW=TMAN.hack.addDelayedWrite;LEVU.IDW=TMAN.hack.initDelayedWrite;LEVU.WDW=TMAN.hack.writeDelayedWrite;LEVU.DS=TMAN.num.doSample;LEVU.GetCB=TMAN.num.getCacheBuster;LEVU.GC=
function(a){return TMAN.util.cookie(a)};LEVU.SC=function(a,b,c,e){TMAN.util.cookie(a,b,{path:c,expires:e})};try{LEVU.ES("lu.js");var s=LEVU.SQ("lu.js");s&&TMAN.util.log("Querystring ["+s+"] found on lu.js, no longer supported","FATAL")}catch(q){TMAN.util.log("Error excuting LEVU.SQ on bootStrap of lu.js","ERROR")}if(typeof TMAN=="undefined")TMAN={};TMAN.StringBuilder=function(){function a(){}var b=Array.prototype.join;a.prototype={constructor:a,length:0,push:Array.prototype.push,append:Array.prototype.push,
size:function(){return this.toString().length},toString:function(){return b.call(this,"")}};return a}();TMAN.DOMQ=function(a){this.el=a||document};TMAN.DOMQ.factory=function(a){for(var b=[],c=0,e=a.length;c<e;c++)b[c]=new TMAN.DOMQ(a[c]);return b};TMAN.DOMQ.prototype={id:function(a){if(!this.el)return this;if(!this.el.getElementById)return document.getElementById(a);this.el=this.el.getElementById(a);return this},tag:function(a,b){if(!this.el)return this;this.el=this.el.getElementsByTagName(a)[b||
0];return this},name:function(a,b){if(!this.el)return this;this.el=this.getElementsByName(a)[b||0];return this},className:function(a,b){if(!this.el)return this;this.el=this.getElementsByClassName(a)[b||0];return this},isAncestor:function(a){var b=this.el;if(b){for(;a;){if(a==b&&a!=b)return true;a=a.parentNode}return false}},getElementsByName:function(a){if(!this.el)return[];a=document.getElementsByName(a);if(this.el===document)return a;for(var b=[],c=0,e=a.length;c<e;c++)this.isAncestor(a[c])&&b.push(a[c]);
return b},getElementsByClassName:function(a){if(!this.el)return[];var b=this.el.getElementsByTagName("*");a=a.replace(/\-/g,"\\-");a=RegExp("(?:^|\\s)"+a+"(?:\\s|$)");for(var c=[],e=0,d=b.length;e<d;e++)a.test(b[e].className)&&c.push(b[e]);return c},match:function(a,b){return(new TMAN.String(this.toString())).match(a,b)},replace:function(a,b){return(new TMAN.String(this.toString())).replace(a,b)},toString:function(){if(!this.el)return"";return this.el==document?this.el.documentElement.innerHTML:this.el.value?
this.el.value:this.el.innerHTML}};TMAN.DT=function(){var a={html:function(){return new TMAN.DOMQ},id:function(c){return a._html.id(c)},tag:function(c,e){return a._html.tag(c,e)},name:function(c,e){return a._html.name(c,e)},className:function(c,e){return a._html.className(c,e)},head:function(){return a.tag("head")},body:function(){return a.tag("body")}};a._html=a.html();var b=function(c){for(var e in c){var d=c[e],g="";if(typeof d=="string")g=a.id(d);else if(d instanceof RegExp)g=a.html().match(d,
"$1");else if(d instanceof Array)g=a.id(d[0]).match(d[1],"$1");else if(typeof d=="function")g=d(a)||"";TMAN.conf.param[e]=""+g}};window.LEV_DT&&b(window.LEV_DT);return b}();this.TMAN=this.TMAN||{};TMAN.onDomReady=TMAN.onDomReady||function(){function a(n){e?n():d.push(n)}function b(){if(!e){e=true;if(TMAN.conf&&TMAN.conf.param)TMAN.conf.param.tmdom=1;for(clearInterval(m);d.length;)d.shift()();if(typeof g.readyState!=="string")g.readyState="complete"}}function c(){/^(?:loaded|complete)$/i.test(g.readyState)&&
b()}var e=false,d=[],g=document,m=0;a.isReady=function(){return e};switch(true){case !!g.addEventListener:g.addEventListener("DOMContentLoaded",b,false);window.addEventListener("load",b,false);g.addEventListener("readystatechange",c,false);break;case !!g.attachEvent:g.attachEvent("onreadystatechange",c,false);window.attachEvent("onload",b,false);case window.frameElement==null&&!+"\u000b1":m=setInterval(function(){try{g.documentElement.doScroll("left")}catch(n){return}b()},15)}m||(m=setInterval(c,
15));TMAN.isDomReady=false;a(function(){TMAN.isDomReady=true});return a}();this.TMAN=this.TMAN||{};(function(){var a;TMAN.sessionCookie={isActive:function(b){var c=new Date,e=false,d=b*60;if(b&&a&&a+d<c)e=true;a=c;return e}}})();TMAN.POLL_INTERVAL=100;j.prototype={OPV_INTERVAL:18E5,execute:function(a){if(!(this.isExecuted()||this.isTimedOut()))if(!this.async&&this.container.isTimedOut())this.setTimedOut("container");else if(this.canExecute()){this._setStartTime();this._startTimeoutTimer();if(!this.async&&
this.position>=TMAN.position.DOM_COMPLETE)TMAN.util.log("Aborting attempt to execute sync tag ("+this.id+") after DOM.");else if(this.isReadyToExecute())if(this.isSessionActive())TMAN.util.log("OPV tag (id: "+this.id+") ignored as timeout not expired.");else{TMAN.util.log("Executing tag (id: "+this.id+")","debug");this.setSessionActive();this._injectTag();this.executionTime=new Date-this.startTime;TMAN.util.log("Execution time of tag (id: "+this.id+") was "+this.executionTime+"ms","debug");this._executed=
true}else if(this.async)if(this._requiredScriptTimedOut)TMAN.util.log("required script timeout for tag (id: "+this.id+")");else{a||TMAN.util.log("Not got requiredScripts for tag (id: "+this.id+") started polling @ "+TMAN.POLL_INTERVAL+"ms interval","debug");var b=this;setTimeout(function(){b.execute(true)},TMAN.POLL_INTERVAL)}else TMAN.blockTag(this.id,this.account)}else TMAN.util.log("canExecute not satisfied for tag (id: "+this.id+")","debug")},_startTimeoutTimer:function(){if(this.timeout!==false&&
this._timedOut===undefined){var a=this;this._timedOut=false;TMAN.util.log("Starting timer of ("+this.timeout+"ms) for tag (id: "+this.id+")","debug");setTimeout(function(){a.setTimedOut()},this.timeout)}},_setStartTime:function(){if(!("startTime"in this))this.startTime=new Date},_injectTag:function(){if(this.executeRequiredScripts&&this.requiredScripts.length>0){for(var a=0,b=this.requiredScripts.length;a<b;a++)this.async?TMAN.util.appendScript(this.requiredScripts[a],false):TMAN.util.writeScript(this.requiredScripts[a],
false);if(this.async)TMAN.util.appendScript(this.code,true);else{TMAN.hack.addDelayedWrite("TMAN.util.writeScript('"+this.code.replace("'","\\'")+"',true);");TMAN.hack.initDelayedWrite()}}else this.async?TMAN.util.appendScript(this.code,true):TMAN.util.writeScript(this.code,true)},_makeHandlerForPreloadResource:function(a){var b=this;return function(c){if(c==="loaded"){TMAN.util.log("required script ("+a+") loaded");b._requiredScriptsLoadResults[a]=true}else if(c==="timeout"){TMAN.util.log("required script ("+
a+") timed out");b._requiredScriptTimedOut=true}}},resolveParameters:function(){var a=this.account;this.code=this.code.replace(/\{\{(.*?)\}\}/g,function(b,c){var e=TMAN.getParam(c,a);if(e)return typeof e==="function"?e():e})},isExecuted:function(){return this._executed},isTimedOut:function(){if(this.timeout!==false&&!this._timedOut)if(this.getElapsed()>=this.timeout)this.setTimedOut("tag");else this.pageLoadTimeout&&new Date-TMAN.startTime>this.pageLoadTimeout&&this.setTimedOut("page");return this._timedOut},
getElapsed:function(){return this._executionTime=new Date-this.startTime},setTimedOut:function(a){this._timedOut=true;this._timeOutType=this._timeOutType||a||"tag";if(!this.isExecuted()){TMAN.util.log("Tag (id,reason: "+this.id+","+this._timeOutType+") timed out after "+this.getElapsed()+"ms","warn");this.logStats("tagtimeout")}},isReadyToExecute:function(){for(var a in this._requiredScriptsLoadResults)if(this._requiredScriptsLoadResults[a]===false)return false;return true},_getTagOPVUID:function(){return"OPV_SESION_"+
this.container.account+this.id},setSessionActive:function(){this.opv&&TMAN.storage.set(this._getTagOPVUID(),{executionTime:+new Date})},isSessionActive:function(){if(!this.opv)return false;var a=TMAN.storage.get(this._getTagOPVUID());if(!a)return false;return new Date-a.executionTime<this.opv},preloadResources:function(){for(var a=this.requiredScripts.length;a--;)this.preloadResource(this.requiredScripts[a])},preloadResource:function(a){var b=this;this._requiredScriptsLoadResults[a]=false;TMAN.util.preloadResource(a,
this._makeHandlerForPreloadResource(a),function(){return b.isTimedOut()})},isRequiredScriptLoaded:function(a){for(var b=this._requiredScripts.length;b--;)if(this._requiredScipts[b]===a)if(this._requiredScriptsLoadResults[a])return true;else{this._requiredScipts.push(a);this.preloadResource(a);break}return false},logStats:function(a){TMAN.util.logStats({account:this.account,containerId:this.container.id,tagId:this.id,eventType:a,timeoutLevel:this._timeOutType,referrer:document.referrer})}};TMAN.Tag=
j;TMAN._tags=[];TMAN.addTag=function(a,b){if(arguments.length<2)throw Error("`containerName` and `tag` arguments are required");var c=TMAN.getContainerByName(a);if(!c)throw Error("Container "+a+" does not exist. Can't add tag.");c.addTags(b);b.requiredScripts.length>0&&b.preloadResources()};TMAN.onDomReady(function(){TMAN.doTags(TMAN.position.DOM_COMPLETE)});TMAN.blockTag=function(){var a=(document.location.protocol==="https:"?"https":"http")+"://wt.tagman.com/wait/{{delay}}/0/{{uid}}_{{id}}",b=TMAN.POLL_INTERVAL;
TMAN.waitLatency=0;return function(c,e){var d=b-TMAN.waitLatency<0?0:b-TMAN.waitLatency;TMAN.util.log("Blocking for tag ("+c+") with delayWithLatencyAdjusted: "+d,"debug");var g=Mustache.to_html(a,{delay:d,uid:TMAN.num.getCacheBuster(5),id:c});d=Mustache.to_html('(function () { var Tag = TMAN.getTag({{id}}, "{{account}}");  if ( !Tag.isTimedOut() && !Tag.isReadyToExecute() ) { TMAN.util.log("blocking page for tag (id: {{id}}), elapsed " + Tag.getElapsed(),"debug");TMAN.blockTag({{id}}, "{{account}}");}else {TMAN.getTag({{id}}, "{{account}}").execute();} })();',
{id:c,account:e});var m=+new Date;g=TMAN.util.writeScript(g,false);if(g=document.getElementById(g))g.onload=function(){var n=new Date-m,k=b-TMAN.waitLatency<0?0:b-TMAN.waitLatency;TMAN.waitLatency=n-k;TMAN.util.log("Blocked for "+n+" v "+k+" adjusting offset to "+TMAN.waitLatency)};TMAN.hack.addDelayedWrite(d);TMAN.hack.initDelayedWrite()}}();TMAN.getTag=function(a,b){var c=TMAN.getContainerByName(b);if(!c)throw Error("Container "+b+" does not exist. Can't get tag.");c=c.getTagById(a);if(!c)throw Error("Tag (id: "+
a+") does not exist on this container ("+b+").");return c};TMAN.getParam=function(a,b){if(arguments.length<2)throw Error("TMAN.getParam requires 2 parameters");if(typeof b==="string")b=TMAN.getContainerByName(b);if(!b)throw Error("Container "+b.account+" does not exist. Can't retrieve param for it.");return b.param[a]};TMAN.Tag.fromJSON=function(a,b){return this.fromObject(JSON.parse(a),b)};TMAN.Tag.fromObject=function(a,b){var c=a.code;if(a.canExecute)a.canExecute=Function(a.canExecute);if(typeof b!==
"undefined")a.position=b;return new TMAN.Tag(c,a)};TMAN.conf={host:"gslb.tagman.com",async:false,tagsTimeout:0,landingPageMins:0,bootstrap:true,enableJSCall:true,attribution:true,serverCall:""};h.prototype={_setOptions:function(a){this._setOptionsFromDefault(["host","async","tagsTimeout","landingPageMins","bootstrap","enableJSCall","attribution","serverCall"],a,TMAN.conf)},_setOptionsFromDefault:function(a,b,c){for(var e=0,d;d=a[e++];)this[d]=d in b?b[d]:c[d]},addTags:function(){Array.prototype.push.apply(this.tags,
arguments);for(var a=0,b;b=arguments[a++];){b.account=this.account;b.container=this;b.preloadResources();b.resolveParameters()}},addParams:function(a){for(var b in a)this.param[b]=a[b]},getTagById:function(a){for(var b=this.tags.length;b--;)if(this.tags[b].id===a)return this.tags[b]},isTimedOut:function(){if(this.tagsTimeout)return new Date-this.initTime>this.tagsTimeout;return false},_performServerCall:function(){TMAN.util.appendScript(this.serverCall)},fetchTagDefinitions:function(a,b){TMAN.tagLibrary.fetchTagDefinitions(this.account,
a,b)},initTagsFromMapping:function(){TMAN.tagLibrary.initTagsFromMapping(this.account)},getHighestTagId:function(){return TMAN.tagLibrary.getHighestTagId(this.account)}};TMAN.Container=h;TMAN._containers=[];TMAN.addContainer=function(a){if(arguments.length>2&&!(arguments[0]instanceof TMAN.Container))a=new TMAN.Container(arguments[0],arguments[1],arguments[2]);TMAN._containers.push(a);a.initTime=new Date;if(typeof TMAN.tm2initialise==="function"){TMAN.tm2initialise(a);TMAN.tm2initialise=null}else a.serverCall&&
a._performServerCall();return a.id};TMAN.addParams=function(a,b){TMAN.getContainerByName(a).addParams(b)};TMAN.doTags=function(a){TMAN.currentPosition=a;for(var b=0,c=TMAN._containers.length;b<c;b++){var e=TMAN._containers[b].tags;TMAN.util.log("running doTags for "+TMAN._containers[b].account+" @ position "+a,"debug");for(var d=e.length;d--;)if(e[d].movable)e[d].position<=a&&e[d].execute();else e[d].position===a&&e[d].execute()}};TMAN.getContainerByName=function(a){for(var b=TMAN._containers.length;b--;)if(TMAN._containers[b].account===
a)return TMAN._containers[b]};TMAN.position={PRE_HEAD:0,TOP_HEAD:1,BOTTOM_HEAD:2,TOP_BODY:3,BOTTOM_BODY:31,DOM_COMPLETE:32,WINDOW_LOADED:33};if(window.addEventListener)window.addEventListener("load",l,false);else window.attachEvent&&window.attachEvent("onload",l)})(this);this.LEV=this.LEV||{};this.Lescape=TMAN.String.escape;this.DoubleLescape=TMAN.String.doubleEscape;if(!LEV.extend)LEV.extend=TMAN.util.extend;if(!LEV.String)LEV.String=TMAN.String;if(!LEV.StringBuilder)LEV.StringBuilder=TMAN.StringBuilder;
if(!LEV.DOMQ)LEV.DOMQ=TMAN.DOMQ;if(!LEV.DT)LEV.DT=TMAN.DT;if(!LEV.onDOM)LEV.onDOM=TMAN.onDomReady;LEV.checkURLTracking=function(){var f=document.location.search||"";if(f){var j=TMAN.String.getParam(f.substr(1),"tmcampid");j&&TMAN.util.extend(TMAN.conf.param,{tmcampid:j,tmad:TMAN.String.getParam(f,"tmad"),tmplaceref:TMAN.String.getParam(f,"tmplaceref"),tmclickref:TMAN.String.getParam(f,"tmclickref")})}};
LEV.bootStrap=function(){if(TMAN.conf.landingPageMins&&TMAN.sessionCookie.isActive(TMAN.conf.landingPageMins)){TMAN.util.log("Session cookie still active and tmOPV set to ["+TMAN.conf.landingPageMins+"] minutes","MESSAGE");return false}else if(TMAN.conf._lastContainerId==TMAN.conf.id)return false;else{TMAN.conf._tagStr="";TMAN.conf._tagStr=TMAN.util.cookie("tmStaging")?TMAN.conf.baseURL.replace(/(.*?)\/\/(.*?)\.(.*)/,"$1//tagstaging.$3/"):TMAN.conf.baseURL;TMAN.conf._tagStr=TMAN.conf._tagStr+"/tmpageid="+
TMAN.conf.id;TMAN.conf.lastContainerId=TMAN.conf.id;TMAN.conf._tagStr+="&levyouruid="+Math.random();TMAN.conf.enableURLTracking&&LEV.checkURLTracking();var f=TMAN.conf._tagStr+LEV_TMIFPS();if(TMAN.conf.param&&(TMAN.conf.param.tmcampid||TMAN.conf.param.levrev||TMAN.conf.param.levresdes)){window.tmCBRequired=true;TMAN.conf._callbackRequired=true}f=f+"&tmtag=js";if(TMAN.conf.enableJSCall)TMAN.conf.async||LEV.onDOM.isReady()?TMAN.util.appendScript(f,1):TMAN.util.writeJS(f,1)}};
function LEV_TMIFPS(){var f=new LEV.StringBuilder;if(typeof TMAN.conf.param!="undefined")for(var j in TMAN.conf.param){var h=TMAN.conf.param[j],l=typeof h;if(j&&h&&(l=="number"||l=="string"||l=="boolean"))f.append("&",j,"=",TMAN.String.doubleEscape(h))}return f.toString()}function LEV_TMTCB(){window.tmTrack=undefined;window.tmTrackWaiting&&LEV_TMIFCB()}
var LEV_TMIFCB=function(){function f(){window.LEV_DT&&LEV.DT(window.LEV_DT);if(window.LEV_DTD)for(var h=0;h<LEV_DTD.length;h++)LEV_DTD[h]();j()}function j(){if(typeof window.tmDisableIframe!="undefined")TMAN.conf._disableIframe=window.tmDisableIframe;if(typeof window.tmCBRequired!="undefined")TMAN.conf._callbackRequired=window.tmCBRequired;var h=LEV_TMIFPS();h=TMAN.conf._tagStr+h;if(location.hash=="#tmtest")parent.location=document.referrer+"#"+h;try{TMAN.util.log("referrer="+document.referrer,"DEBUG");
if(typeof TMAN.conf.param=="object"){var l="",o;for(o in TMAN.conf.param)if(typeof TMAN.conf.param[o]!="undefined")l+="\t"+o+"=>"+TMAN.conf.param[o]+"\n";l||(l="<empty>")}TMAN.util.log("TMAN.conf.param contents\n"+l,"DEBUG");typeof tmOPV!="undefined"&&TMAN.util.log("tmOPV="+TMAN.conf.landingPageMins,"DEBUG");TMAN.util.log("tmBaseURL="+TMAN.conf.baseUrl,"DEBUG");TMAN.util.log("tmPageId="+TMAN.conf.id,"DEBUG")}catch(s){TMAN.util.log("logging error on of tmPageId or tmBaseURL probably does not exits"+
s.message,"FATAL")}if(TMAN.conf._disableIframe){if(TMAN.conf.param&&(TMAN.conf.param.tmad||TMAN.conf.param.levrev||TMAN.conf.param.levresdes||TMAN.conf.param.levordref)||TMAN.conf._callbackRequired){var q=h+"&tmtag=image";if(LEV.onDOM.isReady()){TMAN.util.appendImage(q);TMAN.util.log("Image written: "+q)}else LEV.onDOM(function(){TMAN.util.appendImage(q);TMAN.util.log("Image written: "+q,"DEBUG")})}}else{q=h+"&tmtag=iframe";if(LEV.onDOM.isReady()){TMAN.util.appendIframe(q);TMAN.util.log("Iframe written: "+
q,"DEBUG")}else LEV.onDOM(function(){TMAN.util.appendIframe(q);TMAN.util.log("Iframe written: "+q,"DEBUG")})}}return function(){TMAN.conf._writeImmediately=window.tmImmediate||false;TMAN.conf._writeImmediately?f():LEV.onDOM(f)}}();if(typeof TMAN.conf==="undefined"){TMAN.conf={param:{}};if(typeof tmPageId==="undefined")if(typeof tmContId==="undefined")TMAN.util.log("tmContId or tmPageId not defined for TagMan container, it's compulsary","FATAL");else tmPageId=tmContId}
TMAN.util.extend(TMAN.conf,{_lastContainerId:0,_tagStr:"",_callbackRequired:false,_disableIframe:false,enableJSCall:true,enableURLTracking:true,_writeImmediately:false});TMAN.position=TMAN.position||{};TMAN.util.extend(TMAN.position,{PRE_HEAD:0,TOP_HEAD:1,BOTTOM_HEAD:2,TOP_BODY:3,BOTTOM_BODY:31,DOM_COMPLETE:32,WINDOW_LOADED:33});
if(typeof tmBaseUrl==="string"){TMAN.util.extend(TMAN.conf,{baseURL:window.tmBaseUrl,id:window.tmPageId,landingPageMins:window.tmOPV||false,bootstrap:typeof tmBootStrap==="undefined"?true:window.tmBootStrap,param:window.tmParam||{}});TMAN.conf.bootstrap&&LEV.bootStrap()}TMAN.doTags=TMAN.doTags||function(f){var j=window.TMAN;if(f>=(window.tm2BootPosition||j.position.TOP_BODY)&&typeof j.conf.TM2initialised==="boolean")if(!j.conf.TM2initialised){j.conf.TM2initialised=true;LEV.bootStrap()}};
TMAN.tm2initialise=function(f){TMAN.conf.param=TMAN.conf.param||{};if(f.baseURL||f.host&&f.account){window.TMAN.conf.baseURL=f.baseURL||"//"+f.host+"/"+f.account+"/"+(f.serverCall||"tman.cgi");window.TMAN.conf.TM2initialised=f.bootstrap?false:true;if(typeof window.TMAN.Tag==="function")TMAN.addTag(f.account,new TMAN.Tag("TMAN.conf.account=TMAN._containers[0].account;TMAN.conf.id=TMAN._containers[0].id;TMAN.conf.param=TMAN._containers[0].param;window.TMAN.conf.TM2initialised=true; LEV.bootStrap();",
{position:window.tm2BootPosition||TMAN.position.TOP_BODY}))}else{TMAN.util.log("Problem with container code conf.baseURL and host/account not available","FATAL");TMAN.conf.TM2initialised=true}};
if(typeof TMAN.Container!=="function")TMAN.Container=function(f,j,h){var l=window.TMAN.conf;l.account=f||l.account;l.id=j||l.id;l.host=h.host||DEFAULT_HOST;l.tags=h.tags||[];l.async="async"in h?h.async:false;l.tagsTimeout=h.tagsTimeout||0;l.landingPageMins=h.landingPageMins||0;l.bootstrap="bootstrap"in h?h.bootstrap:true;l.enableJSCall="enableJSCall"in h?h.enableJSCall:true;l.param=l.param||{};l.serverCall=h.serverCall||l.serverCall||"tman.cgi/";TMAN.addContainer=TMAN.addContainer||function(){return true};
TMAN.tm2initialise(TMAN.container)};TMAN.addContainer=TMAN.addContainer||function(){return true};if(typeof window.TMAN.asyncLoader!=="undefined"){window.TMAN.asyncLoader();window.TMAN.asyncLoader=undefined}this.TMAN=this.TMAN||{};TMAN.MAP=function(){this.maps=[]};
TMAN.MAP.prototype={addMap:function(f){f=new TMAN.MAP.HashMap(f);this.maps[f.head.ParentCId()]=f},addMapIf:function(f,j){var h=new TMAN.MAP.HashMap(j);if(h.head.ParentCId()==f)this.maps[f]=h},search:function(f){f=TMAN.MAP.B92SHA1(f);var j,h;for(h in this.maps)if(j=this.maps[h])return j.Search(f)}};
TMAN.MAP.Head=function(f){var j;this.ok=true;this.error="";if(!(!f||f.length==0)){this.v=TMAN.B92.desmall(f.substr(0,2));if(this.v!=2){this.ok=false;this.error="Version "+this.v+" is unsupported"}else{this.hlen=TMAN.B92.desmall(f.substr(2,1));this.clen=TMAN.B92.desmall(f.substr(3,1));this.cid=TMAN.B92.desmall(f.substr(4,2));this.olen=TMAN.B92.desmall(f.substr(6,1));this.oto=TMAN.B92.desmall(f.substr(7,2));j=TMAN.B92.desmall(f.substr(9,1));this.schema=f.substr(10,j);this.maps=f.substr(10+j)}}};
TMAN.MAP.Head.prototype={Version:function(){return this.v},HashLen:function(){return this.hlen},CIdLen:function(){return this.clen},ParentCId:function(){return this.cid},OtherLen:function(){return this.olen},Maps:function(){return this.maps},OPVTO:function(){return this.oto},Schema:function(){return this.schema}};
TMAN.MAP.SHA1=function(f){function j(p,r){return p<<r|p>>>32-r}var h,l,o,s=Array(80),q=1732584193,a=4023233417,b=2562383102,c=271733878,e=3285377520,d,g,m,n;d=f.length;var k=[];for(h=0;h<d-3;h+=4){l=f.charCodeAt(h)<<24|f.charCodeAt(h+1)<<16|f.charCodeAt(h+2)<<8|f.charCodeAt(h+3);k.push(l)}switch(d%4){case 0:h=2147483648;break;case 1:h=f.charCodeAt(d-1)<<24|8388608;break;case 2:h=f.charCodeAt(d-2)<<24|f.charCodeAt(d-1)<<16|32768;break;case 3:h=f.charCodeAt(d-3)<<24|f.charCodeAt(d-2)<<16|f.charCodeAt(d-
1)<<8|128}for(k.push(h);k.length%16!=14;)k.push(0);k.push(d>>>29);k.push(d<<3&4294967295);for(f=0;f<k.length;f+=16){for(h=0;h<16;h++)s[h]=k[f+h];for(h=16;h<80;h++)s[h]=j(s[h-3]^s[h-8]^s[h-14]^s[h-16],1);l=q;d=a;g=b;m=c;n=e;for(h=0;h<80;h++){o=s[h];o=h<20?j(l,5)+(d&g|~d&m)+n+o+1518500249&4294967295:h<40?j(l,5)+(d^g^m)+n+o+1859775393&4294967295:h<60?j(l,5)+(d&g|d&m|g&m)+n+o+2400959708&4294967295:j(l,5)+(d^g^m)+n+o+3395469782&4294967295;n=m;m=g;g=j(d,30);d=l;l=o}q=q+l&4294967295;a=a+d&4294967295;b=b+
g&4294967295;c=c+m&4294967295;e=e+n&4294967295}return[q,a,b,c,e]};TMAN.MAP.B92SHA1=function(f){return TMAN.B92.encode(TMAN.MAP.SHA1(f),25)};TMAN.MAP.Map=function(f,j){if(f&&j){this.head=j;this.hash=f.substr(0,j.HashLen());this.Cid=TMAN.B92.desmall(f.substr(j.HashLen(),j.CIdLen()));this.Other=TMAN.B92.desmall(f.substr(j.HashLen()+j.CIdLen(),j.OtherLen()))}};
TMAN.MAP.Map.prototype={Hash:function(){return this.hash},ContainerId:function(){return this.Cid},Header:function(){return this.head},OncePerVisit:function(){return(this.Other&1)==1?true:false}};TMAN.MAP.HashMap=function(f){this.text=f;this.head=new TMAN.MAP.Head(this.text)};TMAN.MAP.HashMap.prototype.Search=function(f){var j=this.head,h=j.HashLen(),l=h+j.CIdLen()+j.OtherLen();f=f.substr(f.length-h);h=j.Maps();for(var o=0;;){o=h.indexOf(f,0);if(0%l==0)return new TMAN.MAP.Map(h.substr(o,l),j)}};
if ( LEVU.GC('tmStaging') ) {
    // avoid infinite loop if someone puts live template on staging or is messing around with their dns
    if (typeof(tmIncludedOnce)=='undefined') {
        var stagingMapURL = LEVU.FS('thewhitecompany.js');
        if (stagingMapURL) {            
            var stagingMapURL = stagingMapURL.src.replace( /(.*?)\/\/(.*?)\.(.*?)\// , '$1//tagstaging.$3/' );
            LEVU.WJS(stagingMapURL,1);
        } else {
            LEVU.LE('Unable to find [thewhitecompany.js]','FATAL');
        }
        var tmIncludedOnce = 1;
    }
} else {

    TMAN.MAP.Initialise = function() {

        var tmPageId = window.tmPageId;
        var tmContId = window.tmContId;
        var tmOPV    = window.tmOPV;
        
        // reverse compatibility

        if (typeof( tmPageId ) == 'undefined' && typeof( tmContId ) != 'undefined') var tmPageId = tmContId;

        if (typeof(tmPageId)!='undefined') LEVU.LE('base tmPageId='+tmPageId,'Debug');

        if (typeof(tmOPV)!='undefined') LEVU.LE('base tmOPV='+tmOPV,'Debug');

        // Initialise globals

        var searchRecords = [ LEVU.GS(document.location.toString(),2) // QA Domain
,LEVU.GS(location.pathname, 1) // Pathname Position 1
,LEVU.GS(document.location.toString(),"2,3") // Domain and Pathname 1
,document.location.toString() // Full URL
,location.pathname // Total Pathname
 ];

        if (!searchRecords) {
            LEVU.LE('No mapping rules found','Warning');
        }
        else {
            LEVU.LE("Mapping Rule Values\n" + LEVU.PR(searchRecords),'Debug');                
        }

        return searchRecords;
    }

    TMAN.MAP.mapContainer = function( searchRecords ) {

        // Unhashed data

        var Unencoded = [ {OPVTO:30,SPID:1,Maps:{"0qa.thewhitecompany.com":[7,0],"1search":[6,0],"2qa.thewhitecompany.com/search":[15,0],"2qa.thewhitecompany.com/":[14,0],"3http://qa.thewhitecompany.com/shopping-bag/":[11,0],"3http://www.thewhitecompany.com/shopping-bag/":[17,0]}},
	{OPVTO:30,SPID:3,Maps:{"0qa.thewhitecompany.com":[8,0],"1Preferences.aspx":[12,0]}},
	{OPVTO:30,SPID:13,Maps:{"4fake":[14,0]}},
	{OPVTO:30,SPID:2,Maps:{"0qa.thewhitecompany.com":[9,0]}},
	{OPVTO:30,SPID:5,Maps:{"0qa.thewhitecompany.com":[10,0]}} ];

        var i=-1;

        var tmContainer;

        // Only Search if pageId maches

        for (var j=0;j<Unencoded.length;j++) {

            var map = Unencoded[j];

            if (map["SPID"] == tmPageId) {
                i = searchRecords.length;
                LEVU.LE("Mapping string\n" + LEVU.PR(map["Maps"]),'Debug');              

                while (i > 0 && !tmContainer) {
                    i--;
                    tmContainer = map["Maps"][i+searchRecords[i].toString()];
                }
            }
        }

        if (i==-1)
            LEVU.LE('No mappings for this tmContainer','Warning');

        // update pageId and tmContainerId if matched

        if (tmContainer) {
            var sourcePageId =  tmPageId;
            tmOPV = tmContainer[1];
            tmPageId = tmContainer[0];
        }

    }

    if (tmPageId || tmContId)
    {
        var searchRecords = TMAN.MAP.Initialise();

        if ( searchRecords )
        {
            TMAN.MAP.mapContainer( searchRecords );
        }
    }
}

(function () {
	var SCOPE = getScope("support");

	function emulParam() {
		TMAN.conf = {};
		TMAN.conf.param = window.tmParam;
	}

	function getScope(strScopeName) {
		var scope;

		if (typeof TMAN === 'undefined') {
			TMAN = {};
		}

		scope = {};

		if (isTM2()) {
			// emulate TM3 param access
			emulParam();
		}

		TMAN[strScopeName] = scope;
		return scope;
	}

	function isTM2() {
		if (typeof TMAN.conf === 'undefined') {
			return true;
		}

		return false;
	}

	/*
	 * Everything below this line is attached to a global TMAN.support object.
	 */

	SCOPE.getParam = function (strVarName) {
		if (this.isParamDefined(strVarName)) {
			return TMAN.conf.param[strVarName];
		} else {
			return undefined;
		}
	};

	SCOPE.getScope = function getScope(strScopeName) {
		scope = {};
		TMAN[strScopeName] = scope;
		return scope;
	};

	SCOPE.isParamDefined = function (strVarName) {
		return typeof TMAN.conf.param[strVarName] !== 'undefined';
	};

	SCOPE.isParamValid = function (strVarName) {
		return this.isParamDefined(strVarName) && TMAN.conf.param[strVarName] !== "";
	};
})();
(function () {

	var SCOPE = TMAN.support.getScope("thewhitecompany");

	SCOPE.fireCM = function () {
		return TMAN.support.isParamValid('cm_event_id');
	};

	SCOPE.isCart = function () {
		return TMAN.support.getParam('cm_event_id') === "ADD_TO_CART";
	};

	SCOPE.fireCMCart = function () {
		return this.fireCM() && this.isCart();
	};

	SCOPE.fireCMNonCart = function () {
		return this.fireCM() && !this.isCart();
	};
})();

