Replace browser window with UI dialog
Replace window.confirm