title: Alerts when navigating away from a web page
body: <p>When I try to close my Google docs tab with unsaved changes, this is what I get in my browser (FF 3.5). </p>
  
  <blockquote>
    <p>Are you sure you want to navigate away
    from this page?</p>
    
    <p>You have unsaved changes in this
    document. Click Cancel now, then
    'Save' to save them. Click OK now to
    discard them.</p>
    
    <p>Press OK to continue, or Cancel to
    stay on the current page.</p>
  </blockquote>
  
  <p>My question is whether such alerts are part of the web app (gdocs for eg.) or are they given out by the browser? If latter, how is this done? </p>