function validate_entry()
{   if(document.form1.fname.value=='')
	{
		alert("The 'First name' cannot be empty. Please complete the 'First name' field.");
		document.form1.fname.focus();
		return false;
	}
	if(document.form1.lname.value=='')
	{
		alert("The 'Last name' cannot be empty. Please complete the 'Last name' field.");
		document.form1.lname.focus();
		return false;
	}
	if(document.form1.email.value=='')
	{
		alert("The 'Email address' cannot be empty. Please complete the 'Email address' field.");
		document.form1.email.focus();
		return false;
	}
 if(!test(document.form1.email.value))
	{
		alert("Invalid Email adress.");
		document.form1.email.focus();
		return false;
	}
	if(document.form1.country.value=='')
	{
		alert("The 'Which country are you currently living in?' cannot be empty. Please complete the 'Which country are you currently living in?' field.");
		document.form1.country.focus();
		return false;
	}
	if(document.form1.passports.value=='')
	{
		alert("The 'Which country or countries do you currently have passports for?' cannot be empty. Please complete the 'Which country or countries do you currently have passports for?' field.");
		document.form1.passports.focus();
		return false;
	}
	if(document.form1.age.value=='')
	{
		alert("The 'What is your age?' cannot be empty. Please complete the 'What is your age?' field.");
		document.form1.age.focus();
		return false;
	}

	if(document.form1.occupation.value=='')
	{
		alert("The 'What is your occupation?' cannot be empty. Please complete the 'What is your occupation?' field.");
		document.form1.occupation.focus();
		return false;
	}
	if(document.form1.occupationlo.value=='')
	{
		alert("The 'How long have you been in this occupation?' cannot be empty. Please complete the 'How long have you been in this occupation?' field.");
		document.form1.occupationlo.focus();
		return false;
	}
	if(document.form1.diploma.value=='')
	{
		alert("The 'What is the highest level of degree or diploma that you have received?' cannot be empty. Please complete the 'What is the highest level of degree or diploma that you have received?' field.");
		document.form1.diploma.focus();
		return false;
	}
	if(document.form1.diplomaco.value=='')
	{
		alert("The 'In which country did you receive your degree or diploma?' cannot be empty. Please complete the 'In which country did you receive your degree or diploma?' field.");
		document.form1.diplomaco.focus();
		return false;
	}
	if(document.form1.married.value=='')
	{
		alert("The 'Are you married, in a de facto marital relationship, or a life partnership?' cannot be empty. Please complete the 'Are you married, in a de facto marital relationship, or a life partnership?' field.");
		document.form1.married.focus();
		return false;
	}
	if(document.form1.spouseoc.value=='')
	{
		alert("The 'What is your spouse or partner's occupation?' cannot be empty. Please complete the 'What is your spouse or partner's occupation?' field.");
		document.form1.spouseoc.focus();
		return false;
	}	
	return true;
}
function test(src)
{
     var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
     var regex = new RegExp(emailReg);
     return regex.test(src);
}
