Krausei: getElementById bei ie6,7 streikt - Bitte um hilfe

Beitrag lesen

  
<script language="javascript" type="text/javascript" src="diashow.js"></script>  
</head><body>  
  
<div id="header">  
<div id="diashow" class="holder">
  
#header { background: url(images/headbg.png) repeat-x; height: 462px;}  
#header .holder {margin: 0 auto; width: 960px; height: 451px; padding-top: 12px; }  
#header .holder .navtop { height: 124px; background: url(images/headtopbg.gif) repeat-x bottom left; }  
#header .mission { width:491px; height: 200px; margin-top: 45px;}  
#header .mission h4 { background: url(images/missionhead.png) no-repeat; width: 491px; height: 99px; margin-bottom: 10px; }  
#diashow {margin: 0 auto; width: 960px; background-image: url(images/missionbg.jpg); height:451px; background-repeat: no-repeat; padding-top: 12px; }  

  
var bgimages=new Array();  
var pathToImg=new Array();  
var inc=-1;  
bgimages[0] = "images/missionbg2.jpg"  
bgimages[1] = "images/missionbg3.jpg"  
bgimages[2] = "images/missionbg.jpg"  
bgimages[3] = "images/missionbg4.jpg"  
  
//Images vorladen  
for (i=0; i < bgimages.length; i++) {  
        pathToImg[i]=new Image();  
        pathToImg[i].src=bgimages[i];  
}  
  
function bgfade() {  
        if (inc < bgimages.length-1) {  
                inc++  
        } else {  
                inc=0  
        }  
        document.getElementById("diashow").style.backgroundImage = "url("+pathToImg[inc].src+")";  
        fade();  
}  
  
function fade(step) {  
        step = step || 0;  
        document.getElementById("diashow").style.opacity = step/0;  
        document.getElementById("diashow").style.filter = "alpha(opacity=" + step + ")";  
        step = step + 2;  
        if (step <= 0) {  
                window.setTimeout(function () { fade(step); }, 1);  
        } else {  
                step = 0;  
        }  
}  
  
if (document.all||document.getElementById) window.onload=new Function('setInterval("bgfade()",5000)')  

Bei Firefox und Safari funktioniert es einwandfrei, aber IE kommt ein Fehler..

wisst ihr, wie ich diesen Fehler beheben kann?

Vielen Dank. für Eine rasche Antwort würde ich mich sehr freuen.

Liebend gerne auch per email.. kraus@kovimedia.de antworten.

Kraus Michael