Problem with centred pop-up window

Works fine in all the browsers I could try.
The only problem I found was when you have more than one window to open and you don’t close the first one. The window doesn’t refresh itself with the new data, stays with the old. You close it, try again and everything’s fine.
Any way to change the javascript code to force the new page into the window already opened?