A page has a list of images for the user to choose from. When a file is selected the request is processed via an AJAX call that directs the source of an iFrame to another page where the image is generated and passed back to the client.
Due to the size of some of the images, the generation can take a noticeable amount of time. To make sure the user does not think the site is frozen a wait message is needed. Since the generating page only returns the image, we need another way to notify the client when the file is generated and the wait message can be hidden.