There are two problems:
1. In the case where the second argument, $reloadopener, is false, then the code currently does not work. It was calling the close_window javascrip function with no arguments, but that does not work, because it requires an e argument that is an object.
2. In the case when $reloadopener is true, then it was not starting to reload the opener window until after the delay. It is much better for users if we start reloading the parent window immediately, and only delay closing the popup.
The new code works in IE and FF. I am sure it will work in any place where the old code worked.