// JavaScript Document//Defintion der haeuservar haeuser1=new Array('haus20.jpg','haus18.jpg','haus16.jpg','haus14.jpg','haus12.jpg','haus10.jpg','haus8.jpg','haus6.jpg','haus4.jpg','haus2.jpg');var haeuser2=new Array('haus21.jpg','haus19.jpg','haus17.jpg','haus15.jpg','haus13.jpg','haus11.jpg','haus9.jpg','haus7.jpg','haus5.jpg','haus3.jpg');//Defintion der Intervallevar int_1=5000;var int_2=5000;//Definition der Verzšgerungvar delay_2=2500;//ZŠhlervar b1_cnt=0;var b2_cnt=0;//Functionenwindow.onload=function(){	var aktiv1 = window.setInterval("set_image('haus1')", int_1);	window.setTimeout("start_haus2()",delay_2);}function start_haus2(){	var aktiv2 = window.setInterval("set_image('haus2')", int_2);}function set_image(who){	if(who=="haus1"){		b1_cnt += 1;		if(b1_cnt >= haeuser1.length){			b1_cnt=0;		}		window.document.haus1.src = "img/"+haeuser1[b1_cnt];		var imageId = 'haus1';  		var image = document.getElementById(imageId);  		setOpacity(image, 0);  		image.style.visibility = 'visible';  		fadeIn1(imageId,0);	}	else if(who=="haus2"){		b2_cnt += 1;		if(b2_cnt >= haeuser2.length){			b2_cnt=0;		}		window.document.haus2.src = "img/"+haeuser2[b2_cnt];		var imageId = 'haus2';  		var image = document.getElementById(imageId);  		setOpacity(image, 0);  		image.style.visibility = 'visible';  		fadeIn2(imageId,0);	}		}function setOpacity(obj, opacity) {  opacity = (opacity == 100)?99.999:opacity;    // IE/Win  obj.style.filter = "alpha(opacity:"+opacity+")";    // Safari<1.2, Konqueror  obj.style.KHTMLOpacity = opacity/100;    // Older Mozilla and Firefox  obj.style.MozOpacity = opacity/100;    // Safari 1.2, newer Firefox and Mozilla, CSS3  obj.style.opacity = opacity/100;}function fadeIn1(objId,opacity) {  if (document.getElementById) {    var obj = document.getElementById(objId);    if (opacity <= 100) {      setOpacity(obj, opacity);      opacity += 10;      window.setTimeout("fadeIn1('"+objId+"',"+opacity+")", 100);    }  }}function fadeIn2(objId,opacity) {  if (document.getElementById) {    var obj = document.getElementById(objId);    if (opacity <= 100) {      setOpacity(obj, opacity);      opacity += 10;      window.setTimeout("fadeIn2('"+objId+"',"+opacity+")", 100);    }  }}function fadeIn3(objId,opacity) {  if (document.getElementById) {    var obj = document.getElementById(objId);    if (opacity <= 100) {      setOpacity(obj, opacity);      opacity += 10;      window.setTimeout("fadeIn3('"+objId+"',"+opacity+")", 100);    }  }}