
function ValidateTipsEnVenn(theForm){
	if (!rightLength(theForm.sender_email.value,1,100,"Din epostadresse")){
		theForm.sender_email.focus();
		return (false);
	}
	if (!isEmailAdress(theForm.sender_email.value)){
		alert("Din epostadressen er ikke gyldig!");
		theForm.sender_email.focus();
		return (false);
	}
	if (!rightLength(theForm.receiver_email.value,1,100,"Mottaker epostadresse")){
		theForm.receiver_email.focus();
		return (false);
	}
	if (!isEmailAdress(theForm.receiver_email.value)){
		alert("Mottaker epostadressen er ikke gyldig!");
		theForm.receiver_email.focus();
		return (false);
	}
	if (!rightLength(theForm.comment.value,1,255,"Kommentar")){
		theForm.comment.focus();
		return (false);
	}
	if (!validText(theForm.comment.value," _-,.&@;:?![]()\/<>","Kommentar")){
		theForm.comment.focus();
		return (false);
	}
	
	return true;
}

function ValidateSendTips(theForm){
	if (!rightLength(theForm.Epost.value,1,100,"Din epostadresse")){
		theForm.Epost.focus();
		return (false);
	}
	if (!isEmailAdress(theForm.Epost.value)){
		alert("Din epostadressen er ikke gyldig!");
		theForm.Epost.focus();
		return (false);
	}
	if (!rightLength(theForm.Tips.value,1,255,"Kommentar")){
		theForm.Tips.focus();
		return (false);
	}
	if (!validText(theForm.Tips.value," _-,.&@;:?![]()\/<>","Kommentar")){
		theForm.Tips.focus();
		return (false);
	}
	
	return true;
}

