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.phone.value=='')
	{
		alert("The 'Contact phone' cannot be empty. Please complete the 'Contact phone' field.");
		document.form1.phone.focus();
		return false;
	}
	if(document.form1.citizen.value=='')
	{
		alert("The 'Current citizenship' cannot be empty. Please complete the 'Current citizenship' field.");
		document.form1.citizen.focus();
		return false;
	}
	if(document.form1.country.value=='')
	{
		alert("The 'Current country of residence' cannot be empty. Please complete the 'Current country of residence' field.");
		document.form1.country.focus();
		return false;
	}
	if(document.form1.old.value=='')
	{
		alert("The 'How old are you?' cannot be empty. Please complete the 'How old are you?' field.");
		document.form1.old.focus();
		return false;
	}

	if(document.form1.calInput1.value=='')
	{
		alert("The 'When do you intend to enter Australia on a Working Holiday Visa?' cannot be empty. Please complete the 'When do you intend to enter Australia on a Working Holiday Visa?' field.");
		document.form1.calInput1.focus();
		return false;
	}
	return true;
}
function test(src)
{
     var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
     var regex = new RegExp(emailReg);
     return regex.test(src);
}
