Changing how iFrame's window receives focus.

* Changing how the iFrame's window receives focus.
* Moving the close button's HTML to a variable; hopefully to improve readability.