The idea of Web design relying on any particular window size is wrong from the very beginning. You forget that the user can change the window size at any time.
Also, it's pointless (however possible) to fetch the window size using JavaScript. Instead, you should design your pages the way they automatically arrange themselves reasonably well in a wide range of sizes. Consider simplest style where you use just paragraphs, headers and other simple elements. They will arrange automatically and nicely. Why not other pages? One of the way to solve this problem would be to embrace
liquid, fluid, elastic design. Please see my past answer:
To Get Screen resolution[
^].
—SA