function viewPhoto() {
	if (Key <= 0) Key = 0;
	if (Key > images.length-1) Key = images.length-1;
	document.getElementById("albumPhoto").src = albumLoc + images[Key];
	if (Key > 0) {
		document.getElementById("albumPrev").src = "includes/photoalbum2/links_actief.png";
		}
	else {
		document.getElementById("albumPrev").src = "includes/photoalbum2/links_inactief.png";
		}
	if (Key < images.length-1) {
		document.getElementById("albumNext").src = "includes/photoalbum2/rechts_actief.png";
		}
	else {
		document.getElementById("albumNext").src = "includes/photoalbum2/rechts_inactief.png";
		}
	fillScroller();
	}
	
function largePhoto(add) {
	Key = Key+add;
	viewPhoto();
	}

function prevPhoto() {
	Key = Key-1;
	viewPhoto();
	}

function nextPhoto() {
	Key = Key+1;
	viewPhoto();
	}
	
function fillScroller() {
	document.getElementById("albumThumb1").src = "includes/photoalbum2/blank.png";
	document.getElementById("albumThumb2").src = "includes/photoalbum2/blank.png";
	document.getElementById("albumThumb3").src = "includes/photoalbum2/blank.png";
	document.getElementById("albumThumb4").src = "includes/photoalbum2/blank.png";

	document.getElementById("albumThumb1").src = albumLoc + "tn/" + images[Key];
	if (Key+1 < images.length) document.getElementById("albumThumb2").src = albumLoc + "tn/" + images[Key+1];
	if (Key+2 < images.length) document.getElementById("albumThumb3").src = albumLoc + "tn/" + images[Key+2];
	if (Key+3 < images.length) document.getElementById("albumThumb4").src = albumLoc + "tn/" + images[Key+3];
	}
	
var link = document.createElement('link');
link.href = 'includes/photoalbum2/album.css';
link.rel = 'stylesheet';
link.type = 'text/css';
document.getElementsByTagName('head')[0].appendChild(link);
