title: How to detect Win8/Metro from Javascript
body: <p>How does one detect that the environment is Windows 8 Metro application from Javascript? </p>
  
  <p>UPDATE: To clarify, my Javascript code runs both on any browser and as part of an Win8 application. Since Win8 applications impose security restrictions for JS code, I want to detect when the code is running in Win8 app.</p>