Global functions are methods of the window object. Even the document object (of the HTML DOM) is a property of the window object: window.document.getElementById("header"); is the same as: document.getElementById("header"); Window Size ...