// dynamische banner
// voor timeout-reizen.nl
// www.haha.nl - 07-2006
// versie 1.00
// ================
function start_banner(currentIndex){

	if((currentIndex+1)>=banner_pics.length){
		currentIndex = 0;
	} else {
		currentIndex = currentIndex + 1;
	}

	var imageBanner = document.getElementById('bannerBG');
	imageBanner.style.backgroundImage = "url('"+banner_pics[currentIndex]+"')";
	
	var textBanner = document.getElementById('bannertext');
	textBanner.innerHTML = banner_text[currentIndex]; 	
	
	var linkBanner = document.getElementById('bannerlink');
	linkBanner.href = banner_id[currentIndex]; 	
	
	setTimeout("start_banner("+currentIndex+");",3200);	
	
}

function startBannerRotation(){

    if(banner_pics.length>1){
	start_banner(-1);
    }

}

/* toegevoegd ivm window.onload function conflict met greybox */
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }

}