function getViewPortHeight() { var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); return h; }