
function checkPWDForm() {
	var e = document.getElementById('alternativ-email');
	if (!e.value.match(/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i)) {
		alert('Invalid alternative e-mail address!');
		e.focus();
		return false;
	}

	e = document.getElementById('question');
	if (e.selectedIndex == 6) {
		e = document.getElementById('question-own-field');
		if (e.value.match(/^ *$/)) {
			alert('Empty question field!');
			e.focus();
			return false;
		}
	}

	e = document.getElementById('question');
	if (e.selectedIndex > 0) {
		e = document.getElementById('answer');
		if (e.value.match(/^ *$/)) {
			alert('Empty answer field!');
			e.focus();
			return false;
		}
	}

	return true;
}

function checkPWDForm2() {
	var e = document.getElementById('email');
	if (e.value.match(/^ *$/)) {
		alert('Empty e-mail address field!');
		e.focus();
		return false;
	}

	return checkPWDForm();
}

