It was a long time since I did any real work with javascript but from what I remember it isn't possible to close windows opened by other pages through javascript. I can be wrong though.
But it is possible to load a new html page in the popup window which in turn closes the window. All you need to do is set TARGET="shoutboxpal" and call a page which has <body onload="window.close()"> in it.