function fading_up(step,gen) {
	step = step || 0;
	window.document.getElementById('ajax_'+gen).style.opacity= step/100;
	window.document.getElementById('ajax_'+gen).style.filter = "alpha(opacity=" + step + ")"; //
	step = step + 10;
	if (step < 100) {
	window.setTimeout(function () { fading_up(step,gen); }, 1);
	} else {
	  if(gen == 1) {
		window.document.getElementById('ajax_2').style.opacity= 0;
		window.document.getElementById('ajax_2').style.filter = "alpha(opacity=0)";
		window.document.getElementById('ajax_2').style.zIndex = 0;
		window.document.getElementById('ajax_1').style.zIndex = 1;
	  }
	  if(gen == 2) {
	  //alert("fade_2");
		window.document.getElementById('ajax_1').style.opacity= 0;
		window.document.getElementById('ajax_1').style.filter = "alpha(opacity=0)";
		window.document.getElementById('ajax_1').style.zIndex = 0;
		window.document.getElementById('ajax_2').style.zIndex = 1;
	  }
	}		
}
var ajax_1=false;
if (window.XMLHttpRequest)
{
	ajax_1=new XMLHttpRequest;
}
else if (window.ActiveXObject)
{
	ajax_1=new ActiveXObject('Microsoft.XMLHTTP');
}
// Wir brauchen nun eine Funktion für den Abruf der Daten.
var timeset_1;
var dodiv = 1;
function java_1(id,gen,dodiv,timer)
{
//id(id > gen) { id = 1; }
if(id) {
	if(id > gen) { id = 1; }
    clearTimeout (timeset_1);
	ajax_1.open('GET', "Slider/"+id+".php");
	ajax_1.onreadystatechange=function()
	{
		if (ajax_1.readyState==4)
		{
			if(dodiv == 1) {
			window.document.getElementById('ajax_'+dodiv).innerHTML=ajax_1.responseText;
			window.setTimeout(function () { fading_up(0,1); }, 1000);
			window.setTimeout(function () { java_1((id+1),gen,2,timer); }, timer);
			//jQuery.fn.fullscreenr(FullscreenrOptions);
			}
			if(dodiv == 2) {
			window.document.getElementById('ajax_'+dodiv).innerHTML=ajax_1.responseText;
			window.setTimeout(function () { fading_up(0,2); }, 1000);
			window.setTimeout(function () { java_1((id+1),gen,1,timer); }, timer);
			//jQuery.fn.fullscreenr(FullscreenrOptions);
			}
		}
	}
	ajax_1.send(null);
}
}
//java_1('Slider/1.php');
