title: javascript to overlay a modal popup that is center aligned
body: <p>want to know Simply the javascript to overlay a div on centre of the page.</p>
  
  <p>Just want to use plain java script to show and hide a div <strong>on the center of the page</strong> with "Please wait..." message and disable the background. Also this div shoud show on top of the other content of the page.</p>
  
  <p>My div looks like this  </p>
  
  <pre><code>&lt;div id='mydiv' style="display:none;" &gt;&lt;img src="myimg.gif" /&gt; Please Wait... &lt;/div&gt;
  </code></pre>
  
  <p>On click of a button , I want to show the div content center aligned on the page.</p>
  
  <p>I <strong>do not</strong> want to use jquery,extjs,,etc to achieve this.</p>
  
  <p>I have seen a few examples on the web with lot of other features added to a modal popup, just looking for something simple and clean.The bare minimum JS required to do this.</p>