It is not clear, at least to me, what you are trying to accomplish.
If you open another window that displays a web page you have no control over, no matter how it is done, why would you think
you should have any control over it, and why would you want to?
When you are talking about 'bringing it to the front' do you mean the new browser or tab? That is controlled by the browser and the user of the browser can change these settings on a whim, and in no case should a program that the browser runs(i.e. your applet) be able to 'control the browser'.
If you want that 3rd party page to close onBlur, you would need to download the file to your applet(in other words make a HTTP connection) and add in the javascript to do that in the downloaded file, save it, and then tell the browser to open up your modified page. There are programs that do this sort of thing like Greasemonkey(an add on for Firefox), but I don't think you can do this in the same manner as an applet. I believe as an add-on greasemonkey has a lot more privileges than an applet.
There are several issues when doing something this. The first is that unless the Applet is signed(or change the settings in the security manager, something you CAN'T do on others machines-please don't ever ask others to lower security settings just so they can run your program), you won't be able to open a socket to a third party server, nor can you save a file to the local machine. The second is that people might frown on adding javascript to web pages they view. I don't know if there are copyright issues, but from a security standpoint this is suspect.
[ August 21, 2008: Message edited by: Rusty Shackleford ]