function tmgAdsGetTMGUserData(){var e={session:tmgAdsGetCookie("tmg_session"),rem:tmgAdsGetCookie("tmg_rem"),pid:tmgAdsGetCookie("tmg_pid"),p13n:tmgAdsGetCookie("tmg_p13n"),subs:tmgAdsGetCookie("tmg_subs"),subsref:tmgAdsGetCookie("tmg_subs_referer"),tmg_web_trends:{}};if(window.JSON){if(e.subs!==undefined)e.subs=JSON.parse(e.subs);if(e.subsref!==undefined)e.subsref=JSON.parse(e.subsref)}else{e.subs="unavailable";e.subsref="unavailable"}tmgAdsLog("tmgAdsGetTMGUserData ->checking to see if tmg_web_trends cookie exists");thiscookie=tmgAdsGetCookie("tmg_web_trends");if(typeof thiscookie!="undefined"){tmgAdsLog("tmgAdsGetTMGUSerData -> tmg_web_trends cookie exists: tmg_web_trends="+thiscookie);e.segs=thiscookie.split(",");for(i in e.segs){if(e.segs.hasOwnProperty(i)){var t=e.segs[i].split(":")}}}else{tmgAdsLog("tmgAdsGetWebTrendsData -> tmg_web_trends cookie does not exist")}return e}function tmgAdsGetGPTSetup(e){tmgAdsLog("Calling tmgAdsGetGPTSetup");e.setTargeting=[];e.setTargetingStr=[];e.customParams="";if(typeof tmgAds.dfp.customvars!="undefined"){tmgAdsLog("tmgAdsGetGPTSetup -> tmgAds.dfp.customvars exists - iterating through tmgAds.dfp.customvars");for(i in tmgAds.dfp.customvars){if(tmgAds.dfp.customvars.hasOwnProperty(i)&&tmgAds.dfp.customvars[i]!=""){if(tmgAds.dfp.customvars[i]instanceof Array){tmgAdsLog("tmgAdsGetGPTSetup -> adding tmgAds.dfp.customvars["+i+"] as Array()");e.setTargeting.push(".setTargeting('"+i+"',tmgAds.dfp.customvars['"+i+"'])");e.setTargetingStr+=".setTargeting('"+i+"',tmgAds.dfp.customvars['"+i+"'])"}else{if(tmgAds.dfp.customvars[i]!=null){tmgAdsLog("tmgAdsGetGPTSetup -> adding tmgAds.dfp.customvars["+i+"]="+tmgAds.dfp.customvars[i]);e.setTargeting.push(".setTargeting('"+i+"','"+tmgAds.dfp.customvars[i]+"')");e.setTargetingStr+=".setTargeting('"+i+"','"+tmgAds.dfp.customvars[i]+"')"}else{tmgAdsLog("tmgAdsGetGPTSetup -> tmgAds.dfp.customvars["+i+"] is null, omitting from tag")}}e.customParams+="&"+i+"="+tmgAds.dfp.customvars[i]}}}else{tmgAdsLog("tmgAdsGetGPTSetup -> tmgAds.dfp.customvars does not exist")}e.customParams=e.customParams.substring(1);return e}function tmgAdsGetGPTCustomVars(){tmgAdsLog("Calling tmgAdsGetGPTCustomVars");var e={};typeof tmgAds.config.about.version!="undefined"?e.ver=tmgAds.config.about.version:null;typeof tmgAds.page.section!="undefined"?e.sc=tmgAds.page.section:null;typeof tmgAds.page.pagetype!="undefined"?e.pt=tmgAds.page.pagetype:null;typeof tmgAds.page.level!="undefined"?e.lvl=tmgAds.page.level:null;typeof tmgAds.browser.biw!="undefined"?e.biw=tmgAds.browser.biw:null;typeof tmgAds.browser.bih!="undefined"?e.bih=tmgAds.browser.bih:null;typeof tmgAds.browser.language!="undefined"?e.lang=tmgAds.browser.language.toLowerCase():null;typeof tmgAds.flash.versionMaj!="undefined"?e.fv=tmgAds.flash.versionMaj:null;typeof tmgAds.config.donottrack!="undefined"?e.dnt=tmgAds.config.donottrack:null;typeof tmgAds.page.domain!="undefined"?e.rd=tmgAds.page.domain:null;typeof tmgAds.page.platform!="undefined"?e.platform=tmgAds.page.platform:null;typeof tmgAds.page.keywords!="undefined"?e.kw=tmgAds.page.keywords:null;typeof tmgAds.page.make!="undefined"?e.make=tmgAds.page.make:null;typeof tmgAds.page.model!="undefined"?e.model=tmgAds.page.model:null;typeof tmgAds.page.geo!="undefined"?e.geo=tmgAds.page.geo:null;typeof tmgAds.page.editorschoice!="undefined"?e.ec=tmgAds.page.editorschoice:null;typeof tmgAds.page.mostviewed!="undefined"?e.mv=tmgAds.page.mostviewed:null;typeof tmgAds.page.mostshared!="undefined"?e.ms=tmgAds.page.mostshared:null;typeof tmgAds.page.videosrc!="undefined"?e.vidsrc=tmgAds.page.videosrc:null;typeof tmgAds.page.articleid!="undefined"?e.pg=tmgAds.page.articleid:null;typeof tmgAds.page.refresh!="undefined"?e.refresh=tmgAds.page.refresh:null;typeof tmgAds.grapeshot!="undefined"?e.gs=tmgAds.grapeshot.segs:null;typeof tmgAds.responsive.layout!="undefined"?e.resp=tmgAds.responsive.layout:null;typeof tmgAds.page.keywords!="undefined"?e.kw=tmgAds.page.keywords:null;typeof tmgAds.adsafe.blocked!="undefined"?e.adsafe=tmgAds.adsafe.blocked:null;typeof tmgAds.tmg.tmg_web_trends.meter_viewed_count!="undefined"?e.tmgmvc=tmgAds.tmg.tmg_web_trends.meter_viewed_count:null;typeof tmgAds.tmg.subs!="undefined"?e.tmgsub="1":null;typeof tmgAds.tmg.pid!="undefined"?e.tmgpid=tmgAds.tmg.pid:null;typeof tmgAds.webtrends.id!="undefined"?e.wtid=tmgAds.webtrends.id:null;typeof tmgAds.audsci.dfp!="undefined"?e.audsci=tmgAds.audsci.dfp:null;typeof tmgAds.krux.kxuser.dfp!="undefined"?e.kxuid=tmgAds.krux.kxuser.dfp:null;typeof tmgAds.krux.kxuser.dfp!="undefined"&&tmgAds.config.krux.includeinurl==1?e.kxsid=tmgAds.krux.kxsegs.dfp:null;typeof tmgAds.urlparams.adtest!="undefined"?e.test=tmgAds.urlparams.adtest:null;tmgAds.config.refurl==1?e.refurl=tmgAds.page.url:null;return e}function tmgAdsGetResponsiveLayout(){tmgAdsLog("Calling tmgAdsGetResponsiveLayout");var e={layout:"lg"};return e}function tmgAdsGetAdsafeBlocks(){tmgAdsLog("Calling tmgAdsGetAdsafeBlocks");var e={};if(tmgAds.config.adsafe==1){tmgAdsLog("tmgAdsGetAdsafeBlocks -> tmgAds.config.adsafe = ON");if(typeof window.tmgAdsafe!="undefined"){tmgAdsLog("tmgAdsGetAdsafeBlocks -> window.tmgAdsafe exists");if(typeof window.tmgAdsafe.blocked!="undefined"){tmgAdsLog("tmgAdsGetAdsafeBlocks -> window.tmgAdsafe.blocked exists");tmgAdsLog("tmgAdsGetAdsafeBlocks -> adding tmgAdsafe data");e.blocked=window.tmgAdsafe.blocked}else{tmgAdsLog("tmgAdsGetAdsafeBlocks -> window.tmgAdsafe.blocked does not exists")}}else{tmgAdsLog("tmgAdsGetAdsafeBlocks -> window.tmgAdsafe does NOT exist")}}else{tmgAdsLog("tmgAdsGetAdsafeBlocks -> tmgAds.config.adsafe = OFF")}return e}function tmgAdsGetAudSciData(){tmgAdsLog("Calling tmgAdsGetAudSciData");var e={dfp:[],aspq:{}};var t=["ASPQ_8tTXkZ","ASPQ_dpRwf8","ASPQ_lKZUwX","ASPQ_okcFAM"];tmgAdsLog("tmgAdsGetAudSciData -> Creating AudienceScience HawkEye segements");if(tmgAds.config.audsci==1){tmgAdsLog("tmgAdsGetAudSciData -> tmgAds.config.audsci = ON");if(typeof window.asiPlacements!="undefined"){tmgAdsLog("tmgAdsGetAudSciData -> window.asiPlacements exists");for(var n in window.asiPlacements){tmgAdsLog("tmgAdsGetAudSciData -> itterating through window.asiPlacements");if(window.asiPlacements[n].hasOwnProperty("data")){window["ASPQ_"+n]=window.asiPlacements[n].data?"T":"";e.aspq[n]="T";e.dfp.push(n);tmgAdsLog("tmgAdsGetAudSciData -> AudSci segment exists, adding: ASPQ_"+n)}else{e.aspq[n]="F";tmgAdsLog("tmgAdsGetAudSciData -> AudSci segment does NOT exist: ASPQ_"+n)}}}else{tmgAdsLog("tmgAdsGetAudSciData -> window.asiPlacements does NOT exist")}}else{tmgAdsLog("tmgAdsGetAudSciData -> tmgAds.config.audsci = OFF")}return e}function tmgAdsLog(e,t,n){typeof t=="undefined"?t=0:null;typeof n=="undefined"?n="GPT.JS: ":null;if(t==0){tmgAds.config.adlog==1?tmgAds.log.push(n+e):null;tmgAds.config.adconsole==1?console.log(n+e):null;tmgAds.config.adalert==1?alert(n+e):null}else{tmgAds.log.push(n+e);console.log(n+e)}}function tmgAdsGetGeoAPI(){function e(e){tmp.api=e.coords;tmp.position=e.coords;tmp.available=1;tmp.supported=1;tmgAdsLog("tmgAdsGetGeoAPI -> GeoAPI success -> position.coords="+e.coords)}function t(e){tmp.available=0;tmp.supported=-1;tmgAdsLog("tmgAdsGetGeoAPI -> GeoAPI failed: "+e)}tmgAdsLog("Calling tmgAdsGetGeoAPI");tmp={available:0,supported:0,api:{},position:{}};if(tmgAds.config.geolocation.active==1){navigator.geolocation.getCurrentPosition(e,t);tmgAdsLog("tmgAdsGetGeoAPI -> navigator.geolocation supported in this browser")}else{tmgAdsLog("tmgAdsGetGeoAPI -> navigator.geolocation not supported in this browser")}}function tmgAdsGetKruxData(e){tmgAdsLog("Calling tmgAdsGetKruxData");tmgAds.config.krux.active==1?tmgAdsLog("tmgAdsGetKruxData -> tmgAds.config.krux.active = 1 - Krux is active for this installation",0):null;var t={};if(typeof window.localStorage!="undefined"){tmgAdsLog("tmgAdsGetKruxData -> localStorage found, using that");t.kxtype="localStorage";if(typeof window.localStorage.kxtech!="undefined"&&typeof window.localStorage.kxuser!="undefined"&&typeof window.localStorage.kxsegs!="undefined"){t.kxtype="localStorage";t.kxtech=window.localStorage.kxtech;t.kxuser={dfp:window.localStorage.kxuser};t.kxsegs={dfp:[],raw:window.localStorage.kxsegs}}else{t.kxtech=null;t.kxuser={dfp:null};t.kxsegs={dfp:[],raw:null}}}else{tmgAdsLog("tmgAdsGetKruxData -> localStorage not found, reverting to using cookies");t.kxtype="cookie";if(typeof tmgAdsGetCookie("kxtech")!="undefined"&&typeof tmgAdsGetCookie("kxuser")!="undefined"&&typeof tmgAdsGetCookie("kxsegs")!="undefined"){t.kxtech=tmgAdsGetCookie("kxtech");t.kxuser={dfp:tmgAdsGetCookie("kxuser")};t.kxsegs={dfp:[],raw:tmgAdsGetCookie("kxsegs")}}else{t.kxtech=null;t.kxuser={dfp:null};t.kxsegs={dfp:[],raw:null}}}if(t.kxsegs.raw!==null&&t.kxsegs.raw!="undefined"){t.kxsegs.segids=t.kxsegs.raw.split(",")}if(tmgAds.config.krux.includeinurl==1){tmgAdsLog("tmgAdsGetKruxData -> tmgAds.config.krux.includeinurl = 1 - realtime segments are turned on - insert the top "+tmgAds.config.krux.maxSegs+" segments into the adurls to capture realtime segs in krux",0);if(typeof t.kxsegs.segids!="undefined"){tmgAdsLog("tmgAdsGetKruxData -> tmp.segids[0] exists",0);t.kxsegs.dfp=[];for(var n=0;n<tmgAds.config.krux.maxSegs;++n){if(typeof t.kxsegs.segids[n]!="undefined"){tmgAdsLog("tmgAdsGetKruxData -> adding KruxSeg #"+(n+1)+" into URL: "+t.kxsegs.segids[n],0);t.kxsegs.dfp.push(t.kxsegs.segids[n])}}}}return t}function tmgAdsGetKruxDataOLD(e){tmgAdsLog("Calling tmgAdsGetKruxData");var t={};if(typeof window.localStorage!="undefined"){tmgAdsLog("tmgAdsGetKruxData -> localStorage found, using that");t.kxtype="localStorage";if(typeof window.localStorage.kxtech!="undefined"&&typeof window.localStorage.kxuser!="undefined"&&typeof window.localStorage.kxsegs!="undefined"){t.kxtype="localStorage";t.kxtech=window.localStorage.kxtech;t.kxuser={dfp:window.localStorage.kxuser};t.kxsegs={dfp:[],raw:window.localStorage.kxsegs}}else{t.kxtech=null;t.kxuser={dfp:null};t.kxsegs={dfp:[],raw:null}}}else{tmgAdsLog("tmgAdsGetKruxData -> localStorage not found, reverting to using cookies");t.kxtype="cookie";if(typeof tmgAdsGetCookie("kxtech")!="undefined"&&typeof tmgAdsGetCookie("kxuser")!="undefined"&&typeof tmgAdsGetCookie("kxsegs")!="undefined"){t.kxtech=tmgAdsGetCookie("kxtech");t.kxuser={dfp:tmgAdsGetCookie("kxuser")};t.kxsegs={dfp:[],raw:tmgAdsGetCookie("kxsegs")}}else{t.kxtech=null;t.kxuser={dfp:null};t.kxsegs={dfp:[],raw:null}}}if(t.kxsegs.raw!==null&&t.kxsegs.raw!="undefined"){t.kxsegs.dfp=t.kxsegs.raw.split(",")}return t}function tmgAdsGetPageData(){tmgAdsLog("Calling tmgAdsGetPageData");var e={url:location.protocol+"//"+location.host+location.pathname,url_full:location.href,referrer:document.referrer,domain:location.hostname,protocol:location.protocol,search:location.search,environment:"-"};tmgAdsGetURLParam("source",window.location.href)==="refresh"?(e.refresh=1,tmgAdsLog("tmgAdsGetPageData -> page is a refreshed page")):tmgAdsLog("tmgAdsGetPageData -> page is not refreshed");if(tmgAdsGetMetaTag("DCSext.Platform")=="mobile"){tmgAdsLog("tmgAdsGetPageData -> platform is MOBILE");e.site=tmgAdsGetMetaTag("DCSext.Channel");e.zone=tmgAdsGetMetaTag("DCSext.MLC").substr(1).replace(/\//g,".");e.section=tmgAdsGetMetaTag("DCSext.MLC").substr(1).replace(/\//g,"-");e.pagetype=tmgAdsGetMetaTag("DCSext.Content_Type");e.level=tmgAdsGetMetaTag("DCSext.Level");e.articleid=tmgAdsGetMetaTag("DCSext.articleId");e.platform=tmgAdsGetMetaTag("DCSext.Platform");e.videosrc=tmgAdsGetMetaTag("tmgads.videosrc");e.geo=tmgAdsGetMetaTag("DCSext.akamigeo");e.keywords=tmgAdsGetMetaTag("tmgads.keywords");e.make=tmgAdsGetMetaTag("tmgads.make");e.model=tmgAdsGetMetaTag("tmgads.model");e.product=tmgAdsGetMetaTag("tmgads.product");e.editorschoice=tmgAdsGetMetaTag("tmgads.editorschoice");e.mostviewed=tmgAdsGetMetaTag("tmgads.mostviewed");e.mostshared=tmgAdsGetMetaTag("tmgads.mostshared");e.otherdata=""}else{tmgAdsLog("tmgAdsGetPageData -> platform is DESKTOP");e.site=tmgAdsGetMetaTag("tmgads.channel");e.zone=tmgAdsGetMetaTag("tmgads.zone").replace(/-/g,"").replace(/_/g,"");e.section=tmgAdsGetMetaTag("tmgads.section").replace(/\./g,"-").replace(/_/g,"");e.pagetype=tmgAdsGetMetaTag("tmgads.pagetype");e.level=tmgAdsGetMetaTag("tmgads.level");e.articleid=tmgAdsGetMetaTag("tmgads.articleid");e.otherdata=tmgAdsGetMetaTag("tmgads.otherdata");e.geo=tmgAdsGetMetaTag("tmgads.geo");e.videosrc=tmgAdsGetMetaTag("tmgads.videosrc");e.platform="desktop";tmgAdsLog("tmgAdsGetPageData -> tmgads.platform metatag and DCSext.Platform not set in page, setting this to desktop");e.keywords=tmgAdsGetMetaTag("tmgads.keywords");e.make=tmgAdsGetMetaTag("tmgads.make");e.model=tmgAdsGetMetaTag("tmgads.model");e.product=tmgAdsGetMetaTag("tmgads.product");e.editorschoice=tmgAdsGetMetaTag("tmgads.editorschoice");e.mostviewed=tmgAdsGetMetaTag("tmgads.mostviewed");e.mostshared=tmgAdsGetMetaTag("tmgads.mostshared")}tmgAdsLog("tmgAdsGetMetaTag -> Fixing bad page classifications/taxonomies");if(e.section=="ece_frontpage"||e.section=="ecefrontpage"){e.section="portal"}if(e.section=="food_and_drink"||e.section=="food-and-drink"){e.section="foodanddrink"}if(e.site=="food_and_drink"||e.site=="food-and-drink"){e.site="foodanddrink"}return e}function tmgAdsGetURLParams(){tmgAdsLog("Calling tmgAdsGetURLParams");tmp={};data=window.location.href.split(/(?:,|&|#|\?)+/);data.shift();for(name in data){kvp=data[name].split("=");tmp[kvp[0]]=kvp[1];tmgAdsLog("tmgAdsgetURLParams -> Adding: "+kvp[0]+"="+kvp[1])}return tmp}function tmgAdsGetWebTrendsData(){tmgAdsLog("Calling tmgAdsGetWebTrendsData");var e={};if(tmgAds.config.webtrends==1){tmgAdsLog("tmgAdsGetWebTrendsData -> tmgAds.config.webtrends = ON");thiscookie=tmgAdsGetCookie("WT_FPC");tmgAdsLog("tmgAdsGetWebTrendsData -> checking to see if WT_FPC cookie exists");if(thiscookie!==undefined){tmgAdsLog("tmgAdsGetWebTrendsData -> WT_FPC WebTrends cookie exists: WT_FPC="+thiscookie);var e={id:"",lv:"",ss:""};e.segs=thiscookie.split(":");for(i in e.segs){if(e.segs.hasOwnProperty(i)){var t=e.segs[i].split("=");e[t[0]]=t[1]}}}else{tmgAdsLog("tmgAdsGetWebTrendsData -> WT_FPC WebTrends cookie does not exist")}}else{tmgAdsLog("tmgAdsGetWebTrendsData -> tmgAds.config.webtrends = OFF")}return e}function tmgAdsGetTMGCookies(e){tmgAdsLog("Calling tmgAdsGetTMGCookies");var t="";var n=document.cookie.split("; ");for(var r=0;r<n.length;r++){if(n[r].hasOwnProperty(r)){tmpVar=n[r].split("=");if(tmpVar[0].substr(0,7)==="tmgads_"&&tmpVar[0].length>0){t+=";ck_"+tmpVar[0].substr(7,tmpVar[0].length-7)+"="+tmpVar[1]}}}return t}function tmgAdsGetGrapeshot(){tmgAdsLog("Calling tmgAdsGetGrapeshot");if(tmgAds.config.grapeshot.active==1){tmgAdsLog("tmgAdsGetGrapeshot - tmgAds.config.grapeshot.active = ON");var e={dfp:"",segs:[]};if(typeof window.gs_channels!="undefined"){tmgAdsLog("tmgAdsGetGrapeshot - window.gs_channels exist");var t=window.gs_channels.split(",");for(var n=0;n<=t.length-1;n++){e.dfp+=";gs="+t[n].toLowerCase();e.segs.push(t[n].toLowerCase());tmgAdsLog("Getting Grapeshot value: "+t[n].toLowerCase())}}else{tmgAdsLog("tmgAdsGetGrapeshot - window.gs_channels does not exist")}}else{tmgAdsLog("tmgAdsGetGrapeshot - tmgAds.config.grapeshot.active = OFF")}return e}function tmgAdsGetUrlParam(e,t){tmgAdsLog('Calling tmgAdsGetUrlParam("'+e+'","'+t+'")');var n=decodeURI((RegExp(e+"="+"(.+?)(&|$)").exec(t)||[,null])[1]);tmgAdsLog("Checking UrlParams ["+e+"]: "+n);return n}function tmgAdsGetBrowserData(){tmgAdsLog("Calling tmgAdsGetBrowserData");var e={};for(var t in navigator){var n=navigator[t];if(typeof navigator[t]!="object"){e[t]=n}}if(document.all){tmgAdsLog("tmgAdsGetBrowserData -> document.all exists");e.biw=document.documentElement.offsetWidth;e.bih=document.documentElement.offsetHeight}else{tmgAdsLog("tmgAdsGetBrowserData -> document.all does not exists");e.biw=window.innerWidth;e.bih=window.innerHeight}return e}function tmgAdsFlashDetect(){tmgAdsLog("Calling tmgAdsFlashDetect");var e;FlashDetect=new function(){var e=this;e.installed=false;e.raw="";e.major=-1;e.minor=-1;e.revision=-1;e.revisionStr="";var t=[{name:"ShockwaveFlash.ShockwaveFlash.7",version:function(e){return n(e)}},{name:"ShockwaveFlash.ShockwaveFlash.6",version:function(e){var t="6,0,21";try{e.AllowScriptAccess="always";t=n(e)}catch(r){}return t}},{name:"ShockwaveFlash.ShockwaveFlash",version:function(e){return n(e)}}];var n=function(e){var t=-1;try{t=e.GetVariable("$version")}catch(n){}return t};var r=function(e){var t=-1;try{t=new ActiveXObject(e)}catch(n){t={activeXError:true}}return t};var s=function(e){var t=e.split(",");return{raw:e,major:parseInt(t[0].split(" ")[1],10),minor:parseInt(t[1],10),revision:parseInt(t[2],10),revisionStr:t[2]}};var o=function(e){var t=e.split(/ +/);var n=t[2].split(/\./);var r=t[3];return{raw:e,major:parseInt(n[0],10),minor:parseInt(n[1],10),revisionStr:r,revision:u(r)}};var u=function(t){return parseInt(t.replace(/[a-zA-Z]/g,""),10)||e.revision};e.majorAtLeast=function(t){return e.major>=t};e.minorAtLeast=function(t){return e.minor>=t};e.revisionAtLeast=function(t){return e.revision>=t};e.versionAtLeast=function(t){var n=[e.major,e.minor,e.revision];var r=Math.min(n.length,arguments.length);for(i=0;i<r;i++){if(n[i]>=arguments[i]){if(i+1<r&&n[i]==arguments[i]){continue}else{return true}}else{return false}}};e.FlashDetect=function(){if(navigator.plugins&&navigator.plugins.length>0){var n="application/x-shockwave-flash";var i=navigator.mimeTypes;if(i&&i[n]&&i[n].enabledPlugin&&i[n].enabledPlugin.description){var u=i[n].enabledPlugin.description;var a=o(u);e.raw=a.raw;e.major=a.major;e.minor=a.minor;e.revisionStr=a.revisionStr;e.revision=a.revision;e.installed=true}}else if(navigator.appVersion.indexOf("Mac")==-1&&window.execScript){var u=-1;for(var f=0;f<t.length&&u==-1;f++){var l=r(t[f].name);if(!l.activeXError){e.installed=true;u=t[f].version(l);if(u!=-1){var a=s(u);e.raw=a.raw;e.major=a.major;e.minor=a.minor;e.revision=a.revision;e.revisionStr=a.revisionStr}}}}}()};if(FlashDetect.installed){e={versionMaj:FlashDetect.major,versionMin:FlashDetect.minor,versionRev:FlashDetect.revision,versionRaw:FlashDetect.raw}}else{e={versionMaj:0,versionMin:0,versionRev:0,versionRaw:"none"}}return e}function tmgAdsSerializeArray(e){tmgAdsLog("Calling tmgAdsSerializeArray");var t=function(e){var t=0,n=0,r=e.length,i="";for(n=0;n<r;n++){i=e.charCodeAt(n);if(i<128){t+=1}else if(i<2048){t+=2}else{t+=3}}return t};var n=function(e){var t=typeof e,n;var r;if(t==="object"&&!e){return"null"}if(t==="object"){if(!e.constructor){return"object"}var i=e.constructor.toString();n=i.match(/(\w+)\(/);if(n){i=n[1].toLowerCase()}var s=["boolean","number","string","array"];for(r in s){if(i==s[r]){t=s[r];break}}}return t};var r=n(e);var i,s="";switch(r){case"function":i="";break;case"boolean":i="b:"+(e?"1":"0");break;case"number":i=(Math.round(e)==e?"i":"d")+":"+e;break;case"string":i="s:"+t(e)+':"'+e+'"';break;case"array":case"object":i="a";var o=0;var u="";var a;var f;for(f in e){if(e.hasOwnProperty(f)){s=n(e[f]);if(s==="function"){continue}a=f.match(/^[0-9]+$/)?parseInt(f,10):f;u+=this.tmgAdsSerializeArray(a)+this.tmgAdsSerializeArray(e[f]);o++}}i+=":"+o+":{"+u+"}";break;case"undefined":default:i="N";break}if(r!=="object"&&r!=="array"){i+=";"}return i}function tmgAdsGetMetaTag(e){tmgAdsLog("Calling tmgAdsGetMetaTag("+e+")");var t=null;if(document.getElementsByName(e)[0]!=null&&document.getElementsByName(e)[0]!="undefined"){tmgAdsLog("tmgAdsGetMetaTag("+e+") -> document.getElementsByName('"+e+"')[0] exists");if(document.getElementsByName(e)[0].content.length>0){t=document.getElementsByName(e)[0].content.toLowerCase();tmgAdsLog("tmgAdsGetMetaTag("+e+') -> "'+t+'"')}if(e=="tmgads.keywords"){t=t.split(",");for(var n=0;n<t.length;n++){t[n]=t[n].trim();tmgAdsLog("tmgAdsGetMetaTag("+e+') -> tmgads.keywords -> "'+t[n]+'"')}}}else{tmgAdsLog("tmgAdsGetMetaTag("+e+") -> document.getElementsByName('"+e+"')[0] does not exist")}return t}function tmgAdsGetURLParam(e,t){tmgAdsLog('Calling tmgAdsGetURLParam("'+e+'","'+t+'")');e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&#]"+e+"=([^&#]*)"),r=n.exec(t);var i=(new Date).getTime();return r==null?"":decodeURIComponent(r[1].replace(/\+/g," "))}function tmgAdsGetCookie(e){tmgAdsLog("Calling tmgAdsGetCookie("+e+")");var t,n,r,i,s=document.cookie.split(";");for(n=0;n<s.length;n++){r=s[n].substr(0,s[n].indexOf("="));i=s[n].substr(s[n].indexOf("=")+1);r=r.replace(/^\s+|\s+$/g,"");if(r==e){t=unescape(i)}}return t}function tmgAdsSetCookie(e,t,n,r){tmgAdsLog('Calling tmgAdsSetCookie("'+e+'","'+t+'","'+n+'","'+r+'")');var i=e+"="+escape(t);if(n){var s=new Date;var o=s.getTime();o+=n*3600*1e3;s.setTime(o);expires=";expires="+s.toGMTString()}else{expires=""}var u=";path=/";if(typeof r=="undefined"){var a=""}else{var a=";domain="+r}var f=i+expires+u+a;document.cookie=f}function tmgAdsTimer(){var e=new Date;return Number(e)}function tmgAdsGetDoNotTrack(){tmgAdsLog("Calling tmgAdsGetDoNotTrack");var e;if(navigator.doNotTrack=="unspecified"||navigator.doNotTrack==1||navigator.doNotTrack=="yes"){tmgAdsLog("tmgAdsGetDoNotTrack -> using the navigator.doNotTrack method");e=navigator.doNotTrack}if(navigator.msDoNotTrack){tmgAdsLog("tmgAdsGetDoNotTrack -> using the navigator.msDoNotTrack method");e=navigator.msDoNotTrack}if(typeof e=="undefined")e=0;if(e=="unspecified")e=0;if(e=="no")e=0;if(e=="yes")e=1;return e}function tmgAdsBuildAdTagGetSizes(e,t,n){tmgAdsLog("Calling tmgAdsBuildAdTagGetSizes("+e+","+t+","+n+")");var r="";switch(e){case"ban":r="[[728,90],[900,250],[940,250],[970,90],[970,250]]";n=="babb"?r="[728,90]":null;break;case"ldb":r="[[728,90],[900,250],[940,250],[970,90],[970,250]]";break;case"mpu":r="[[300,250],[300,600],[336,280]]";break;case"hpg":r="[[120,600],[160,600],[300,250],[300,600],[336,280]]";break;case"sks":r="[[120,600],[160,600]]";break;case"skl":r="[[120,600],[160,600]]";break;case"inr":r="[1,1]";break;case"tmg":r="[1,1]";break;case"ftr":r="[1,1]";break;case"car":r="[300,250]";break;case"yel":r="[3,3]";break;case"mob":r="[[300,50],[320,50],[300,250]]";n=="babb"?r="[[300,50],[320,50]]":null;break;case"ins":r="[5,5]";break;case"pp":r="[7,7]";break;case"vid":t=="620x415"?r="[620,415]":null;t=="300x235"?r="[300,235]":null;if(t!="300x235"&&t!="620x415"){r="[620,415]";tmgAdsLog("WARNING: Video sizes has not be set, setting this as default 620x415: adtype["+e+"] sizes["+t+"]")}break;default:tmgAdsLog("WARNING: AdType not understood, no 'group' sizes available for this ad: "+e);break}r!=""?tmgAdsLog("tmgAdsBuildAdTagGetSizes("+e+") ->"+r):false;return r}function tmgAdsBuildAdTag(e,t,n,r,s,o,u){tmgAdsLog('Calling tmgAdsBuildAdTag("'+e+'","'+t+'","'+n+'","'+r+'","'+s+'")');var a={tile:function(){++tmgAds.dfp.tile;return tmgAds.dfp.tile}(),adslot:e.split(","),sizes:t.split(","),thisad:e.split(",")[0].substr(0,3),sz:tmgAdsBuildAdTagGetSizes(e.split(",")[0].substr(0,3),t,tmgAds.page.site),type:n,extra:{data:r,vars:{},dfp:""},style:s,refresh:o,refreshtime:u};if(a.extra.data.length>0){a.extra.tmp=a.extra.data.split(";");for(i in a.extra.tmp){if(a.extra.tmp[i].length>0){thisvar=a.extra.tmp[i].split("=");a.extra.vars[thisvar[0]]=thisvar[1];a.extra.dfp+="&"+thisvar[0]+"="+thisvar[1];tmgAdsLog("tmgAdsBuildAdTag -> extra custVars set in function call, creating them now -> "+thisvar[0]+"="+thisvar[1])}}}tmgAds.performance[a.tile]={};tmgAds.ads[a.tile]=a;if(a.thisad!="nat"&&a.thisad!="vid"&&a.thisad!="ins"){a.tag="";a.id_div="tmgads-dfp-gpt-div-"+a.tile+"-"+a.thisad;if(tmgAds.page.pagetype!="gallery"&&tmgAds.page.platform=="desktop"||tmgAds.page.platform=="mobile"){tmgAds.config.admethod.method!="sync"&&tmgAds.config.admethod.method!="async"?tmgAdsLog("tmgAdsBuildAdTag -> No GPT Sync method chosen - broken ad"):null;if(tmgAds.config.admethod.method=="sync"){tmgAdsLog('tmgAdsBuildAdTag -> "sync" ad format chosen');a.tag+="  <scr"+'ipt type="text/javascript">\n';if(tmgAds.config.geolocation.active==1&&tmgAds.geo.available==1&&tmgAds.geo.supported==1){a.tag+="    googletag.setLocation(tmgAds.geo.api.longitude,tmgAds.geo.api.latitude,tmgAds.geo.api.accuracy);\n"}if(a.thisad=="ftr"||a.thisad=="inr"||a.thisad=="tmg"){tmgAdsLog("tmgAdsBuildAdTag -> Defining this unit as an out-of-page unit/interstitial, no size ste against these");a.tag+="    googletag.defineOutOfPageSlot('"+tmgAds.dfp.adunit+"','"+a.id_div+"')\n"}else{a.tag+="    googletag.defineSlot('"+tmgAds.dfp.adunit+"',"+a.sz+",'"+a.id_div+"')\n"}a.tag+="             .addService(googletag.pubads())\n";a.tag+="             .setTargeting('at','"+a.thisad+"')\n";tmgAdsLog("tmgAdsBuildAdTag -> setting 'at' (adtype) to: "+a.thisad);a.tag+="             .setTargeting('pos','"+a.tile+"')\n";for(var f in tmgAds.dfp.gpt.setTargeting){if(tmgAds.dfp.gpt.setTargeting.hasOwnProperty(f)){a.tag+="             "+tmgAds.dfp.gpt.setTargeting[f]+"\n"}}for(key in a.extra.vars){if(a.extra.vars.hasOwnProperty(key)){tmgAdsLog("tmgAdsBuildAdTag -> setting extra params for this call -> "+key+"="+a.extra.vars[key]);a.tag+="             .setTargeting('"+key+"','"+a.extra.vars[key]+"')\n"}}a.tag=a.tag.trim();a.tag+=";\n";a.tag+="    googletag.pubads().enableSyncRendering();\n";if(tmgAds.config.admethod.method!="sync"&&tmgAds.config.admethod.method!="async"){tmgAdsLog("tmgAdsBuildAdTag -> No GPT Sync method chosen - broken ad")}a.tag+="    googletag.enableServices();\n";a.tag+="    googletag.display('"+a.id_div+"');\n";a.tag+="  </scr"+"ipt>\n"}else{tmgAdsLog('tmgAdsBuildAdTag -> "async" ad format chosen');a.tag+="  <scr"+"ipt type='text/javascript'>\n";a.tag+="    googletag.cmd.push(function(){\n";if(tmgAds.config.geolocation.active==1&&tmgAds.geo.available==1&&tmgAds.geo.supported==1){a.tag+="    googletag.setLocation(tmgAds.geo.api.longitude,tmgAds.geo.api.latitude,tmgAds.geo.api.accuracy);\n"}a.tag+="      googletag.defineSlot('"+tmgAds.dfp.adunit+"',"+a.sz+",'"+a.id_div+"').addService(googletag.pubads())\n";for(i in tmgAds.dfp.gpt.setTargeting){a.tag+="      "+tmgAds.dfp.gpt.setTargeting[i]+"\n"}a.tag+="      .setTargeting('pos','"+a.tile+"');\n";a.tag+="    googletag.display('"+a.id_div+"');\n";if(o==1){a.tag+="    googletag.pubads().addEventListener('slotRenderEnded', function(event) {\n";a.tag+="      console.log('AdTech: SlotID:'+event.slot.b.d+' - CreativeID:'+event.creativeId+' - Size:'+event.size[0]+'x'+event.size[1]);\n";a.tag+="      tmgAdsStartRefreshCountdown(event.slot.b.d,refreshtime);\n";a.tag+="    });\n"}a.tag+="  });\n";a.tag+="  </scr"+"ipt>\n";tmgAds.ads[a.tile]=a}}else{a.tag+="<scr"+'ipt type="text/javascript" src="';a.tag+=tmgAds.page.protocol+"//";a.tag+=tmgAds.dfp.adserver+"/";a.tag+="N"+tmgAds.dfp.networkid+"/adj/";a.tag+=tmgAds.dfp.sitezone;for(var f in tmgAds.dfp.customvars){if(tmgAds.dfp.customvars.hasOwnProperty(f)){if(typeof tmgAds.dfp.customvars[f]!="null"&&typeof tmgAds.dfp.customvars[f]!="array"){a.tag+=";"+f+"="+tmgAds.dfp.customvars[f]}}}a.data={extra:r};a.tag+=a.data.extra;a.tag+=";pos="+tmgAds.dfp.tile;switch(a.thisad){case"ban":a.legacytagsize=";sz=728x90,900x250,940x250,970x90,970x250";break;case"ldb":a.legacytagsize=";sz=728x90,900x250,940x250,970x90,970x250";break;case"mpu":a.legacytagsize=";sz=300x250,300x600,336x280";break;case"hpg":a.legacytagsize=";sz=120x600,160x600,300x250,300x600,336x280";break;case"sks":a.legacytagsize=";sz=120x600,160x600";break;case"skl":a.legacytagsize=";sz=120x600,160x600";break;case"tmg":a.legacytagsize=";sz=1x1;dcopt=ist";break;case"inr":a.legacytagsize=";sz=1x1;dcopt=ist";break;case"ftr":a.legacytagsize=";sz=1x1;dcopt=ist";break;case"yel":a.legacytagsize=";sz=7x7";break;case"mob":a.legacytagsize=";sz=300x50,320x50,300x250";break}a.tag+=a.legacytagsize;a.tag+=";tile="+tmgAds.dfp.tile+";ord="+tmgAds.dfp.ord+"?";a.tag=a.tag.replace(/\&/g,";");a.tag+='"></scr'+"ipt>\n"}if(tmgAds.config.performance==1&&tmgAds.config.admethod.method=="sync"){a.tag="  <scr"+'ipt type="text/javascript">\n'+"    tmgAds.performance["+a.tile+"] = {};\n"+"    tmgAds.performance["+a.tile+"].adtype = '"+a.thisad+"';\n"+"    tmgAds.performance["+a.tile+"].begin = tmgAdsTimer();\n"+"  </scr"+"ipt>\n"+a.tag+"  <scr"+'ipt type="text/javascript">\n'+"    tmgAds.performance["+a.tile+"].finish= tmgAdsTimer();\n"+"    tmgAds.performance["+a.tile+"].time  = tmgAds.performance["+a.tile+"].finish - tmgAds.performance["+a.tile+"].begin;\n"+"    tmgAds.performance.adTotal     += tmgAds.performance["+a.tile+"].time;\n"+"    tmgAds.performance.adAvg        = tmgAds.performance.adTotal/"+a.tile+";\n"+"    tmgAds.performance.adCount      = "+a.tile+";\n"+"    tmgAdsLog('tmgAdsBuildAdTag -> This ad ["+a.thisad+"] took: '+(tmgAds.performance["+a.tile+"].time/1000)+'s to render');\n"+"  </scr"+"ipt>\n"}a.tag='<div id="'+a.id_div+'">\n'+a.tag+"</div>\n";tmgAdsLog("tmgAdsBuildAdTag -> This Ad: \n"+a.tag);tmgAds.ads[a.tile]=a}if(a.thisad=="vid"){a.tag="http://pubads.g.doubleclick.net/gampad/ads?sz="+t+"&iu="+tmgAds.dfp.adunit+"&ciu_szs&impl=s&gdfp_req=1&env=vp&output="+tmgAds.config.video.dfpvastoutput+"&unviewed_position_start=1&url="+encodeURIComponent(tmgAds.page.url)+"&cust_params="+encodeURIComponent(tmgAds.dfp.gpt.customParams+a.extra.dfp+"&at="+a.thisad+"&pos="+a.tile)+"&correlator="+tmgAds.dfp.ord;tmgAdsLog("Video/VAST ad: '"+a.thisad+"' "+a.tag)}if(a.thisad=="ins"){a.tag="http://pubads.g.doubleclick.net/gampad/adx?sz=1x1&iu="+tmgAds.dfp.adunit+"&url="+encodeURIComponent(tmgAds.page.url)+"&t="+encodeURIComponent(tmgAds.dfp.gpt.customParams+a.extra.dfp+"&at="+a.thisad+"&pos="+a.tile)+"&m=application/javascript&tile="+a.tile+"&c="+tmgAds.dfp.ord;tmgAdsLog("tmgAdsBuildAdTag -> Inskin ad: '"+a.thisad+"' "+a.tag)}if(a.thisad=="nat"){a.tag=null;tmgAdsLog("tmgAdsBuildAdTag -> Polar.me, native ad. This is now handled directly using their library to access GPT directly:")}if(tmgAds.config.adkill==1){a.tag="<!--// AD REMOVED AS ADKILL HAS BEEN INVOKED - //-->";tmgAdsLog("tmgAdsBuildAdTag -> adkill=on, ad removed due to adkill being turned on: tile="+a.tile+" adslot="+a.adslot+" size="+a.sz+" type="+a.type)}a.tag=a.tag.replace(/(\r\n|\n|\r)/gm,"");return a.tag}function tmgAdsOnPageLoad(){tmgAdsLog("Calling tmgAdsOnPageLoad");if(typeof window.performance!="undefined"&&tmgAds.config.performance==1){tmgAdsLog("tmgAdsOnPageLoad -> fetching window.performance data");for(var e in performance.timing){var t=performance.timing[e];if(typeof performance.timing[e]!="object"){tmgAds.performance[e]=t}}}else{if(typeof window.performance=="undefined"){tmgAdsLog("tmgAdsOnPageLoad -> window.performance NOT supported by this browser.")}if(tmgAds.config.performance==1){tmgAdsLog("tmgAdsOnPageLoad -> window.performance reporting has been disabled.")}}if(tmgAds.config.adblockcheck.active==1){console.log("gpt.js -> pageLoad - Checking AdBlock, Adblock installed="+tmgAds.config.adblockcheck.installed)}}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.ltrim=function(){return this.replace(/^\s+/,"")};String.prototype.rtrim=function(){return this.replace(/\s+$/,"")};var tmgAdsGPTMethod=tmgAdsGPTMethod||{method:"sync",style:"inline"};try{(function(){tmgAds={};tmgAds.log=[];tmgAds.ads={};tmgAds.data={};tmgAds.performance={adTotal:0,adAvg:0,adCount:0};tmgAds.config={about:{version:"1.59",date:"2015-01-28",company:"Telegraph Media Group",author:"Sean Dillon - sean@telegraph.co.uk"},admethod:tmgAdsGPTMethod,adkill:0,adlog:0,adconsole:0,adalert:0,adsafe:0,adblockcheck:{active:0,installed:"yes"},closedivs:1,audsci:1,refurl:0,geolocation:{active:0,precision:2e4,watching:0,test:"string"},performance:1,webtrends:1,tmgcookies:1,chartbeat:0,grapeshot:{active:1,maxSegs:1},quantcast:{active:1,maxSegs:10},krux:{active:1,includeinurl:1,maxSegs:10},video:{active:0,skipAdTimeOut:20,dfpvastoutput:"xml_vast3"},keywords:{active:1,maxKeywords:10}};tmgAds.config.donottrack=tmgAdsGetDoNotTrack();tmgAds.urlparams=tmgAdsGetURLParams();tmgAds.urlparams.adlog==1?(tmgAds.config.adlog=1,tmgAdsLog("urlParam 'adlog' is set, setting tmgAds.config.adlog=1")):tmgAdsLog("urlParam 'adlog' not set");tmgAds.urlparams.adsafe==1?(tmgAds.config.adsafe=1,tmgAdsLog("urlParam 'adsafe' is set, setting tmgAds.config.adsafe=1")):tmgAdsLog("urlParam 'adsafe' not set");tmgAds.urlparams.adalert==1?(tmgAds.config.adalert=1,tmgAdsLog("urlParam 'adalert' is set, setting tmgAds.config.adalert=1")):tmgAdsLog("urlParam 'adalert' not set");tmgAds.urlparams.adconsole==1?(tmgAds.config.adconsole=1,tmgAdsLog("urlParam 'adconsole' is set, setting tmgAds.config.adconsole=1")):tmgAdsLog("urlParam 'adconsole' not set");tmgAds.urlparams.adkill==1?(tmgAds.config.adkill=1,tmgAdsLog("urlParam 'adkill' is set, setting tmgAds.config.adkill=1")):tmgAdsLog("urlParam 'adkill' not set");tmgAds.urlparams.adgeo==1?(tmgAds.config.geolocation.active=1,tmgAdsLog("urlParam 'adgeo' is set, setting tmgAds.config.geolocation.active=1")):tmgAdsLog("urlParam 'adgeo' not set");tmgAds.urlparams.admethod=="async"?(tmgAds.config.admethod.method="async",tmgAdsLog("urlParam 'admethod' is set to async, setting tmgAds.config.admethod.method=async")):tmgAdsLog("urlParam 'admethod' not set");tmgAdsLog("gpt.js version = "+tmgAds.config.about.version+" ["+tmgAds.config.about.date+"]");tmgAds.page=tmgAdsGetPageData();tmgAds.tmg=tmgAdsGetTMGUserData();tmgAds.krux=tmgAdsGetKruxData(tmgAds.config.krux.maxSegs);tmgAds.webtrends=tmgAdsGetWebTrendsData();tmgAds.grapeshot=tmgAdsGetGrapeshot(tmgAds.config.grapeshot.maxSegs);tmgAds.responsive=tmgAdsGetResponsiveLayout();tmgAds.browser=tmgAdsGetBrowserData();tmgAds.flash=tmgAdsFlashDetect();tmgAds.cookies={all:document.cookie};tmgAds.cookies.adops=tmgAdsGetTMGCookies("adops");tmgAds.adsafe=tmgAdsGetAdsafeBlocks();tmgAds.audsci=tmgAdsGetAudSciData();tmgAds.dfp={gpt:{setLocation:0,enableAsyncRendering:0,enableSingleRequest:0,collapseEmptyDivs:0,responsivesite:0},tile:0,adserver:"ad.doubleclick.net",networkid:"6582",site:tmgAds.page.site,sitename:"tmg.telegraph."+tmgAds.page.site,zonename:tmgAds.page.zone.substr(0,100),sitezone:"tmg.telegraph."+tmgAds.page.site+"/"+tmgAds.page.zone.substr(0,100),ord:Number(new Date)};tmgAds.geo=tmgAdsGetGeoAPI();tmgAds.dfp.adunit="/"+tmgAds.dfp.networkid+"/"+tmgAds.dfp.sitezone;tmgAds.dfp.customvars=tmgAdsGetGPTCustomVars();tmgAds.dfp.gpt=tmgAdsGetGPTSetup(tmgAds.dfp.gpt);tmgAds.responsive={viewport:{width:document.documentElement.clientWidth,dpr:window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI||1,mediaQueriesBreakpoints:{xs:480,sm:768,md:992,lg:1310},containerSizes:{sm:740,md:960,lg:1280}},onresize:function(){tmgAds.responsive.viewport.width=tmgAds.responsive.getViewportWidth();tmgAds.responsive.viewport.mediaQuery=tmgAds.responsive.getMediaQuery();tmgAdsLog("Responsive - browser resized: width:"+tmgAds.responsive.viewport.width+" - mediaQuery:"+tmgAds.responsive.viewport.mediaQuery)},addEvent:function(e,t,n){if(e==null||e=="undefined")return;if(e.addEventListener){e.addEventListener(t,n,false)}else if(e.attachEvent){e.attachEvent("on"+t,n)}else{e["on"+t]=n}},getViewportWidth:function(){if(document.documentElement.clientWidth>=0){return document.documentElement.clientWidth}else if(document.body&&document.body.clientWidth>=0){return document.body.clientWidth}else if(window.innerWidth>=0){return window.innerWidth}else{return 0}},getMediaQuery:function(){var e=this,t="xxs",n,r=e.viewport.width||e.getViewportWidth();for(n in e.viewport.mediaQueriesBreakpoints){if(r>=e.viewport.mediaQueriesBreakpoints[n]){t=n}else{break}}return t}};tmgAds.responsive.onresize();tmgAds.responsive.addEvent(window,"resize",tmgAds.responsive.onresize);if(tmgAds.config.adblockcheck.active==1){var e=document.createElement("script");e.type="text/javascript";e.src="http://s.telegraph.co.uk/tmgads/adblock/ads.js";document.body.appendChild(e)}if(tmgAds.config.admethod.method=="async"){tmgAdsLog("Async method chosen, we're going to set some stuff up now.");googletag.cmd.push(function(){googletag.pubads().enableAsyncRendering();tmgAds.config.closedivs==1?googletag.pubads().collapseEmptyDivs():null;googletag.enableServices()});tmgAdsLog("    :- googletag.pubads().enableAsyncRendering();");tmgAds.config.closedivs==1?tmgAdsLog("    :- googletag.pubads().collapseEmptyDivs();"):null;tmgAdsLog("    :- googletag.enableServices();");tmgAdsLog("Completed setting up Async requirements.")}tmgAdsLog("Successfully instantiated the tmgAds object - gpt.js v:"+tmgAds.config.about.version)})()}catch(err){tmgAdsLog("Could not instantiate the tmgAds Object. ERROR: "+err+" - Original LineNumber:"+err.lineNumber)}(function(){var e=document.addEventListener||document.attachEvent,t=document.removeEventListener||document.detachEvent,n=document.addEventListener?"DOMContentLoaded":"onreadystatechange";e.call(document,n,function(){tmgAdsLog("gpt.js -> pageLoad - creating an event listener for page load outside of jQuery");if(n==="DOMContentLoaded"||n==="onreadystatechange"&&document.readyState==="complete"){tmgAdsLog("gpt.js -> pageLoad - Page has loaded, now kicking off our onPageLoad code");tmgAdsOnPageLoad();tmgAdsLog("gpt.js -> pageLoad - Page has loaded, removing the onPageLoad event listener as no longer needed");t(n,arguments.callee,false)}},false)})()