I don't really have time to knock up a script for you but hopefully the following info will help you to do it yourself:
There is a window.onMove event handler, but the last time I checked it was only supported by NS4. To use it in NS4 you would need to have a function in which you first open your pup-up and then use setTimeout to attribute the event handler. Something like this:
The setTimeout is used to give the window time to open before assinging it with an event handler. Without it an error will occure.
popUpObj = window.open(...);
Of course NS4 doesn't have the major slice of the browser market, so this isn't a great deal of help. There is a work around for this problem however. It would go something along the lines of replacing the contents of the setTimeout with a function that repeatedly checks for the popop's coordinates. You may also need to check for the existance of the popup in that function.
Hope that helps.