

// uitklaplinks



function klap(num,klaptal) {



if(document.getElementById('w'+num).style.display=='block') 

	{ wis(klaptal); }

else {

var v = false;

for(var n=0; n<klaptal; n++) {

	if(document.getElementById('w'+n).style.display=='block' && n!=num) {

		v = true; }

}

if(v) {

		wis(klaptal); }

		display(num);

	}
}



function display(num) {

		document.getElementById('w'+num).style.display='block'; 
		document.getElementById('p'+num).style.height='12px';
		document.getElementById('p'+num).style.width='14px';
		document.getElementById('p'+num).src='afb/blokje.gif';
		document.getElementById('a'+num).style.fontWeight='bold';

}

function wis(klaptal) {


for (var n=0; n<klaptal; n++) {
	document.getElementById('w'+n).style.display='none';
	document.getElementById('p'+n).style.height='14px';
	document.getElementById('p'+n).style.width='12px';
	document.getElementById('p'+n).src='afb/pijln.gif';
	document.getElementById('a'+n).style.fontWeight='normal';

	}

}


onload = function eerst() {

	var u = document.location.href; 

	if(u.indexOf('#') > -1) {

		var anchor = u.replace(/^.*\#/, "");
		var num = anchor.substr(1,anchor.length-1);

		if(document.getElementById('w'+num)) { 

			display(num);

		}
	}
}



function saob() {
if ((document.getElementById('saobform').string.value>'TILL' && document.getElementById('saobform').string.value<'Z') || (document.getElementById('saobform').string.value>'till'))
{ alert('SAOB innehåller endast uppslagsord mellan A och TILL.');
document.getElementById('saobform').string.focus();
return false; }
}
