Ok can anyone help me out here. Here is what I have so far. If a person closes window, click home in browser, or exits the page using a link the below works fine and a popup happens.
My problem is that I also need the popup to happen if the first part of the url changes.
What I am trying to do is come up with a way to report sites that use frame breakers. SO any help would be great on this.

PHP Code:

function leave() {

if(confirm("Are You Leaving ? If so - Press OK.  Are you reporting a  Frame Breakers ? Then - Press Cancel")) {
else {
      window.open("reporter.php?user=<? print $username ?>","report","width=500,height=250");
Now I am using onunload event to trigger this.

Like I said it all works fine but not if a frame break happens.