var correctField = "#ffffff";
var incorrectField = "#FAB870";

/*
function submitForm() {
	if ( isFilled() ) {
		if (confirm("Thankyou.\nYour submission is now being sent.") ) {
			return true;
		}
	}
	
	else
		return false;   
}
*/

function isFilled() {
	var frm = document.forms[0];

		if (frm.FirstName.value == "") {
			alert("Please enter your First Name.");
			frm.FirstName.style.backgroundColor = incorrectField;
			frm.FirstName.focus();
			return false;
		}

		else if (frm.LastName.value == "") {
			alert("Please enter your Last Name.");
			frm.LastName.style.backgroundColor = incorrectField;
			frm.LastName.focus();
			return false;
		}

		else if (frm.Address.value == "") {
			alert("Please enter your Address.");
			frm.Address.style.backgroundColor = incorrectField;
			frm.Address.focus();
			return false;
		}

		else if (frm.Suburb.value == "") {
			alert("Please enter your Suburb.");
			frm.Suburb.style.backgroundColor = incorrectField;
			frm.Suburb.focus();
			return false;
		}

		else if (frm.State.value == "PleaseSelect") {
			alert("Please select a state.");
			frm.State.style.backgroundColor = incorrectField;
			frm.State.focus();
			return false;
		}

		else if (frm.Postcode.value == "") {
			alert("Please enter your Postcode.");
			frm.Postcode.style.backgroundColor = incorrectField;
			frm.Postcode.focus();
			return false;
		}
	 
		else if (frm.Country.value == "") {
			alert("Please enter your Country.");
			frm.Country.style.backgroundColor = incorrectField;
			frm.Country.focus();
			return false;
		}
	 
		else if (frm.Email.value == "") {
			alert("Please enter your Email Address.");
			frm.Email.style.backgroundColor = incorrectField;
			frm.Email.focus();
			return false;
		}
	 
		else if (frm.DirectPhone.value == "") {
			alert("Please enter your Phone Number.");
			frm.DirectPhone.style.backgroundColor = incorrectField;
			frm.DirectPhone.focus();
			return false;
		}
	 
		else if (frm.AvailableFor.value == "") {
			alert("Please enter your Availability.");
			frm.AvailableFor.style.backgroundColor = incorrectField;
			frm.AvailableFor.focus();
			return false;
		}
	 
		else if (frm.Qualifications.value == "") {
			alert("Please enter your Qualifications.");
			frm.Qualifications.style.backgroundColor = incorrectField;
			frm.Qualifications.focus();
			return false;
		}
	 
		else if (frm.DescriptionOfYourself.value == "") {
			alert("Please enter a Description of Yourself.");
			frm.DescriptionOfYourself.style.backgroundColor = incorrectField;
			frm.DescriptionOfYourself.focus();
			return false;
		}
	return true;
}

function isCorrect() {
	var frm = document.forms[0];

		frm.FirstName.style.backgroundColor = correctField;
		frm.LastName.style.backgroundColor = correctField;
		frm.Address.style.backgroundColor = correctField;
		frm.Suburb.style.backgroundColor = correctField;
		frm.State.style.backgroundColor = correctField;
		frm.Postcode.style.backgroundColor = correctField;
		frm.Country.style.backgroundColor = correctField;
		frm.Email.style.backgroundColor = correctField;
		frm.DirectPhone.style.backgroundColor = correctField;
		frm.AvailableFor.style.backgroundColor = correctField;
		frm.Qualifications.style.backgroundColor = correctField;
		frm.DescriptionOfYourself.style.backgroundColor = correctField;
	}
