How is this done i was looking at using javascript to make a div visible or not, how would this be done
Oh ok, this is web based.
Can you use the .NET Framework 3.5? There is a perfect premade solution, if you can. UpdatePanel and UpdateProgress.
If you can't, I'd suggest writing a page that does nothing but execute your SP. Then, from another page, use an XmlHttpRequest javascript object to invoke that page, and show a DIV with an animated GIF in it.