function addTXT(text, veld) {
	text = ''+text+' ';
	naar = document.getElementById(veld);

		naar.focus();
  		naar.value += text;

}
// REACTIEPOP
function reactiepop(url) {
	window.open(url,'reacties','height=500,width=600,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes');
}
function stem_pop(url) {
	window.open(url,'reacties','height=200,width=340,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes');
}
function vertel_pop(url) {
	window.open(url,'reacties','height=500,width=550,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes');
}
function popup(url, hoogte, breedte) {
	window.open(url,'reacties','height='+hoogte,width='+breedte,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes');
}

// een formulier checken, of alles wel is ingevuld:
function checkForm(id) {
	error = new Array;
	form = document.getElementById(id);
	for(i=0; i<form.length; i++) {
		if( (form[i].type == 'text' || form[i].type == 'textarea') && form[i].value == '') {
			form[i].style.background = '#EEEEEE';
			error[i] = true;
		} else if(form[i].type == 'text' || form[i].type == 'textarea') {
			form[i].style.bgcolor = '';
			error[i] = false;
		}
	}
	// de array error doorlopen en kijken of er errors zijn:
	for(i=0; i<error.length; i++) {
		if(error[i]) {
			form[i].focus
			return false;
		}
	}
}

function naam_klembord(sText) {
	var bSuccess = window.clipboardData.setData('Text', sText);
	if (bSuccess) {
		alert("De coole naam staat nu op het klembord!\nMet de 'rechter muisknop -> plakken' of 'control + v' zet je de coole naam in je MSN naam!");
	} else {
		alert('Het kopieren naar klembord is mislukt!');
	}	
}
function zeker (url, wat) {
	if (confirm(wat)) {
		location.href = url;
	} else {
		return false;
	}
}
function bericht_verwijderen(url, wat) {
	if (confirm(wat)) {
		location.href = url;
	} else {
		return false;
	}
}

