title: Is there any way to detect that window is currently active in IE8?
body: <p>Is there any way to detect that the window is currently active (is being shown on active tab/window) in IE8?</p>
  
  <p>I know there are events like <code>onfocusin</code>/<code>onfocus</code> - but this is not a perfect solution, since the window must also receive focus for the event to be fired - so this does not work when the user just switches the tabs without touching the window itself.</p>
  
  <p>I believe there has to be some simple, elegant solution for such ordinary use-case.</p>