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

Beitrag lesen

<html>  
<head>  
<title>Background Slide Show</title>  
  
<script language="JavaScript1.2">  
var bgimages=new Array()  
var pathToImg=new Array();  
bgimages[0]="http://lh4.ggpht.com/pascal.herbert/SA9MkeRXy2I/AAAAAAAAIVQ/496OaNjEd8M/s800/Doodle4Google_Euro2008.jpg"  
bgimages[1]="http://lh4.ggpht.com/pascal.herbert/SBI_guRXzDI/AAAAAAAAIZY/Cup2OtFV6aE/s800/Dodole4Google%20de%20auf%20google.de.png"  
bgimages[2]="images/missionbg3.jpg"  
//preload images  
var pathToImg=new Array()  
for (i=0;i<bgimages.length;i++){  
pathToImg[i]=new Image()  
pathToImg[i].src=bgimages[i]  
}  
  
var inc=-1  
  
function bgSlide(){  
if (inc<bgimages.length-1)  
inc++  
else  
inc=0  
document.body.background=pathToImg[inc].src  
}  
if (document.all||document.getElementById)  
window.onload=new Function('setInterval("bgSlide()",3000)')  
</script>  
</head>  
<body>  
<div id="hund" style="margin: 20px auto; background-color:#FF0000; width:960; padding-top: 12px; height: 500px; background-attachment:fixed;"/>  
  <p>dosadosndsifnpisnfsanfsonfsaofsn</p>  
  <p>osadosndsifnpisnfsanfsonfsaofsn</p>  
osadosndsifnpisnfsanfsonfsaofsn</div>  
  
</body>  
</html>  

so muss es sein, nur das der Hintergrund sich im DIV wechseln soll.