title: Detect change of browser tabs with javascript
body: <p>is there some way of detecting using javascript that a user has switched to a different tab in the same browser window. </p>
  
  <p>Additionally is there a way to detect a user has switched to a different window than the browser?</p>
  
  <p>thank you</p>