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-1511285456321-0'] = googletag.defineSlot('/1003244/Leaderboard', [728,90], 'div-gpt-ad-1511285456321-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['div-gpt-ad-1369109490338-0'] = googletag.defineSlot('/1003244/WideskyscraperRight2', [160,600], 'div-gpt-ad-1369109490338-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1453237323630-0'] = googletag.defineSlot('/1003244/GPT-Billboard', [[970,10], [970,250]], 'div-gpt-ad-1453237323630-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1513607923349-0'] = googletag.defineSlot('/1003244/ContentWell', [630,500], 'div-gpt-ad-1513607923349-0').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-1418735985005-0'] = googletag.defineSlot('/1003244/BottomRail', [[300,250], [300,600]], 'div-gpt-ad-1418735985005-0').addService(googletag.pubads()); } else if ((width >= 300) && (width < 768)) { slots_default['div-gpt-ad-1517138951982-0'] = googletag.defineSlot('/1003244/MobileMedRec3', [300,250], 'div-gpt-ad-1517138951982-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-1423658457123-0'] = googletag.defineSlot('/1003244/MobileLeaderboardTop', [320,50], 'div-gpt-ad-1423658457123-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-1517138951982-0"); hideAdSlot("div-gpt-ad-1517138782277-0"); hideAdSlot("div-gpt-ad-1423658457123-0"); } else if ((width >= 300) && (width < 768)) { hideAdSlot("div-gpt-ad-1511285456321-0"); hideAdSlot("div-gpt-ad-1458671257194-0"); hideAdSlot("div-gpt-ad-1369055019821-0"); hideAdSlot("div-gpt-ad-1369109490338-0"); hideAdSlot("div-gpt-ad-1453237323630-0"); hideAdSlot("div-gpt-ad-1513607923349-0"); hideAdSlot("div-gpt-ad-1419267094495-0"); hideAdSlot("div-gpt-ad-1418735985005-0"); } }