var max_left=0;
var maus_drin=0;
var richtung=0;
var geschwindigkeit_normal=1;
var drehung_ok=1;

function slideshow_start() {

	aid=setInterval("slideshow()",25);

}


function nach_links(geschwindigkeit) {
	var check=document.getElementById("alleartikel");
	if(parseInt(check.style.left)<0) check.style.left=parseInt(check.style.left)+geschwindigkeit+"px";
	else check.style.left=0+"px";

}

function nach_rechts(geschwindigkeit) {
	check=document.getElementById('alleartikel');
	if(parseInt(check.style.left)>max_left) check.style.left=parseInt(check.style.left)-geschwindigkeit+"px";
	else check.style.left=max_left+"px";
	
}

function slideshow_schnell(hilf) {

	geschwindigkeit_normal=10;
	richtung=hilf;
	drehung_ok=0;

}


function slideshow_normal() {

	geschwindigkeit_normal=1;
	drehung_ok=1;

}

function slideshow() {

	if(maus_drin==0) {
		
		if(drehung_ok==1) {
			check=document.getElementById('alleartikel');
			if(richtung==0 && parseInt(check.style.left)<=max_left) richtung=1;
			if(richtung==1 && parseInt(check.style.left)>=0) richtung=0;
		}

		if(richtung==0) nach_rechts(geschwindigkeit_normal);
		else nach_links(geschwindigkeit_normal);
	
	}

}
