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 inte gyldig!");
		theForm.Email.focus();
		return (false);
	}	
	if (!rightLength(theForm.Name.value,1,30,"Namn")){
		theForm.Name.focus();
		return (false);
	}
	if (!validText(theForm.Name.value," ","Namn")){
		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 ValidateKonk(theForm){
		
	if (!isChecked(theForm.spm1)){			
		alert("Var snäll besvara samtliga frågor");			
		return (false);
	}
	
	if (!isChecked(theForm.spm2)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	
	if (!isChecked(theForm.spm3)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	
	if (!isChecked(theForm.spm4)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	
	if (!(theForm.spm5_1.checked) && !(theForm.spm5_2.checked) && !(theForm.spm5_3.checked) && !(theForm.spm5_4.checked)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	
	if (theForm.spm5_4.checked && ( (theForm.spm5_1.checked) || (theForm.spm5_2.checked) || (theForm.spm5_3.checked) ) ){
		alert("Du kan inte krysse av for punkt 4 og flere!");		
		return (false);
	}
		
	if (!(theForm.spm6_1.checked) && !(theForm.spm6_2.checked) && !(theForm.spm6_3.checked) && !(theForm.spm6_4.checked) && !(theForm.spm6_5.checked) && !(theForm.spm6_6.checked) && !(theForm.spm6_7.checked) && !(theForm.spm6_8.checked)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	
	if (!(theForm.spm7_1.checked) && !(theForm.spm7_2.checked) && !(theForm.spm7_3.checked) && !(theForm.spm7_4.checked) && !(theForm.spm7_5.checked) && !(theForm.spm7_6.checked) && !(theForm.spm7_7.checked) && !(theForm.spm7_8.checked) && !(theForm.spm7_9.checked && !(theForm.spm7_10.checked && !(theForm.spm7_11.checked)))){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	
	if (!isChecked(theForm.spm8)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	
	if (!isChecked(theForm.spm10)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}	
	
	if (!isChecked(theForm.spm12)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	
	if (!isChecked(theForm.spm13)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	if (!isChecked(theForm.spm14)){
		alert("Var snäll besvara samtliga frågor");
		return (false);
	}
	if (!isChecked(theForm.spm15)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	if (!isChecked(theForm.spm16)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	if (!isChecked(theForm.spm17)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	if (!isChecked(theForm.spm18)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	if (!isChecked(theForm.spm19)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	
	if (!isChecked(theForm.spm21)){
		alert("Var snäll besvara samtliga frågor");
		return (false);
	}
	if (!isChecked(theForm.spm22)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	if (!isChecked(theForm.spm23)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	if (isEmpty(theForm.spm25.value)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	if (!isChecked(theForm.spm26)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	if (!isChecked(theForm.spm27)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}
	if (!isChecked(theForm.spm28)){
		alert("Var snäll besvara samtliga frågor");		
		return (false);
	}

	return true;
}