I have an application that opens a new window on clicking a link. This spawns a page that holds a Java applet. The problem I am having is that clicking the same link reloads
Try checking:
if (!winref || winref.closed || !winref.document) { }