sfHover = function() {
	var sfEls = document.getElementById("topnavigatie").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

var teller = 1;

function imgchng() {
  teller++;
  if (teller>16) { teller = 0; }
  var id='header';
  var imageURL = '../gfx/header_background_'+teller+'.jpg';
  if (document.layers)
    document[id].background.src = imageURL == 'none' ? null : imageURL;
  else if (document.all)
    document.all[id].style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
  else if (document.getElementById)
    document.getElementById(id).style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
}


function toggle(obj) { 
	var el = document.getElementById(obj); 
	if ( el.style.display != 'none' ) { 
		el.style.display = 'none';
		el.style.className == 'hidden'
	} 
	else { 
		el.style.display = 'block';
		el.style.className == ''
	} 
}

function hidedivs() {
	var x = document.getElementsByTagName('div');
	for (var i=0;i<x.length;i++)
	{
		if (x[i].className == 'hidden')
			x[i].style.display = 'none';
	}
}

var newwindow = '';
function popup(url, width, height)
{
	if (!(width>=1))
	{
		width=640;
	}
	if (!(height>=1))
	{
		height=600;
	}
	if (newwindow.location && !newwindow.closed)
	{
		newwindow.location.href = url;
	}
	else
	{
		dingen = "height=" + height + ",width=" + width + ",resizable=1,scrollbars=1";
		newwindow=window.open(url,'info',dingen);
	}
	if (window.focus) {newwindow.focus()}
}

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
	for (var i=1; i<7; i++) {
		DivID = "behandeltrajecttxt" + i;
		var obj = document.layers ? document.layers[DivID] :
		document.getElementById ?  document.getElementById(DivID).style : document.all[DivID].style;
		(i==szDivID) ? obj.display = "block" :  obj.display = "none";
	}
}

function show(id) {
	for (var i=1; i<10; i++) {
		var txtid = "txt"+i;
		var imgid = "knipper"+i;

		var image = "../gfx/corpus/knipper-"+i+".gif";
		document.getElementById(imgid).src = image;
		document.getElementById(txtid).style.display = 'none';
	}

	imgid = "knipper"+id;
	document.getElementById(imgid).src = '../gfx/corpus/knipper-select.gif';

	txtid = "txt"+id;
	document.getElementById(txtid).style.display = 'block';
}