window.innerHeight -> doc.documentElement.clientHeight