What I want is a confirm box that displays when the user closes a browser
window. It asks the infamous question "do you really want to quit" and if the
user clicks "yes" it quits, if she clicks "no" the browser window (or tab) does
not close.

I wold make the alert conditional so it only appears under some circumstances.

It this possible - probably with javascript - if at all?

thanks,

Marc