Handling in-page popup modal dialogs