How can I capture window close event?
<p>I have Ajax DHTML window. I want to redirect the page on different location when some one closed the window by clicking on cross image of window. </p>

<p>I have used following code to open window.  </p>

<pre><code>ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", popupURL, "Error Message", "width=450px,height=200px,resize=1,scrolling=1,center=1")
</code></pre>
