function submitForm()	{
	if (register()==true) {
		document.Registration_Form.action="thanks.php";
		document.Registration_Form.submit();
	}
}

function register() {
	var theForm = document.Registration_Form;
	var titlename = theForm.Title_Name;
	var firstname = theForm.First_Name;
	var lastname = theForm.Last_Name;
	var company = theForm.Company_Name;
	var address1 = theForm.Company_Address_1;
	var town = theForm.Company_Town;
	var postcode = theForm.Company_Postcode;
	var phone = theForm.Phone_Number;
	var email = theForm.Email_Address;
	var interest = theForm.Conference_Interest;
	
	if (titlename.value.length < 1) {
		window.alert("Please select your Title");
		return false;
	}
	else if (firstname.value.length < 1) {
		window.alert("You must enter a valid First name - yours seems a little short");
		firstname.focus();
		return false;
	}
	else if (lastname.value.length < 1) {
		window.alert("You must enter a valid Last name - yours seems a little short");
		lastname.focus();
		return false;
	}
	else if (company.value.length < 1) {
		window.alert ("Please enter your company's Name");
		company.focus();
		return false;
	}
	else if (address1.value.length < 1) {
		window.alert ("Please enter your company's Address");
		address.focus();
		return false;
	}
	else if (town.value.length < 1) {
		window.alert ("Please enter your company's Town/City");
		town.focus();
		return false;
	}
	else if (postcode.value.length < 1) {
		window.alert ("Please enter your company's Postcode");
		postcode.focus();
		return false;
	}
	else if (phone.value.length < 1) {
		window.alert ("Please enter your company's Phone number");
		phone.focus();
		return false;
	}
	else if ((email.value.length < 1) || (email.value.indexOf ('@') == -1) || (email.value.indexOf ('.') == -1)) {
		window.alert("Please Enter your Email Address\n\nPlease ensure this is a valid email address\neg: you@somewhere.com");
		email.focus();
		return false;
	}
	else if (interest.value.length < 1) {
		window.alert ("Please indicate your interest in the conference");
		return false;
	}
	else
	{
		return true;
	}
}
