
	
//function to check valid email address
function isValidEmail(strEmail) {
	validRegExp = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
	
   // search email text for regular exp matches
   if (strEmail.search(validRegExp) == -1) {
      alert("'" + strEmail + "'" + ' er ikke en gyldig e-postadresse');
      return false;
    } 
    return true; 
}

function  checkForm(theForm) {
	if (isValidEmail(theForm.epost.value) == false) {	
		theForm.epost.focus();
		return false;
	}						
}

