function validate(){
		
		if(document.reg.name.value=="Navn")
		{
			var nam="Please enter the name";
			alert(nam);
			document.reg.name.focus();
			return false;
		}
		
		if (document.reg.day.value=="") 
		{
			alert("Please select the day");
			document.reg.day.focus();
			return false;
		}
		if (document.reg.month.value=="") 
		{
			alert("Please select the month");
			document.reg.month.focus();
			return false;
		}
		if (document.reg.year.value=="") 
		{
			alert("Please select the year");
			document.reg.year.focus();
			return false;
		}
		if(document.reg.height.value=="Høyde(cm)")
		{
			var heigh="Please enter the height";
			alert(heigh);
			document.reg.height.focus();
			return false;
		}
		if (isNaN(document.reg.height.value)) 
		{
			alert("You did not enter a valid height.");
			document.reg.height.focus();
			return false;
		}
		if(document.reg.phone.value=="Telefon")
		{
			var phone="Please enter the phone number";
			alert(phone);
			document.reg.phone.focus();
			return false;
		}
		if (isNaN(document.reg.phone.value)) 
		{
			alert("You did not enter a valid phone number.");
			document.reg.phone.focus();
			return false;
		}
                if(document.reg.phone_valid.value=="100")
		{
			var phone="Ditt telefonnummer har allerede blitt bruk til registrering for Miss Brun og blid 2011. Det er kun lov å melde seg på én gang";
			alert(phone);
			document.reg.phone.focus();
			return false;
		}
		if(document.reg.address.value=="Adresse")
		{
			var add="Please enter the address";
			alert(add);
			document.reg.address.focus();
			return false;
		}
		if(document.reg.zip.value=="Postnr.")
		{
			var zip1="Please enter the Postnr.";
			alert(zip1);
			document.reg.zip.focus();
			return false;
		}
		if(document.reg.location.value=="Sted")
		{
			var sted="Please enter the Sted";
			alert(sted);
			document.reg.location.focus();
			return false;
		}
		if(document.reg.email.value=="E-post")
		{
			var mail="Please enter the e-mail";
			alert(mail);
			document.reg.email.focus();
			return false;
		}

		if(document.reg.email.value!="")
		{

		var reg1 = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	   	var address = document.reg.email.value;
   		if(reg1.test(address) == false) {
      		alert('Invalid Email Address');
      		return false;
   		}
		}


		if(document.reg.interests.value=="Intersser")
		{
			var int="Please enter the Intersser";
			alert(int);
			document.reg.interests.focus();
			return false;
		}
		if(document.reg.upload_area.value=="")
		{
			var nam="Vennligst last opp bildet for Ansikt(forfra)";
			alert(nam);
 			document.reg.upload_area.focus();
			return false;
		}
		if(document.reg.upload_area1.value=="")
		{
			var nam="Vennligst last opp bildet for Ansikt(profil)";
			alert(nam);
 			document.reg.upload_area1.focus();
			return false;
		}
		if(document.reg.upload_area2.value=="")
		{
			var nam="Vennligst last opp bildet for Bikini(hele kroppen) ";
			alert(nam);
 			document.reg.upload_area2.focus();
			return false;
		}
		if(document.reg.upload_area3.value=="")
		{
			var nam="Vennligst last opp bildet for Bikini(overkropp)";
			alert(nam);
 			document.reg.upload_area3.focus();
			return false;
		}
		if(document.reg.chk.checked==false)
		{
		alert("you have to accept terms and condition first");
		return false;
    		}

}
