var imgLogosRechts;
var arrLogos = ["logo_veluwe.jpg", "logo_achterhoek.jpg"];
var imgLogos = [];
var intLogoIndex = 0;
var intLogoTijd = 2500;

function swapLogos() {
	if (arrLogos.length == 0) return;
	if (!imgLogosRechts) imgLogosRechts = document.getElementById("imgLogosRechts");
	if (!imgLogosRechts) return;
	
	intLogoIndex = ((intLogoIndex  + 1) < arrLogos.length) ? intLogoIndex + 1 : 0;
	
	$(imgLogosRechts).fadeOut("slow", function() {	
		$(this).attr("src", strLocalBaseURI + "images/" + arrLogos[intLogoIndex]);
		$(this).fadeIn("slow", function() {
			setTimeout("swapLogos()", intLogoTijd);
		});
	});
}

$(window).load( function() {
	setTimeout("swapLogos()", intLogoTijd);
});

// Preload
for (var i = 0; i < arrLogos.length; i++) {
	imgLogos[i] = new Image();
	imgLogos[i].src = strLocalBaseURI + "images/" + arrLogos[i];	
}