﻿var show1 = new Array("images/animation/animation_mitte_kl1.jpg","images/animation/animation_mitte_kl2.jpg","images/animation/animation_mitte_kl3.jpg");
var show2 = new Array("images/animation/animation_links1.jpg","images/animation/animation_links2.jpg","images/animation/animation_links3.jpg","images/animation/animation_links4.jpg","images/animation/animation_links5.jpg", "images/animation/animation_links6.jpg");
var show3 = new Array("images/animation/animation_ern.jpg","images/animation/animation_ern2.jpg","images/animation/animation_ern3.jpg");
var show4 = new Array("images/animation/animation_rechts1.jpg","images/animation/animation_rechts2.jpg","images/animation/animation_rechts3.jpg");

var dia1 = 0;
function changeDia1(){
var speed=5000;
var pos=0;

x = Math.floor(Math.random() * 3)
if (!(document.images)) {return;}
if (dia1 == 2) { 
dia1 = 0; }
else {
dia1 = dia1 +1;}
document.dia1.src=show1[dia1];



setTimeout("changeDia1();",speed);
}




function changeDia2(){
var speed=4500;
var pos=0;
x = Math.floor(Math.random() * 6);
if (!(document.images)) {return;}

document.dia2.src=show2[x++];
if(x==6){x=0;};
document.dia2.src=show2[x];

setTimeout("changeDia2();",speed);
}

function changeDia3(){
var speed=5000;
var pos=0;
x = Math.floor(Math.random() * 3)
if (!(document.images)) {return;}

document.dia3.src=show3[x++];
if(x==3){x=0};
document.dia3.src=show3[x];

if (x == 3) { x = 0; }

setTimeout("changeDia3();",speed);
}

var dia4 = 0;
function changeDia4(){
var speed=4000;
var pos=0;
x = Math.floor(Math.random() * 3)
if (!(document.images)) {return;}

document.dia4.src=show4[x++];
if(x==3){x=0};
document.dia4.src=show4[x];

if (x == 3) { x = 0; }

setTimeout("changeDia4();",speed);
}


function animation_go(){
speedA = 3000;
speedB = 1800;
speedB = 1400;
speedC = 4400;

setTimeout("changeDia1();",speedA);
setTimeout("changeDia2();",speedB);
setTimeout("changeDia3();",speedB);
setTimeout("changeDia4();",speedC);
}
