First of all, it's rarely a good practice to open a popup window. This is not inherently bad, but many users try to fight against annoying popup ads and will block popups using some popular browser plugin developed for such purposes.
But your problem is quite solvable. The thing is: a popup window and its parent are not independent; a popup window remembers it parent and can manipulate it in Javascript. The key to the solution is this:
http://www.w3schools.com/jsref/prop_win_opener.asp[
^].
The simple sample on the page referenced above shows how can you use it.
[EDIT]
Also, you can use
window.parent
:
http://www.w3schools.com/jsref/prop_win_parent.asp[
^].
—SA