When you say hang, do you mean that the system simply goes unresponsive for an indefinite period of time until someone manually takes action against the dialog, or the system searches for the dialog until the timeouts are reached, at which the system errors out.
Anyway, the page works like this:
Clicking the Click Here link causes the page to display a modal window.
Clicking the close window link closes the modal window and displays a new browser window.
Clicking the Close Window link on the browser window displays a dialog box that contains an exit confirmation. Activating the Yes button will close it (and the new browser) while activating the No button aborts the close but closes the dialog.
I was facing the similar kind of error in my application. Juat a questin? Do you really want model window behaviour in child window? If yes, then i wrote simple js code which work like model window else you can simple replace it with normal window.