Dialog close challenge

Dialog close challenge


I posted this before, I thought to this list... but it isn't showing
up for some reason...
I have a dialog that I need to initiate one function call when
clicking on the 'X' or 'Cancel' buttons, and a different call when
closing the dialog with javascript. I can figure out easily how to
all do the same function (with close event) or have the Cancel button
execute the function, but not the 'X'. How can I call a function when
the X is clicked to close the dialog, but not when I close it with
javascript?
Thanks,
Josh Powell