var percentScrolled;window.onscroll=function(){var b=window.innerHeight||(document.documentElement||document.body).clientHeight,a=document.body,c=document.documentElement;a=Math.max(a.scrollHeight,a.offsetHeight,c.clientHeight,c.scrollHeight,c.offsetHeight);b=a-b;a=pageYOffset;window.percentScrolled=Math.round(a/b*100)};