<!--
// Set Variable That Counts The Number of Times The Form Has Been Submitted
var submitcount=0;
// Start hiding JavaScript code from old browsers.

function ContactForm_Validator(theForm)
{
// If The Form Has Not Yet Been Submitted
	if (submitcount == 0)
	{  
		if (theForm.send_service_literature.checked == false && theForm.send_company_literature.checked == false && theForm.have_salesperson_call.checked == false)
		{
			alert('Please select at least 1 checkbox.');
			return (false);
		}
		
		if (theForm.Name.value == '' || theForm.Name.value == ' ')
		{
			alert('Please enter a value for the Name field.');
			theForm.Name.value = '';
			theForm.Name.focus();
			return (false);
		}
		
		if (theForm.Title.value == '' || theForm.Title.value == ' ')
		{
			alert('Please enter a value for the Title field.');
			theForm.Title.value = '';
			theForm.Title.focus();
			return (false);
		}
		
		if (theForm.Company.value == '' || theForm.Company.value == ' ')
		{
			alert('Please enter a value for the Company field.');
			theForm.Company.value = '';
			theForm.Company.focus();
			return (false);
		}
		
		if (theForm.Address.value == '' || theForm.Address.value == ' ')
		{
			alert('Please enter a value for the Address field.');
			theForm.Address.value = '';
			theForm.Address.focus();
			return (false);
		}
		
		if (theForm.Phone.value == '' || theForm.Phone.value == ' ')
		{
			alert('Please enter a value for the Phone field.');
			theForm.Phone.value = '';
			theForm.Phone.focus();
			return (false);
		}
		
		if (theForm.Email.value == '' || theForm.Email.value == ' ')
		{
			alert('Please enter a value for the Email field.');
			theForm.Email.value = '';
			theForm.Email.focus();
			return (false);
		}
		
		if (emailCheck(theForm.Email.value) == false)
		{
		  	theForm.Email.focus();
			return (false)
		}
		
		// Increment the Count Variable
	 	submitcount++;
	  	return true;
	}

// If The Form Has Already Been Submitted Once
	else 
	{
	// Display Alert Message
		alert("The form has already been submitted.  This may take a little while, please be patient.");
		return false;
	}
	
	return true;
}

//-->