


///changeTime 	= 5; // sekunden

//function StartSlideShow(bildgruppe, num, aus, changeTime) {
	
	startslideshow = function(bildgruppe, num, aus, changeTime) {
		
		imageconti 	= document.getElementById(bildgruppe);
		
		anzahl 		= imageconti.childNodes.length;
		
			
		if (num == anzahl) {
			num = 1;	
		} else {
			num++;
		}
		
		if (num == 1) {
			aus = anzahl;
		} else {
			aus = num - 1;
		}
	
		imagea	= imageconti.childNodes[num-1];
		imageb	= imageconti.childNodes[aus-1];
		
		
		
		//if (imagea.firstChild.complete == true and) {
			
		//geladenebilder = checkbilder(bildgruppe);
		//alert(ok);
		//if (geladenebilder == anzahl) {
			timerma = setTimeout('startslideshow("'+bildgruppe+'",'+num+' ,'+aus+','+changeTime+')',changeTime*1000);
		//alert(bildgruppe+' ok');
		//} else {
//			clearTimeout(timerma);
//		}
		//if (imagea.firstChild.complete == true && imageb.firstChild.complete == true) {	
		
		
		
		//play = setInterval('einelideshow("'+bildgruppe+'",'+num+' ,'+aus+','+changeTime+')',changeTime*1000);
		
		//}
		//}
		//alert(num + ' ' +aus);
	
		
		
			//alert(imagea.firstChild.src);
		
				new Effect.Parallel([
					new Effect.Appear(imagea, 	{ sync: true })  ,
					new Effect.Fade(imageb, 	{ sync: true })  
				], { 
				  duration: 1.5,
				  delay: 1
				  
						  
				});
		
		
	
		//imagea.appear({duration: 1 });
		//imageb.fade();
		
	
	
	//new einelideshow(bildgruppe, num, aus);
}



//checkbilder = function BildCheck (bildgruppe) {
//  
//  imageconti 	= document.getElementById(bildgruppe);
//  anzahl 		= imageconti.childNodes.length;
//  
//  billdergeladen = 0;
//  
//  
//  for (i = 0; i < anzahl; ++i) {
//    if (imageconti.childNodes[i].firstChild.complete == true) {
//     	billdergeladen = billdergeladen+1;
//    } 
//  }
//  
//  return billdergeladen;
//}



