function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}



var slideShowSpeed = 6000;
var t;
var j = 0;
function runSlideShow(){
	document.getElementById("banner").style.background = "url(" + preLoad[j].src + ")"
	document.getElementById("bannertitel").innerHTML = Titles[j];
	document.getElementById("bannerotitel").innerHTML = TitlesO[j];
	document.getElementById("bannersubtitel").innerHTML = Subtitles[j];
	document.getElementById("bannerslink").href = Links[j];
	document.getElementById("bannerposdiv").style.left = XBanner[j] + "px";
	document.getElementById("bannerposdiv").style.top = YBanner[j] + "px";	
	j = j + 1;
	if (j > (p-1)) j=0
		t = setTimeout('runSlideShow()', slideShowSpeed)
}


function doslider() {
	if (document.getElementById("bannertitel")) {
		clearTimeout(t);
		runSlideShow();
	}	
}



var slideShowSpeed2 = 6000;
var t2;
var j2 = 0;
function runSlideShow2(){
	document.getElementById("banner2").style.background = "url(" + preLoad2[j2].src + ")"
	document.getElementById("bannertitel2").innerHTML = Titles2[j2];
	document.getElementById("bannerotitel2").innerHTML = TitlesO2[j2];
	document.getElementById("bannersubtitel2").innerHTML = Subtitles2[j2];
	document.getElementById("bannerslink2").href = Links2[j2];
	document.getElementById("bannerposdiv2").style.left = XBanner2[j2] + "px";
	document.getElementById("bannerposdiv2").style.top = YBanner2[j2] + "px";
	j2 = j2 + 1;
	if (j2 > (p2-1)) j2=0
		t2 = setTimeout('runSlideShow2()', slideShowSpeed2)
}


function doslider2() {
	if (document.getElementById("bannertitel2")) {
		clearTimeout(t2);
		runSlideShow2();
	}	
}


addLoadEvent(printPage);
//addLoadEvent(rating);
//addLoadEvent(stages);
//addLoadEvent(academies);
addLoadEvent(doslider);
addLoadEvent(doslider2);
//addLoadEvent(fairs);
//addLoadEvent(press);
//addLoadEvent(navigationLeftAbove);
//addLoadEvent(dorightnav);
//addLoadEvent(contact);
//addLoadEvent(contact_country);
//addLoadEvent(imagepopups);
//addLoadEvent(subscribecheck);
//addLoadEvent(moviescheck);
//addLoadEvent(ambassadors);
//addLoadEvent(send2friend);
//addLoadEvent(applicationtable_popups);
//addLoadEvent(search);
//addLoadEvent(menu);