// JavaScript Document
function __getImage(aStart,aEnd, maximal)
{
	var imgneu = document.getElementById("li_" + aStart);
	var oldId = parseInt(aStart) - 1;
	var imgalt = document.getElementById("li_" + oldId);
	var intervall = 7; //Anzahl Sekunden
	if ( aStart <= aEnd)
	{
		if ( imgalt != null)
			{
				imgalt.style.display = "none";
			}
		if ( imgneu != null )
			{
				
				fade(aStart, "");
				imgneu.style.display = "block";
				aStart++;
				setTimeout("__getImage("+aStart+","+aEnd+","+maximal+")",intervall*1000);
			}
		else
			{
				imgalt.style.display = "block";
			}
	}
	else
	{
		
		imgalt.style.display = "none";
		__getImage(0,maximal, maximal);
	}
}
function fade(li_id, step) {
        step = step || 0;
        //alert(li_id);
		document.getElementById("li_"+li_id).style.opacity = step/100;
        document.getElementById("li_"+li_id).style.filter = "alpha(opacity=" + step + ")";
		step = step + 2;
        if (step <= 100) {
                window.setTimeout(function () { fade(li_id, step); }, 1);
        } else {
                step = 0;
        }
}
