What I'm trying to do is get a 'loading' div to gradually fade out after 3 secs.
Here's what I came up with so far with all internet sources I could find...

Code:
<script language="JavaScript">
window.onload=setTimeout("fadeDiv()", 3000);

function fadeDiv() {
new Effect.Opacity("loading", {duration:1.5, from:0.9, to:0.0});
}
</script>
But obviously, this doesn't work. Can anyone help me with this problem?