Alain: nochma...meine version und lösung ...

Beitrag lesen

hallo again and last, ;-)

zu meinem kommentar

P.S.Falls jemand bessere ideen hat zum SCRIPT(vorallem wegen dem IE),dann ohne hemmungen mitteilen.

ich habs jetzt endlich geschafft,dass der IE das ganze auch anzeigt wie der NS6-7 und opera,somit einiges an javascript gespart.
Hier nochmal die komplette version:

var image=new Array ('bild1.jpg','bild2.jpg','etc.jpg');

var NS4=false, IE=false, DOM=false;
if (document.getElementById) {
DOM=true;
}
else if (document.all) {
IE=true;
}
else if (document.layers) {
NS4=true;
}

var imgdone=false;
var count=0, outer, done, img=new Array();
if(NS4){
var ypos=100; //POSITION OF LOAD BAR FROM TOP OF WINDOW, IN PIXELS
var loadcol='aqua' ;    // PROGRESS BAR COLOR
var unloadcol='blue';  // BGCOLOR OF UNLOADED AREA
var barheight=20;     // HEIGHT OF PROGRESS BAR IN PIXELS (MIN 20)
var barwidth=400;    // WIDTH OF THE BAR IN PIXELS
var bordcol='black';// COLOR OF THE BORDER
var size=barwidth/(image.length);
barheight=Math.max(barheight,20);
var txt='<layer name="outer" bgcolor="'+bordcol+'" visibility="hide"><table border="0" cellspacing="0" cellpadding="0"><td width="'+barwidth+'" height="'+barheight+'" align="center"><ilayer width="100%" height="100%"><layer width="100%" height="100%" bgcolor="'+unloadcol+'" top="0" left="0"><table border="0" cellspacing="0" cellpadding="0"><td width="'+barwidth+'" height="'+barheight+'" bgcolor="'+unloadcol+'" align="center"><font color="'+loadcol+'" size="2" face="sans-serif">Pre Loading...</font></td></table></layer><layer name="done" width="100%" height="'+barheight+'" top="0" left="0"><table border="0" cellspacing="0" cellpadding="0"><td width="'+barwidth+'" height="'+barheight+'" bgcolor="'+loadcol+'" align="center"><font color="'+unloadcol+'" size="2" face="sans-serif">Pre Loading...</font></td></table></layer></ilayer></td></table></layer>';
document.write(txt);
}
if(NS4){
outer=document.outer;
done=document.outer.document.layers[0].document.done;
}
if(NS4)setpos();
for(i=0;i<image.length;i++){
img[i]=new Image();
img[i].onload = checkload;
img[i].src=image[i];
}

function dispbar(){
cplayer(done, 0, size*count, barheight, 0);
if(count>=image.length)hidebar();
}

function checkload(){
count++;
prozent=Math.round(count/image.length*100);
if (count<=image.length) {
if (DOM||IE) {
var xpos = (document.body.clientWidth-260)/2;
display="<table cellspacing="0" cellpadding="0" width="260" style="position:absolute; top:70px; left:"+xpos+"px"><tr><td height="24" width=""+(prozent*2.6)+"" style="background-color:aqua"></td><td height="24" width=""+(260-prozent*2.6)+"" style="background-color:blue"></td></tr></table><font style="font-family:sans-serif; font-size:12pt; color:black; position:absolute; top:71px;left:"+xpos+"px">&nbsp;&nbsp;PreLoad..."+count+"&nbsp;Images..."+prozent+"%</font>";
document.getElementById("screen").innerHTML=display;
if(prozent>=100)hidebar();
}
else dispbar();setTimeout('hidebar()', 30000);
status='Images'+count+' Pre Load...'+prozent+'%';
} else hidebar();
}

function setpos(){
var ww= window.innerWidth;
var x=(ww-barwidth)/2;
outer.moveTo(x,ypos);
outer.visibility="show";
cplayer(done,0,0,barheight,0);
}

function hidebar(){
if(NS4)outer.visibility="hide";
status='Pre Load complete!';
imgdone=true;
if(DOM||IE){
display="<table cellspacing="0" cellpadding="0" style="position:absolute; top:0px; left:0px"><tr><td>&nbsp;</td></tr></table>";
document.getElementById("screen").innerHTML=display;
}
location.href="welcome.html";
}

function cplayer(layer, ct, cr, cb, cl){
layer.clip.top=ct;
layer.clip.right=cr;
layer.clip.left=cl;
}

Gruss
Alain