var imagenumber3 = 3; // Anzahl der Grafiken
var randomnumber3 = Math.random();
var rand3 = Math.round((imagenumber3 - 1) * randomnumber3) + 1;

images3 = new Array;
images3[1] = "/images/img01_en.jpg";
images3[2] = "/images/img02_en.jpg";
images3[3] = "/images/img03_en.jpg";
var myimage3 = images3[rand3];

links3 = new Array
links3[1] = "/en/qualitaet.php";
links3[2] = "/en/qualitaet.php";
links3[3] = "/en/qualitaet.php";
var mylink3 = links3[rand3];

function motivplus3() {
  if (document.getElementById("imgmotiv3")) {
    if (rand3 < imagenumber3) {
      rand3 = rand3 + 1;
      nextimage3 = images3[rand3];
      nextlink3 = links3[rand3];
      document.getElementById("imgmotiv3").src = nextimage3;
      document.getElementById("amotiv3").href = nextlink3;
    } else {
      rand3 = 1;
      nextimage3 = images3[rand3];
      nextlink3 = links3[rand3];
      document.getElementById("imgmotiv3").src = nextimage3;
      document.getElementById("amotiv3").href = nextlink3;
    }
  }
}

var displaymotiv_en = "";
displaymotiv_en += '<a href="' + mylink3 + '" id="amotiv3"><img src="' + myimage3 + '" id="imgmotiv3" alt="[ Formed solutions ]" title="[ Formed solutions ]" width="456" height="89" border="0"></a><br>';

function startCountDown() {
	countDownTime = 4;
	aktiv = window.setTimeout("countDown()", 1000);
}
function countDown() {
	countDownTime--;
	aktiv = window.setTimeout("countDown()", 1000);
	if (countDownTime == 0) {
		window.clearTimeout(aktiv);
		motivplus3();
		startCountDown();
	}
}