I've been trying to create a javascript function that goes through a series of conditionals to check for specific open windows, and, provided they're there, re-focus them.
Here's part of the script I'm using:
function recallPopUps(){
if ( (! (typeof firstWin == "undeclared") ) && ( ...