
var intervalId;
var q = new Array(8);
var od = 116;
  
function Start_animace(){

	el = document.getElementById("animace");
	el.style.overflow = 'hidden';


	if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >=4 )
	{
	el = document.getElementById("animace");
	el.style.overflow = 'hidden';

	}


	for(img = 1 ; img < 26 ; img++)
 	{
	image = "ani" + img;
	var a = document.getElementById(image);
//	q[img] = parseInt(a.style.left);
	q[img] = (img-1)*od;
//	if(q[img] < 706 ) { a.style.left = q[img]; }
	if(q[img] < 2576 ) { a.style.left = q[img]; }
	}


	intervalId = setInterval("Animace()",25);
}

function Play()
{
// intervalId = setInterval("Animace()",50);
}

function Stop()
{
clearInterval(intervalId);
}


function Animace()
{
var a = null; 
var img = null;


	for(img = 1 ; img < 26 ; img++)
	{
	image = "ani" + img;
	a = document.getElementById(image);


	q[img] = q[img] + 1;
	var img_top = q[img];

		if(q[img] > 2550 && q[img] < 2552){ img_top = -112;};

		if(q[img] > 2551){img_top = -112; q[img] = -112; };

	a.style.left =  img_top + "px";
	}


}



