function toggleTOC() {
	$toc = $('inhoudsopgave');
	var arrow = $('arrow');
	if ($toc.style.display == 'none') {
		newArrow = arrow.src.replace("right", "down");
		arrow.src = newArrow;
		$toc.blindDown();
	} else {
		newArrow = arrow.src.replace("down", "right");
		arrow.src = newArrow;
		$toc.blindUp();
	}
}

function expandTOC() {
	$toc = $('inhoudsopgave');
	var arrow = $('arrow');
	if ($toc.style.display == 'none') {
		newArrow = arrow.src.replace("right", "down");
		arrow.src = newArrow;
		$toc.blindDown();
	}
}

function toggleRelated(id) {
	if (id == null) {
		$toc = $('related');
		var arrow = $('arrowRelated');
		if ($toc.style.display == 'none') {
			newArrow = arrow.src.replace("right", "down");
			arrow.src = newArrow;
			$toc.blindDown();
		} else {
			newArrow = arrow.src.replace("down", "right");
			arrow.src = newArrow;
			$toc.blindUp();
		}
	} else {
		$toc = $('rel_'+id);
		if ($toc.style.display == 'none') {
			$toc.blindDown();
		} else {
			$toc.blindUp();
		}
	}
}

function expandRelated() {
	$toc = $('related');
	var arrow = $('arrowRelated');
	if ($toc.style.display == 'none') {
		newArrow = arrow.src.replace("right", "down");
		arrow.src = newArrow;
		$toc.blindDown();
	}
}

function toggleSearch() {
	$toc = $('search');
	$stoc = $('simpleSearch');
	var arrow = $('arrowSearch');
	var sarrow = $('arrowSimpleSearch');
	if ($toc.style.display == 'none') {
		newSArrow = sarrow.src.replace("down", "right");
		sarrow.src = newSArrow;
		$stoc.blindUp();
		newArrow = arrow.src.replace("right", "down");
		arrow.src = newArrow;
		$toc.blindDown();
	} else {
		newArrow = arrow.src.replace("down", "right");
		arrow.src = newArrow;
		$toc.blindUp();
		newSArrow = sarrow.src.replace("right", "down");
		sarrow.src = newSArrow;
		$stoc.blindDown();
	}
}

function closeSearch() {
	$toc = $('search');
	$stoc = $('simpleSearch');
	var arrow = $('arrowSearch');
	var sarrow = $('arrowSimpleSearch');
	if ($toc.style.display == 'none') {
		newSArrow = sarrow.src.replace("down", "right");
		sarrow.src = newSArrow;
		$stoc.blindUp();
	} else {
		newArrow = arrow.src.replace("down", "right");
		arrow.src = newArrow;
		$toc.blindUp();
	}
}

function toggleResults() {
	$toc = $('results');
	var arrow = $('arrowResults');
	if ($toc.style.display == 'none') {
		newArrow = arrow.src.replace("right", "down");
		arrow.src = newArrow;
		$toc.blindDown();
	} else {
		newArrow = arrow.src.replace("down", "right");
		arrow.src = newArrow;
		$toc.blindUp();
	}
}

function toggleThesaurus(id) {
	if (id == 'thesaurus') {
		$toc = $(id);
		var arrow = $('arrowThesaurus');
		if ($toc.style.display == 'none') {
			newArrow = arrow.src.replace("right", "down");
			arrow.src = newArrow;
			$toc.blindDown();
		} else {
			newArrow = arrow.src.replace("down", "right");
			arrow.src = newArrow;
			$toc.blindUp();
		}
	} else {
		$toc = $('thes_'+id);
		var head = $('thesHead_'+id);
		if ($toc == null) {
			head.style.fontWeight = 'bold';
		} else {
			if ($toc.style.display == 'none') {
				head.style.fontWeight = 'bold';
				//newArrow = arrow.src.replace("right", "down");
				//arrow.src = newArrow;
				$toc.blindDown();
			} else {
				head.style.fontWeight = 'normal';
				//newArrow = arrow.src.replace("down", "right");
				//arrow.src = newArrow;
				$toc.blindUp();
			}
		}
	}
}

function zoomImage(src) {
	window.open('http://zoom.duitscheorde.nl/zoom.php?src='+encodeURI(src), 'zoom', 'location=0,menubar=0,status=0,directories=0,toolbar=0,resizable=1');
}

