var first_time = 1;  // first_time is true
/* Args to popup function
        loc             filename of large picture
        whatever        window attributes of popup window
 */
function popUp(loc, whatever)
{
    if (first_time) {  // popup the window and make first_time false
        popup = window.open(loc, "popUp", whatever);
        first_time = 0;
    } else {  // not the first time
        if (popup.closed == true) {  // if popup was closed
            // popup it up again
            popup = window.open (loc, "popUp", whatever);
        } else {  // popup is still open
           // put focus into the popup window
            popup.document.location = loc;
            popup.focus();
        }
    }
}
