Need to have a simple window 'Popup' when a user leaves my client's domain. I have tried to script an onUnLoad event and I cannot get this to work. Below is the most recent function that I have written. It is called by the onUnLoad event.

function Local() {
if(document.location != "http://www.myClientsite.com/") {
justDoIt()
}
}

The function below is called by the 'Local()' function and works just fine. I just placed it here so you could tell what is happening.

function justDoIt() {
var yum = getCookie()
if (yum == null) {
openPop(); setCookie();
}else{
return null
}


}

function openPop()
{
winAdd = window.open('pop_text.htm','pop_text','width=310,height=300,scrollbars=no,status=no,left=50,top=10') ;
}
Any input or suggestions for this is very much appreciated.
Thanks in advance.