function ValidateKonk(theForm){
	if (!rightLength(theForm.Email.value,1,100,"E-post")){
		theForm.Email.focus();
		return (false);
	}
	if (!isEmailAdress(theForm.Email.value)){
		alert("E-posten er ikke gyldig!");
		theForm.Email.focus();
		return (false);
	}	
	if (!rightLength(theForm.Name.value,1,30,"Navn")){
		theForm.Name.focus();
		return (false);
	}
	if (!validText(theForm.Name.value," ","Navn")){
		theForm.Name.focus();
		return (false);
	}		
	if (!rightLength(theForm.Phone.value,1,15,"Telefon")){
		theForm.Phone.focus();
		return (false);
	}
	if (!isInteger(theForm.Phone.value)){
		alert("Galt format på telefonnummer. Bruk bare tall!");
		theForm.Phone.focus();
		return (false);
	}

	return true;
}

function ValidateRegister(theForm){
	if (!rightLength(theForm.Email.value,1,100,"E-post")){
		theForm.Email.focus();
		return (false);
	}
	if (!isEmailAdress(theForm.Email.value)){
		alert("E-posten er ikke gyldig!");
		theForm.Email.focus();
		return (false);
	}	
	if (!rightLength(theForm.Name.value,1,30,"Navn")){
		theForm.Name.focus();
		return (false);
	}
	if (!validText(theForm.Name.value," ","Navn")){
		theForm.Name.focus();
		return (false);
	}		
	if (!rightLength(theForm.Phone.value,1,15,"Telefon")){
		theForm.Phone.focus();
		return (false);
	}
	if (!isInteger(theForm.Phone.value)){
		alert("Galt format på telefonnummer. Bruk bare tall!");
		theForm.Phone.focus();
		return (false);
	}

	return true;
}


function ValidateResearch(theForm)
{
	if (getCheckedValue(theForm.spm1) == "" ||
		getCheckedValue(theForm.spm2) == "" ||
		getCheckedValue(theForm.spm3) == "" ||
		getCheckedValue(theForm.spm5) == "" ||
		getCheckedValue(theForm.spm6) == "" ||
		getCheckedValue(theForm.spm7) == "" ||
		getCheckedValue(theForm.spm8) == "" ||
		getCheckedValue(theForm.spm9) == "" ||
		getCheckedValue(theForm.spm10) == "" ||
		getCheckedValue(theForm.spm11) == "" ||
		getCheckedValue(theForm.spm12) == "" ||
		getCheckedValue(theForm.spm13) == "" ||
		getCheckedValue(theForm.spm14) == "" ||
		getCheckedValue(theForm.spm15) == "" ||
		getCheckedValue(theForm.spm16) == "" ||
		getCheckedValue(theForm.spm17) == "" ||
		getCheckedValue(theForm.spm18) == "" ||
		getCheckedValue(theForm.spm19) == "")
	{
		alert("Du må svare på alle spørsmålene!");	
		return false;
	}
		
	return true;
}