/*** Funktionen für joshansen ***/

// Bilderscripts
picNum=0;
swapPictures = function(anzahl){
	$('pic_'+picNum).fade({ duration: 1.5 });
	picNum++;
	if(picNum>anzahl-1){
		picNum = 0;
	}
	$('pic_'+picNum).appear({ duration: 1.5 });
} 

picInit = function(){
	$('image_container_top').cleanWhitespace();
	for(i=0;i<$('image_container_top').childNodes.length;i++){
		if(i!=0){
			$('image_container_top').childNodes[i].style.display = 'none';
		}
	}
	if($('image_container_top').childNodes.length > 1){
		window.setInterval('swapPictures('+$('image_container_top').childNodes.length+')',2500);
	}
}
