Virtually impossible unless client security is set to very low. The alternative is to open a new window as you wish and close the opener by calling:
window.opener = self;
from the original window.
Beware, this hack doesn't always work and is scheduled to be fixed as a security flaw in future versions.