Ich habe es jetzt folgendermaßen gelöst:
Code:
var preload_text ='Preloading';
var doc = window.document;
function preload_progress()
{
preload_text += '.';
window.document.getElementById("theDiv").innerHTML=preload_text ;
}
function ImagePreloader(images, callback)
{
// Hide the content until all is preloaded
doc.getElementById("theDiv").style.display="inline";
// store the call-back
this.callback = callback;
this.progress=setInterval("preload_progress()", 500);
// initialize internal state.
this.nLoaded = 0;
this.nProcessed = 0;
this.aImages = new Array();
// record the number of images.
this.nImages = images.length;
// for each image, call preload()
for ( var i = 0; i < images.length; i++ )
this.preload(images[i]);
}