/* Function for Make an Enquiry Form */
function frm_Order(check)
{
	errorDetails = '';
	errorControl = '';
	resetTextBoxCSS(check.str_name);
	resetTextBoxCSS(check.str_phone);
	resetTextBoxCSS(check.str_email);
	resetTextBoxCSS(check.str_product);
	resetTextBoxCSS(check.str_hire_from);
	
	if (check.str_name.value == "")
	{
		applyErrorTextBoxCSS(check.str_name);
		if (errorDetails == '') { errorControl = check.str_name; }
		errorDetails = errorDetails + " - Please enter your first name\n";	
	}
	if (check.str_phone.value == "")
	{
		applyErrorTextBoxCSS(check.str_phone);
		if (errorDetails == '') { errorControl = check.str_phone; }
		errorDetails = errorDetails + " - Please enter your contact number\n";	
	}
	if (check.str_email.value == "")
	{
		applyErrorTextBoxCSS(check.str_email);
		if (errorDetails == '') { errorControl = check.str_email; }
		errorDetails = errorDetails + " - Please enter your valid Email address \n";
	}
	if (isValidEmail(check.str_email.value)==false)
	{
		applyErrorTextBoxCSS(check.str_email);
		if (errorDetails == '') { errorControl = check.str_email; }
		errorDetails = errorDetails + " - Please enter your valid Email address\n";
	}
	if (check.str_product.value == "")
	{
		applyErrorTextBoxCSS(check.str_product);
		if (errorDetails == '') { errorControl = check.str_product; }
		errorDetails = errorDetails + " - Please enter a valid Product Code \n";
	}
	if (check.str_hire_from.value == "")
	{
		applyErrorTextBoxCSS(check.str_hire_from);
		if (errorDetails == '') { errorControl = check.str_hire_from; }
		errorDetails = errorDetails + " - Please enter a valid date to hire from \n";
	}
	if ( isValidDate(check.str_hire_from.value, "DMY") == false ) 
	{
		applyErrorTextBoxCSS(check.str_hire_from);
		if (errorDetails == '') { errorControl = check.str_hire_from; }
		errorDetails = errorDetails + " - Please enter a valid date\n";
	}
	if (errorDetails == '') { return true; }
	else
	{
		alert('Please fill out valid information in the following fields \n' + errorDetails);
		errorControl.focus();
		return false;
	}
}