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 specified, it calls the onbeforeunload function.
If you try to open a new window with window.open WITHOUT disturbing the current window, the onbeforeunload gets called.
Does anyone know how to stop this? I even tried setting a variable to TRUE and check that variable in my onbeforeunload function and it still dosent work! I just need to be able to stop the execution of that method for AJAX calls and new window calls.
Thanks!