I need exactly the same thing and I found this post searching through the forum.
This is what I have so far:
//TODO: create a better looking popup
div = document.createElement(
"url(Images/loading7.gif) no-repeat center"
"3px solid Green"
//div.innerHTML = "Loading ...";
// Here you should center the div somehow
Thanks in advance