title: how to overwrite a builtin method of javascript native objects
body: <p>Lets say we have alert method of window object. I would like to enhance it with nice alertbox.</p>
  
  <p>Also I want to save the existing alert method so that we can switch back once our application is over.</p>
  
  <p>Something like this, but its throwing error in firefox console.</p>
  
  <pre><code>window.prototype.alert = function(){
  
  }
  </code></pre>