/*Event.observe(window, 'load', function() {
	$('frmContactUs').show();
});*/
function validateForm() {
	var firstName = $('txtFirstName');
	var lastName = $('txtLastName');
	var businessName = $('txtBusinessName');
	var landline = $('txtLandline');
	var mobile = $('txtMobile');
	var email = $('txtEmail');
	var address1 = $('txtAddress1');
	var address2 = $('txtAddress2');
	var suburb = $('txtSuburb');
	var postcode = $('txtPostcode');
	var message = $('taMessage');
	
	if(firstName.value.blank()) {
		alert("Please enter your first (given) name.");
		firstName.focus();
		return false;
	}
	if(lastName.value.blank()) {
		alert("Please enter your last (family) name.");
		lastName.focus();
		return false;
	}
	if(landline.value.blank() && mobile.value.blank()) {
		alert("Please provide at least one contact phone number.");
		landline.focus();
		return false;
	}
	if(!landline.value.blank()) {
		if(!landline.value.match(/^\d+$/)) {
			alert("Landline phone number may only contain numbers.");
			landline.focus();
			return false;
		}
	}
	if(!mobile.value.blank()) {
		if(!mobile.value.match(/^\d+$/)) {
			alert("Mobile phone number may only contain numbers.");
			mobile.focus();
			return false;
		}
	}
	if(!email.value.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/)) {
		alert("Please enter a valid email address of yours.");
		email.focus();
		return false;
	}
	if(suburb.value.blank()) {
		alert("Please enter the suburb you reside in or where the job will be taking place.");
		suburb.focus();
		return false;
	}
	if(postcode.value.blank()) {
		alert("Please enter the postcode of the suburb you reside in or where the job will be taking place.");
		postcode.focus();
		return false;
	}
	if(!postcode.value.blank()) {
		if(!postcode.value.match(/^\d+$/)) {
			alert("Postcode may only contain numbers.");
			postcode.focus();
			return false;
		}
	}
	if(message.value.blank()) {
		alert("Your message cannot be blank.");
		message.focus();
		return false;
	}
	
	return true;
}