function validateForm(actionActivate, actionRegister, actionDecline) {				
	radioBox = document.getElementsByName("radioBox");
				
	// Activation
	if (radioBox[0].checked) {
		if (validateActivationForm()) {
			document.forms['registration'].action = actionActivate;	
			document.forms['registration'].submit();
		}
	// Register
	} else if (radioBox[1].checked) {
		if (validateRegistrationForm()) {
			document.forms['registration'].action = actionRegister;	
			document.forms['registration'].submit();
		}
	// Decline
	} else if (radioBox[2].checked) {
		document.location.href = actionDecline;
		return false;
	}
	
	return false;
}

function validateActivationForm() {
	if (validateField('SB_Validator.notEmpty', 'activationCode', 'EMPTY-ACTIVATION-CODE')) {
		return true;
	} else {
		return false;
	}
}

function validateRegistrationForm() {	
	if (validateField('SB_Validator.notEmpty', 'inputFirstName', 'EMPTY-FIRST-NAME')
		&& validateField('SB_Validator.notEmpty', 'inputLastName', 'EMPTY-LAST-NAME')
		&& validateField('SB_Validator.notEmpty', 'inputEmail', 'EMPTY-EMAIL')
		&& validateField('SB_Validator.isEmail', 'inputEmail', 'INVALID-EMAIL')
	) {
		return true;
	} else {
		return false;
	}
}