javascript pass parameter as object or something like that
<p>I want to create a class like "<code>MessageBox</code>". On calling the <code>Show()</code> function I will pass the required parameters. Like:</p>

<pre><code>MessageBox.Show(
{
  str : "Are you sure?",
  onYes : function(){
   //do something
  },
  onNo: function(){
   // Do another stuff
  }
});
</code></pre>

<p>What I tried:</p>

<pre><code>var MessageBox = {
  Show : function(){ // I stuck here
   }
}
</code></pre>

<p>Let's suppose within the show the JavaScript <code>confirm()</code> function is being called.</p>
