Is there a javascript function that when you press the close button at the top right hand corner of your browers will prompt you and say:

Are you sure you want to close:

yes or no

Thanks.