title: How do I check if an element is really visible with JavaScript?
body: <p>In JavaScript, how would you check if an element is actually visible?</p>
  
  <p>I don't just mean checking the <code>visibility</code> and <code>display</code> attributes. I mean, checking that the element is not</p>
  
  <ul>
  <li><code>visibility: hidden</code> or <code>display: none</code></li>
  <li>underneath another element</li>
  <li>scrolled off the edge of the screen</li>
  </ul>
  
  <p>For technical reasons I can't include any scripts. I can however use <a href="http://en.wikipedia.org/wiki/Prototype_JavaScript_Framework" rel="noreferrer">Prototype</a> as it is on the page already.</p>