function checkForm() {
	result = true;
	if (kontaktskjema.fornavn.value == "" || kontaktskjema.fornavn.value == null) {
		document.kontaktskjema.fornavn.focus();
		var minBox = open("","Obs","width=250,height=250");
		minBox.document.open();
		minBox.document.write("<html><head><title>Error</title><link href='../javastyle.css' rel='stylesheet' type='text/css' /></head><body>");
		minBox.document.write("<h1>Ooops!</h1><p>You have to fill in your <strong>firstname</strong> before submitting the form. Please try again<p>");
		minBox.document.write("<p><a href='javascript;' onclick='window.close();'>Close window</a></p>");
		minBox.document.write("</body></html>");
		minBox.document.close();
		result = false;
	}
	else if (kontaktskjema.etternavn.value == "" || kontaktskjema.etternavn.value == null) {
		document.kontaktskjema.etternavn.focus();
		var minBox = open("","Obs","width=250,height=250");
		minBox.document.open();
		minBox.document.write("<html><head><title>Error</title><link href='../javastyle.css' rel='stylesheet' type='text/css' /></head><body>");
		minBox.document.write("<h1>Ooops!</h1><p>You have to fill in your <strong>lastname</strong> before subitting the form. Please try again!<p>");
		minBox.document.write("<p><a href='javascript;' onclick='window.close();'>Close window</a></p>");
		minBox.document.write("</body></html>");
		minBox.document.close();
		result = false;
	}
	else if (kontaktskjema.epost.value == "" || kontaktskjema.epost.value == null) {
		document.kontaktskjema.epost.focus();
		var minBox = open("","Obs","width=250,height=250");
		minBox.document.open();
		minBox.document.write("<html><head><title>Error</title><link href='../javastyle.css' rel='stylesheet' type='text/css' /></head><body>");
		minBox.document.write("<h1>Ooops!</h1><p>You have till in your <strong>email address</strong> before submitting the form. Please try again!<p>");
		minBox.document.write("<p><a href='javascript;' onclick='window.close();'>Close window</a></p>");
		minBox.document.write("</body></html>");
		minBox.document.close();
		result = false;
	}	
	else if (kontaktskjema.epost.value.indexOf('@') == -1) {
		document.kontaktskjema.epost.focus();
		var minBox = open("","Obs","width=250,height=250");
		minBox.document.open();
		minBox.document.write("<html><head><title>Error</title><link href='../javastyle.css' rel='stylesheet' type='text/css' /></head><body>");
		minBox.document.write("<h1>Ooops!</h1><p>You have to fill in <strong>a valid email address</strong> before submitting the form. Please try again!<p>");
		minBox.document.write("<p><a href='javascript;' onclick='window.close();'>Close window</a></p>");
		minBox.document.write("</body></html>");
		minBox.document.close();
		result = false;
	}
	else if (kontaktskjema.land.value == "" || kontaktskjema.land.value == null){
		document.kontaktskjema.land.focus();
		var minBox = open("","Obs","width=250,height=250");
		minBox.document.open();
		minBox.document.write("<html><head><title>Error</title><link href='../javastyle.css' rel='stylesheet' type='text/css' /></head><body>");
		minBox.document.write("<h1>Ooops!</h1><p>You have to chose your<strong> contry</strong> before submitting the form. Please try again!<p>");
		minBox.document.write("<p><a href='javascript;' onclick='window.close();'>Close window</a></p>");
		minBox.document.write("</body></html>");
		minBox.document.close();
		result = false;
	}	
	return result;
}
