disable Parent window on window.open and re enable on close of popup window
<p>I have a parent window where i open up a Popup window on click of a button: </p>

<pre><code>function Test() 
    {
            $("body").append('&lt;div id="modalPopUp" class="modalOverlay"&gt;');
          var popupWindow = window.open("test.aspx", 'popUpWindow', 'height=300,width=600,left=100,top=30,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');

        }
</code></pre>

<p>Right now i am able to open up popup and disable parent window, but now i want to catch close button click + click outside of popup events on Popup window, so i can remove  ModalPopUp from my body so i can re eanble parent div. How do i achieve that? </p>
