function whichTransitionEndEvent(){var a,b=document.createElement("fakeelement"),c={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in c)if(void 0!==b.style[a])return c[a]}function isMobileBrowser(a){var b=767,c=Math.max(document.documentElement.clientWidth,window.innerWidth||0),d=a||b;return c<=d}function readCookie(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(b))return e.substring(b.length,e.length)}return null}function createCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toGMTString()}document.cookie=a+"="+b+d+"; domain=hbr.org; path=/"}function dismissIntromercial(){var a=document.getElementById("intromercial-handle"),b=whichTransitionEndEvent(),c=function(){a.removeEventListener(b,c),a.style.display="none",document.getElementsByTagName("body")[0].style.overflow="auto"};a.addEventListener(b,c),a.style.opacity=0,void 0===b&&setTimeout(c,100)}function showIntromercial(){var a='<section id="intromercial-handle" class="backdrop-darker window-block" onClick="javascript:dismissIntromercial();">\t<div class="intromercial-container">\t\t<div class="row collapse intromercial-header">\t\t\t<div class="small-5 column">\t\t\t\t<img src="/resources/css/images/hbr_logo_shield_white.svg" alt="Harvard Business Review" class="logo"/>\t\t\t</div>\t\t\t<div class="small-7 column skip-container">\t\t\t\t<a title="Close" href="javascript:dismissIntromercial();">Go to HBR.org <i class="icon icon-caret-right"></i></a>\t\t\t</div>\t\t</div>\t\t<div>\t\t\t<div class="intromercial-close" onClick="javascript:dismissIntromercial();"></div>\t\t\t<iframe class="intromercial-iframe" style="overflow:hidden;" scrolling="no" frameborder="0" src="',b='"></iframe>\t\t</div>\t</div></section>';document.getElementsByTagName("body")[0].style.overflow="hidden";var c=isMobileBrowser()?"/resources/html/marketing/intromercial/overlay.mobile.html":"/resources/html/marketing/intromercial/overlay.html";document.write(a+c+b),setTimeout(dismissIntromercial,3e4),createCookie("marketing_interruption","overlay",.5)}function displayPopup(){showIntromercial()}window.generateIntromercial=function(){var a=document.location.href.indexOf("cm_mmc=email-_-rtb")===-1&&document.location.href.indexOf("cm_mmc=email-_-so")===-1&&document.location.href.indexOf("cm_mmc=cpc")===-1&&document.location.href.indexOf("hideIntromercial=true")===-1,b=document.querySelector("meta[name='intromercial']");if((!b||"protected"!==b.content)&&a){var c=readCookie("marketing_interruption");c||displayPopup()}};