function validatePwd() {
var invalid = " "; // Invalid character is a space
var minLength = 6; // Minimum length
var pw1 = document.myForm.password.value;

// check for a value in both fields.
if (pw1 == '') {
	alert('Geef je vouchercode op');
	return false;
}

// check for minimum length
if (document.myForm.password.value.length < minLength) {
	alert('Dit is een ongeldige vouchercode');
	return false;
}

// check for spaces
if (document.myForm.password.value.indexOf(invalid) > -1) {
	alert("Dit is een ongeldige vouchercode");
	return false;
}

else {
	return true;
	}
}

