Small JavaScript snippet which takes a DOM ID and an image URL. Repeatedly tries loading the image URL and placing the contents into the indicated DOM element. It retries for a while, then gives up and shows an error message in place of the image.