Note that this script uses the focus() method to bring the secondary window back again. This is a JavaScript 1.1 feature, so you'll need Navigator 3 or later; with an earlier browser you'll have to switch to the window manually the second time you write to it.
Click here to close the other window: