Rewriting default browser alert, confirm and prompt functions