

function validateOrder() {
    var errorFound = 0;
	var errorList = "The following errors were found:\n\n";

	if (document.ordernowform.myname.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your name.\n";
	}

	if (document.ordernowform.company.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your company.\n";
	}
	
	if (document.ordernowform.phone.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your phone.\n";
	}
	
	if (document.ordernowform.email.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your email.\n";
	}
	
	if (document.ordernowform.street.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your street.\n";
	}
	
	if (document.ordernowform.suburb.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your suburb.\n";
	}
	
	if (document.ordernowform.state.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your state.\n";
	}
	
	if (document.ordernowform.postcode.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your postcode.\n";
	}
	
	if (document.ordernowform.daterequired.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter the date required.\n";
	}
	
	if (document.ordernowform.attention.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter a contact name for attention.\n";
	}
	
	if (document.ordernowform.contactnumber.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your contact number for delivery.\n";
	}
	
	if (document.ordernowform.deliveryaddress.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your delivery address.\n";
	}
	
	if (document.ordernowform.deliverystate.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your delivery state.\n";
	}
	
	if (document.ordernowform.deliverypostcode.value == "")
	{
		errorFound = 1;
		errorList += "\tYou must enter your delivery postcode.\n";
	}
		
	if (errorFound == 1)
	{
		errorList += "\nPlease address these issues and re-submit your enquiry.\n";
		alert(errorList);
		return false;
	}
	
	return true;    
}

