See @R. Bemrose answer, with the caveat that it is not clear whether showDocument
will or will not always open a new browser window.
Is the solution OS/platform independent? Does it matter which browser you're talking to?
The solution is notionally OS/platform/browser independent, but the behavior may be OS/platform/browser specific. As you should expect. We are talking about interactions with components that are not implemented by Sun and that don't conform to any relevant API standards.
Another issue is that your code may want to open a new browser window, or load into an existing one, but the ultimate decision should rest with the user via his/her browser preferences. We are talking about (potentially) unwanted popups here ... the kind of things that many users find intensely annoying.