Display wait image while Loading Page

How can I please display an animated image while the page is loading.

I tried with javascript code but I have this error message The entity name must immediately follow the'&' in the entity reference

when I use this

var ns6=document.getElementById &&!document.all;

Thanks.

[348 byte] By [WebServicea] at [2007-11-27 5:55:01]
# 1
Where and when do you get this message? Is it actually an error message? Or is it just a warning message?Anyway, you can use & amp; instead of &.
BalusCa at 2007-7-12 16:23:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...