Globals are evil[tm] and in most cases not required. Besides, the global
variable is attached to the current window. If I open the popup that
contains the above code with
window.open(..., 'window1', ...')
the above statement of yours will re-use that popup anyway.
A better approach:
window.open('...', 'window' + new Date().getTime(), '...');
Since the return value of Date.prototype.getTime() changes every
millisecond, it is unlikely that an existing window will be reused.
If the return value of that method "jumps" forth/back because of
switching from/to daylight saving time, it is unlikely that a window
will be reused either because that would require thousands of named
windows to be open.