var imagenumber2 = 3; // Anzahl der Grafiken
var randomnumber2 = Math.random();
var rand2 = Math.round((imagenumber2 - 1) * randomnumber2) + 1;

images2 = new Array;
images2[1] = "/images/img01.jpg";
images2[2] = "/images/img02.jpg";
images2[3] = "/images/img03.jpg";
var myimage2 = images2[rand2];

links2 = new Array
links2[1] = "/qualitaet.php";
links2[2] = "/qualitaet.php";
links2[3] = "/qualitaet.php";
var mylink2 = links2[rand2];

function motivplus2() {
  if (document.getElementById("imgmotiv2")) {
    if (rand2 < imagenumber2) {
      rand2 = rand2 + 1;
      nextimage2 = images2[rand2];
      nextlink2 = links2[rand2];
      document.getElementById("imgmotiv2").src = nextimage2;
      document.getElementById("amotiv2").href = nextlink2;
    } else {
      rand2 = 1;
      nextimage2 = images2[rand2];
      nextlink2 = links2[rand2];
      document.getElementById("imgmotiv2").src = nextimage2;
      document.getElementById("amotiv2").href = nextlink2;
    }
  }
}

var displaymotiv = "";
displaymotiv += '<a href="' + mylink2 + '" id="amotiv2"><img src="' + myimage2 + '" id="imgmotiv2" alt="[ Profilierte Lösungen ]" title="[ Profilierte Lösungen ]" 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);
		motivplus2();
		startCountDown();
	}
}