title: Viewport size and Scrolling
body: <p>I'm trying to create a script that finds the coordinates of the top-left and the bottom-right corners of the window viewport depending on the scrolling.</p>
  
  <p>To achieve this I need the total page height/width and the amount of vertical/horizontal scrolling.</p>
  
  <p>My problem is that there are so many different properties that can be applied to <code>window</code>, <code>document</code>, <code>body</code>, ...etc. I'm not event talking about the different browsers.</p>
  
  <p>So basically my question is the following :</p>
  
  <ul>
  <li>Ho can I get the total page height/width, the viewport size and the amount of vertial/horizontal scrolling in a cross browser compatible way  without jQuery ?</li>
  </ul>
  
  <p>Thank you a lot in advance !</p>
  
  <p>I started using the answer posted here : <a href="https://stackoverflow.com/questions/3464876/javascript-get-window-x-y-position-for-scroll">JavaScript get window X/Y position for scroll</a>
  but it's just part of the whole answer I think.</p>