imges=new Array (
'pic01.jpg', 'pic02.jpg', 'pic03.jpg', 'pic04.jpg', 'pic05.jpg', 'pic06.jpg',
'pic07.jpg', 'pic08.jpg', 'pic09.jpg', 'pic10.jpg', 'pic11.jpg', 'pic12.jpg', 'pic13.jpg', 'pic14.jpg', 
'pic15.jpg','pic16.jpg', 'pic17.jpg', 'pic18.jpg', 'pic19.jpg', 'pic20.jpg', 'pic21.jpg', 'pic22.jpg', 'pic23.jpg', 
'pic24.jpg', 'pic25.jpg',
'pic26.jpg','pic27.jpg', 'pic28.jpg', 'pic29.jpg', 'pic30.jpg', 'pic31.jpg', 'pic32.jpg', 'pic33.jpg', 'pic34.jpg', 
'pic35.jpg','pic36.jpg', 'pic37.jpg', 'pic38.jpg', 'pic39.jpg', 'pic40.jpg', 'pic41.jpg', 'pic42.jpg', 'pic43.jpg', 
'pic44.jpg','pic45.jpg', 'pic46.jpg', 'pic47.jpg', 'pic48.jpg', 'pic49.jpg','pic50.jpg',
'pic51.jpg','pic52.jpg', 'pic53.jpg', 'pic54.jpg', 'pic55.jpg', 'pic56.jpg');

imges.sort(function() {return 0.56 - Math.random()})

divid="slideshow"; 
picwid=80; //breite des breitesten bildes in pixel
pichei=80; //höhe des höchsten bildes in pixel
backgr="white"; //hintergrundfarbe der slideshow, falls verschieden grosse oder transparente bilder
//verwendet werden, kann hier z.B. die hintergrundfarbe der seite gesetzt werden
sdur=5; //zeit zwischen den wechseln (überblendung) in sekunden
fdur=2; //dauer des übergangs (überblendung) in sekunden
steps=20; //schritte in denen überblendet wird (je mehr dest sanfter)
startwhen=1;

//****************************************************************
ftim=fdur*1000/steps;stim=sdur*1000;emax=imges.length;
tp="<div style='position:absolute;'>";

for(e=1;e<=emax;e++){
	theid="img"+e;thesrc=imges[e-1];
	tp=tp+"<div id='"+theid+"'><img src='images/slidepic/"+thesrc+"' border='0'/></div>";
	}
tp=tp+"</div>";
document.write("<style type='text/css'>");
for(b=1;b<=emax;b++){
	thestylid="img"+b;thez=1;thevis='hidden';
	if(b<=1) {thez=2; thevis='visible';}
	document.write("#"+thestylid+" {position:absolute;left:0;top:0;width:"+picwid+"px;height:"+pichei+"px;background-color:"+backgr+";visibility:"+thevis+";z-index:"+thez+";}");
	}
document.write("</style>");
function myfade(){
	parr = new Array();
	for(a=1;a<=emax;a++){
		idakt="img"+a;paktidakt=document.getElementById(idakt);
    ie5exep=new Array(paktidakt);parr=parr.concat(ie5exep);}
 		i=1;u=0;slide (i);
		}
function slide(numa){
	ptofade=parr[numa-1];
	if(numa<=emax){pnext=parr[numa];}
	if(numa==emax){pnext=parr[0];}
	pnext.style.visibility="visible";
	pnext.style.filter="Alpha(Opacity=100)";
	pnext.style.MozOpacity=1;
	pnext.style.opacity=1;
	ptofade.style.filter="Alpha(Opacity=100)";
	ptofade.style.MozOpacity=1;
	ptofade.style.opacity=1;
	factor=100/steps;
	slidenow();
	}
function slidenow(){
	check1=ptofade.style.MozOpacity;
	maxalpha=(100-factor*u)/100*105;
	if(check1<=maxalpha/100){u=u+1;}
	curralpha=100-factor*u;
	ptofade.style.filter="Alpha(Opacity="+curralpha+")";
	ptofade.style.MozOpacity=curralpha/100;
	ptofade.style.opacity=curralpha/100;
	if(u<steps){window.setTimeout("slidenow()",ftim);}
	if(u>=steps&&i<emax){
		ptofade.style.visibility="hidden";
		ptofade.style.zIndex=1;
		pnext.style.zIndex=2;
		i=i+1;u=0;
		window.setTimeout("slide(i)",stim);}
	if(u>=steps&&i>=emax){
		ptofade.style.visibility="hidden";
		ptofade.style.zIndex=1;
		pnext.style.zIndex=2;
		i=1;u=0;
		window.setTimeout("slide(i)",stim);}
	}
function shownow(){
	document.getElementById(divid).innerHTML=tp;
	if(startwhen){window.setTimeout("myfade()",stim);}
	}
onload=shownow;