I'm not sure what you mean by "working fine".
As I'm understanding of what you're trying to accomplish is that you want to display an hourglass, then launch the Search form. When the search is done, change the mousepointer back to normal. At least that's the logic.
The original code you...