function isEmpty(myForm ) 
{
	
	strfield1 = myForm.fornamn.value;
	strfield2 = myForm.efternamn.value; 
	strfield4 = myForm.telefon.value; 
	strfield5 = myForm.mobil.value; 
	strfield6 = myForm.adress.value;
	strfield7 = myForm.postnr.value;
	strfield8 = myForm.ort.value;
	strfield9 = myForm.land.value;
	strfield10 = myForm.year.value;
	strfield11 = myForm.month.value;
	strfield12 = myForm.day.value;
	strfield13 = myForm.telefonrikt.value;
	strfield14 = myForm.mobilrikt.value;
	
    	if (strfield1 == "" || strfield1 == null || !isNaN(strfield1) )
    	{
    		alert("Du måste fylla i ditt förnamn.");
    		return false;
    	}
	if (strfield2 == "" || strfield2 == null || !isNaN(strfield2) )
    	{
    		alert("Du måste fylla i ditt efternamn.");
    		return false;
    	}
	
	if (strfield10 == "" || strfield10 == null || isNaN(strfield10) )
    	{
    		alert("Du måste fylla i vilket år du är född.");
    		return false;
    	}    
	if (strfield11 == "" || strfield11 == null || isNaN(strfield11) )
    	{
    		alert("Du måste fylla i vilken månad du är född.");
    		return false;
    	}   
	if (strfield12 == "" || strfield12 == null || isNaN(strfield12) )
    	{
    		alert("Du måste fylla i vilken dag du är född.");
    		return false;
    	}  
	
	
	if (strfield13 == "" || strfield13 == null || isNaN(strfield13) )
    	{
    		alert("Du måste fylla i ditt telfonnummers riktnummer.");
    		return false;
    	}  	
	
	if (strfield4 == "" || strfield4 == null || isNaN(strfield4) )
    	{
    		alert("Du måste fylla i ditt telefonnummer.");
    		return false;
    	}
	
	if (strfield14 == "" || strfield14 == null || isNaN(strfield14) )
    	{
    		alert("Du måste fylla i de första siffrorna i ditt mobilnummer.");
    		return false;
    	}  
	
	
	if (strfield5 == "" || strfield5 == null || isNaN(strfield5) )
    	{
    		alert("Du måste fylla i ditt mobilnummer.");
    		return false;
    	}   


    	
		
	if (strfield6 == "" || strfield6 == null || !isNaN(strfield6) )
    	{
    		alert("Du måste fylla i din adress.");
    		return false;
    	}     
	if (strfield7 == "" || strfield7 == null || isNaN(strfield7) )
    	{
    		alert("Du måste fylla i ditt postnummer, endast siffor tillåts.");
    		return false;
    	}     
	if (strfield8 == "" || strfield8 == null || !isNaN(strfield8) )
    	{
    		alert("Du måste fylla i din ort.");
    		return false;
    	}     
	if (strfield9 == "" || strfield9 == null || !isNaN(strfield9) )
    	{
    		alert("Du måste fylla i ditt land.");
    		return false;
    	}     


	
    	
    	return true;
}


function checkEmail(myForm) 
{	

	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.epost.value))
	{
		return (true)
	}
	alert("Du har angivit en ogiltig epostadress. Kontrollera den angivna adressen!")
	return (false)
}


function check(form)
{
	
	if (isEmpty(form))
	{
		if (checkEmail(form))
		{
		  return true;
		}
	}
	return false;
}
