Yes, it is possible. But you need to add some more Javascript to handle this.
Break it down to smaller tasks:
1. Click link to open window and set an event listener to monitor the popup window
2. Popup window also checks to see if it has focus. If not, it sets focus and brings itself to the front.
3. The 'opener' window monitors to see if the popup has focus. If the user clicks on the opener (anywhere but the link), it should return focus to the popup.
4. The only exception is if the user clicks on the link from the opener window. If they do click it, an event listener is triggered, and closes the popup window.