Can anyone help me figure out how to use this person's code?

http://www.codeproject.com/useritems/PreventClose.asp