Help modify onbeforeunload function

I want to change the default confirm dialog of onbeforeunload by another dialog ?
thank all!