1) I don't see where you have defined the "popup" function anywhere. You need to define a function to pop a window.
2) You have to attach the "onUnload" event handler to an object.
Put this in your page header (between the <HEAD> and </HEAD> tags:
<b>
<SCRIPT LANGUAGE="Javascript">
function popup(pagesource) {
var t-this.open(pagesource,"logout","toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=400,height=425");
t.focus();
}
</SCRIPT>
</b>
Then put the "onUnload" event handler into your <BODY> tag like so:
<b><BODY onUnload="Javascript: popup('logout_samll.php');"><b>
You can play with the parms in the window open command to get whatever results you need, but that should do it for your.
-- Rich