window.onload = initall;

function initall() {
	var parent = document.getElementById("galleryOne");
	var anchors = parent.getElementsByTagName("a");
	var count = 0;
	while (count < anchors.length) {
		anchors[count].className = "greyBorder";
		count++;
	}
}

function gallery(whichpic) {
	initall();
	var parent = document.getElementById("galleryOne");
	var anchors = parent.getElementsByTagName("a");
	for (i=0; i<anchors.length-1; i++) {
		if (anchors[i] == whichpic) {
			i++;
			anchors[i].className = "neighbour";
		}
	}
	var source = whichpic.getAttribute("href");
	var placeholder = document.getElementById("placeholder");
	placeholder.setAttribute("src",source);
	whichpic.className = "current";
	return false;
}


