//Validate the Contact us form
function validateQuote()
{
	trimFields();
	if(obj.name.value == "")
	{
		alert("Please enter your Name.");
		obj.name.focus();
		return false;
	}
	if(obj.email_address.value == "")
	{
		alert("Please enter your Email Address.");
		obj.email_address.focus();
		return false;
	}
	if(!chkEmail(obj.email_address.value))
	{
		alert("Please enter a valid Email Address.");
		obj.email_address.focus();
		return false;
	}
	if(obj.state.selectedIndex == 0 && obj.other_state.value == "")
	{
		alert("Please select US/Canada State.\nIf Other, please specify.");
		obj.state.focus();
		return false;
	}
	if(obj.country.selectedIndex == 0)
	{
		alert("Please select your Country.");
		obj.country.focus();
		return false;
	}
	if(obj.project_desc.value == "")
	{
		alert("Please enter your Project Description.");
		obj.project_desc.focus();
		return false;
	}
	if(obj.captcha.value == "")
	{
		alert("Please type the numbers shown on the Captcha.");
		obj.captcha.focus();
		return false;
	}
	obj.action = 'request_a_quote.php';
	obj.submit();
}

function validateState()
{
	if(obj.state.selectedIndex != 0)
	{
		obj.other_state.value = "";
	}
}

function validateOtherState()
{
	if(obj.other_state.value != "")
	{
		obj.state.selectedIndex = 0;
	}
}
