Ok, I have spent a while on this problem and this is what I have gathered:
If you make an AJAX call in IE7 and you have a window.onbeforeunload function spe
Another and probably simpler option is to return false when you open the popup:
my link
This seems to stop IE from thinking you're leaving the page and triggering the event. All the other options weren't particularly viable for me.