On PopupWindowClose, mainpage redirect
<p>I'm working on the following scenario:</p>

<ul>
<li><p>A button got clicked in main page.</p></li>
<li><p>popupWindow show up.</p></li>
<li><p>A button got clicked in popupwindow.</p></li>
<li><p>The popupwindow would be closed and the mainpage redirect.</p></li>
</ul>

<p>How to do that?</p>
