function swapImage(imgN,imgU){
	if(document.images) document.images[imgN].src=imgU;
}

var loop;
var richting;
var poslinks;
var dialengte;

var postzegels;

function scrollInit() {
	postzegels=document.getElementById("postzegels");
	if (postzegels!=null) {
		poslinks=postzegels.offsetLeft;
		dialengte=postzegels.scrollWidth;
	}
}

function dianaarlinks() {
	loop = true;
	naarlinks();
}

function dianaarrechts() {
	loop = true;
	naarrechts();
}

function naarlinks() {
	if (poslinks>(dialengte-448)*-1) {
		if (loop) {
			postzegels.style.left=poslinks-1+'px';
			poslinks=poslinks-1;
			setTimeout("naarlinks()",5);
		}
	}
}

function naarrechts() {
	if (poslinks<0) {
		if (loop) {
			postzegels.style.left=poslinks+1+'px';
			poslinks=poslinks+1;
			setTimeout("naarrechts()",5);
		}
	}
}

function diastil() {
	loop = false;
}

var showIndex;
var showTijd=2000;

function volgende() {
	showIndex++;
	if (showIndex>maxIndex) {
		showIndex=0;
	}
	document.getElementById("fotovakgeheel").src=slideURL[showIndex];
	setTimeout("volgende()",showTijd);
}

function slideShow() {
	if (slideURL.length>0) {
		showIndex=0;
		setTimeout("volgende()",showTijd);
	}
}

window.onload = function () {
	scrollInit();
	slideShow();
}

