function hideAdSlot(slotId) { var slot = document.getElementById(slotId); if(slot === null){ return; } slot.style.display = "none"; } var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; var slots_default = {}; googletag.cmd.push(function () { var width = top.innerWidth || document.documentElement.clientWidth; if (width >= 768) { slots_default['div-gpt-ad-1539613044455-0'] = googletag.defineSlot('/1003244/Leaderboard', [728,90], 'div-gpt-ad-1539613044455-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1458671257194-0'] = googletag.defineSlot('/1003244/MediumRectangle', [[300,250], [300,600]], 'div-gpt-ad-1458671257194-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1369055019821-0'] = googletag.defineSlot('/1003244/WideskyscraperLeft', [160,600], 'div-gpt-ad-1369055019821-0').addService(googletag.pubads()); slots_default['gallery-gpt-ad-1369109490338-0'] = googletag.defineSlot('/1003244/WideskyscraperRight2', [160,600], 'gallery-gpt-ad-1369109490338-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1537925991612-0'] = googletag.defineSlot('/1003244/GPT-Billboard', [[970,10], [970,250]], 'div-gpt-ad-1537925991612-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1537919785632-0'] = googletag.defineSlot('/1003244/ContentWell', [630,500], 'div-gpt-ad-1537919785632-0').setTargeting('ntvPlacement', '1093490').addService(googletag.pubads()); slots_default['div-gpt-ad-1419267094495-0'] = googletag.defineSlot('/1003244/1X1Background', [1,1], 'div-gpt-ad-1419267094495-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1537921329869-0'] = googletag.defineSlot('/1003244/BottomRail', [[300,250], [300,600]], 'div-gpt-ad-1537921329869-0').addService(googletag.pubads()); } else if ((width >= 300) && (width < 768)) { slots_default['div-gpt-ad-1517098912088-0'] = googletag.defineSlot('/1003244/MobileMedRec3', [300,250], 'div-gpt-ad-1517098912088-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1517138782277-0'] = googletag.defineSlot('/1003244/MobileMedRecMid', [[300,250], [300,600]], 'div-gpt-ad-1517138782277-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1538017037191-0'] = googletag.defineSlot('/1003244/MobileLeaderboardTop', [320,50], 'div-gpt-ad-1538017037191-0').addService(googletag.pubads()); } googletag.companionAds().setRefreshUnfilledSlots(true); googletag.pubads().set("page_url", 'https://' + window.location.hostname); googletag.pubads().enableAsyncRendering(); googletag.pubads().collapseEmptyDivs(); googletag.enableServices(); }); window.onload = function() { var width = top.innerWidth || document.documentElement.clientWidth; if (width >= 768) { hideAdSlot("div-gpt-ad-1517098912088-0"); hideAdSlot("div-gpt-ad-1517138782277-0"); hideAdSlot("div-gpt-ad-1538017037191-0"); } else if ((width >= 300) && (width < 768)) { hideAdSlot("div-gpt-ad-1539613044455-0"); hideAdSlot("div-gpt-ad-1458671257194-0"); hideAdSlot("div-gpt-ad-1369055019821-0"); hideAdSlot("gallery-gpt-ad-1369109490338-0"); hideAdSlot("div-gpt-ad-1537925991612-0"); hideAdSlot("div-gpt-ad-1537919785632-0"); hideAdSlot("div-gpt-ad-1419267094495-0"); hideAdSlot("div-gpt-ad-1537921329869-0"); } }