function optional(email) {
	var dpos = email.lastIndexOf(".");
	var apos = email.lastIndexOf("@");
	var c = 0;
	if (email == "") {
		if (confirm("You did not enter an e-mail.\nDo you want to continue?")) {
			return 2;
		}
		else {
			return 1;
		}
	}
	if (apos < 1 || dpos < (apos + 2) || dpos == email.length || dpos < 0) {
		if (confirm("You entered an invalid e-mail.\nDo you want to continue?")) {
			c = 1;
			email = "";
		}
		else {
			return 1;
		}
		email = "";
	}
	if (c == 1) {
		return 2;
	}
	else {
		return 0;
	}
}

