Use document.body.scrollTop rather than document.documentElement.scrollTop to make it work in Chrome stable.