var elm; var ft=0; var ftid; function changeSitePic(pic,txt,b,w,h){ ft = 0; if(document.getElementById){ if(!elm){ elm = document.getElementById('changeImg'); } elm.src = 'images/intelli/'+pic; elm.style.border= b+'px solid'; elm.style.height = h; elm.style.width = w; if (IE5 || IE7){ elm.style.filter = "alpha(style=5,opacity=0)"; } if(NS6){ elm.style.MozOpacity = 0; } if(ftid > 1){ window.clearInterval(ftid); } ftid = window.setInterval("setFilter()",1); } } function setFilter(){ if(ft < 100){ if(NS6){ ft = ft+4; } if(IE5 || IE7){ ft = ft+6; } } //elm.style.filter = "alpha(style=1,opacity="+ft+",finishOpacity=0,startX=0,startY=0,finishX=0,finishY=0)"; if (IE5 || IE7){ elm.style.filter = "alpha(style=5,opacity="+ft+")"; } if(NS6){ elm.style.MozOpacity = ft/100; } if(ft >= 100){ window.clearInterval(ftid); ft=0; } } function resetFt(){ ft = 0; } document.onmousedown = resetFt; function changePic(i) { var img = new Array ('badezimmer.jpg','flur.jpg','kueche.jpg','raum.jpg','tisch.jpg','tuer.jpg','weinregal.jpg'); var max = 6; document.getElementById("bildchange").src = '../images/intelli/startseite/'+img[i]; if ( i < max ){ i = i + 1; } else { i = 0; } setTimeout(function(){changePic(i);},5000); }