/* (c)2006 Norman Schwarz www.it-service-berlin.com */

var x=new Array();
var vx=new Array();
ie4  =  document.  all;
ns6 = document. getElementById && ! document. all; 
BILDER=6;
rightX=810+365; // Virtuelles Ende
for (i=1;i<BILDER+1;i++) {
	vx[i]=50+((i-1)*225); // Virtuelle X-Position
	x[i]=810;
}

running_left=true;
running_right=false;

function move_image_left()
{
	running_left=true;
	if(ns6) {
		mvi=setTimeout("move_image_left()",0); 
	} else mvi=setTimeout("move_image_left()",0); 
	for (i=1;i<BILDER+1;i++) {
		b="bild"+i;
		vx[i]=vx[i]-1;
		if(vx[i]<=810) {x[i]=vx[i];}
		
		if ( ie4 )
	    	if ( document. all [ b ]) {
			      document. all [ b ]. style. left = x[i];
			   }                          
	   if ( ns6 )
		    if ( document. getElementById ( b )) {
			      document. getElementById ( b ). style. left = x[i];
		    } 
		if(vx[i]<-175) {vx[i]=rightX;}
	}
}

function move_image_right()
{
	running_right=true;
	if(ns6) {
		mvi=setTimeout("move_image_right()",0); 
	} else mvi=setTimeout("move_image_right()",0); 
	for (i=1;i<BILDER+1;i++) {
		b="bild"+i;
		vx[i]=vx[i]+1;
		if(vx[i]<=810) {x[i]=vx[i];}
		
		if ( ie4 )
	    	if ( document. all [ b ]) {
			      document. all [ b ]. style. left = x[i];
			   }                          
	   if ( ns6 )
		    if ( document. getElementById ( b )) {
			      document. getElementById ( b ). style. left = x[i];
		    } 
		if(vx[i]>rightX) {vx[i]=-175;}
	}
}

function stop() {
	window.clearTimeout(mvi);
	running_left=false;
	running_right=false;
}
