focus popup windows

In flat skin, a call to popup.focus() after opening a popup window was added in #381. This should also be added to classic skin and extended to all the functions opening popup windows.
calling focus() after window.open makes sure the popup window is in the foreground in case the window already exists.