code: function getPageDimensions() {
        var bttmRight = document.createElement("div");
        bttmRight.setAttribute("style" , "visibility:hidden;position:fixed;bottom:0px;right:0px;");
        document.getElementsByTagName("body")[0].appendChild(bttmRight);
        var pageWidth = bttmRight.offsetLeft;
        var pageHeight = bttmRight.offsetTop;
        bttmRight.parentNode.removeChild(bttmRight);
        return { width:pageWidth, height:pageHeight };
      }
docs: /* Figure out page (viewport) dimensions of current page, by
  putting an empty DIV in the bottom right, and checking its offset.