From http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/737/javascripts-window.opener