function setInfoBox(value,field) {
	document.getElementById(field).innerHTML = value+'<br /><a class="infoBox" onclick="cleanInfoBox(\''+field+'\')" title="Sluiten">x Sluiten</a>';
}

function cleanInfoBox(field) {
	document.getElementById(field).innerHTML = '';
}

function countTekens(input,field,max) {
	if ((max-input.length) <= 10) {
		document.getElementById(field).style.color = '#e10000';
	} else if ((max-input.length) <= 50) {
		document.getElementById(field).style.color = '#e19a00';
	} else {
		document.getElementById(field).style.color = '#666666';
	}
	
	if ((max-input.length) == 1) {
		document.getElementById(field).innerHTML = '1 teken';
	} else {
		document.getElementById(field).innerHTML = (max-input.length)+' tekens';
	}
	
	if (input.length < 1) {
		document.getElementById('reactieToevoegen').disabled = true;
	} else {
		document.getElementById('reactieToevoegen').disabled = false;
	}
}

function visible(field,type) {
	document.getElementById(field).style.visibility = type;
}

function minTekens(input,field,min) {
	if (input.length < min) {
		document.getElementById(field).disabled = true;
	} else {
		document.getElementById(field).disabled = false;
	}
}

function confirmBox(url,text) {
	var confirmCheck = confirm(text);
	
	if (confirmCheck) {
		window.location = url;
	}
}
