//copyright L.FAITH 2010 INZU.NET

function slideshow() { 

direction="in";

for(var i=0;i<numSlides;i++){
	
if(i==slideSelect){
	
document.getElementById('slide_'+slideSelect).style.display='block';
setTimeout('fadeSlide()', 0);

}else{
document.getElementById('slide_'+i).style.display='none';	
}
}


} 



function fadeSlide(){

fadeCounter++;



if(fadeCounter<=11){
	
document.getElementById('slide_'+slideSelect).style.opacity = 1-(fadeValue*0.1);
document.getElementById('slide_'+slideSelect).style.filter = 'alpha(opacity=' + (100-(fadeValue*10)) + ')';

if(direction=="in"){
fadeValue--;
}else{
fadeValue++;
}

setTimeout('fadeSlide()', 60);
}



if(direction=="in"&&fadeCounter==12){
fadeCounter=0;
fadeValue=1;
direction="out";
setTimeout('fadeSlide()', 7000);
}


if(direction=="out"&&fadeCounter==12){
	fadeCounter=0;
	fadeValue=10;
	
	if((slideSelect+1)<numSlides){
	slideSelect++;
	}else{
	slideSelect=0;	
	}
	slideshow();
}

}

var direction="in";
var slideSelect=0;
var fadeValue=10;
var fadeCounter=0;

window.onload=slideshow; 



