function Trim(inputString) {
	if (typeof inputString != "string") { return inputString; }
	var retValue = inputString;
	var ch = retValue.substring(0, 1);
	while (ch == " ") {
		retValue = retValue.substring(1, retValue.length);
		ch = retValue.substring(0, 1);
	}
	ch = retValue.substring(retValue.length-1, retValue.length);
	while (ch == " ") {
		retValue = retValue.substring(0, retValue.length-1);
		ch = retValue.substring(retValue.length-1, retValue.length);
	}
	while (retValue.indexOf("  ") != -1) { retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); }
	return retValue;
}

function LReactieCheck() {
	if (Trim(document.l_reactieform.naam.value) == "" || Trim(document.l_reactieform.naam.value) == "Naam") {
		alert("Je moet wel even je naam invullen.");
		document.l_reactieform.naam.focus();
	} else if (Trim(document.l_reactieform.reactie.value) == "" || Trim(document.l_reactieform.reactie.value) == "Reactie") {
		alert("Je moet wel even een reactie invullen.");
		document.l_reactieform.reactie.focus();
	} else { document.l_reactieform.submit(); }
}

function SReactieCheck() {
	if (Trim(document.s_reactieform.naam.value) == "" || Trim(document.s_reactieform.naam.value) == "Naam") {
		alert("Je moet wel even je naam invullen.");
		document.s_reactieform.naam.focus();
	} else if (Trim(document.s_reactieform.reactie.value) == "" || Trim(document.s_reactieform.reactie.value) == "Reactie") {
		alert("Je moet wel even een reactie invullen.");
		document.s_reactieform.reactie.focus();
	} else { document.s_reactieform.submit(); }
}