Take a look at this:
Macro: Pause Until Web Page Element Exists [Example]
For more information, see the wiki Searching the Forum for Answers section.