function fillTest() {
	var f = document.formContact;
	f.first_name.value = "Test First Name";
	f.last_name.value = "Test Last Name";
	f.email.value = "testing@entrinix.com";

	f.company_name.value = "Testing Company Name";
	f.address1.value = "Testing Address 1";
	f.address2.value = "Testing Address 2";
	f.city.value = "Seal Beach";
	f.state.selectedIndex = 5;
	f.zip.value = "90740";
	f.region.value = "West Coast";
	f.country_code.value = "US";
	f.phone.value = rand(100, 999) + "-" + rand(100, 999) + "-" + rand(1000, 9999);
	f.fax.value = rand(100, 999) + "-" + rand(100, 999) + "-" + rand(1000, 9999);
	f.url.value = "www" + rand(1, 999) + ".densoheavyduty.com";
	f.comments.value = "Testing Comments";
	f.elements['interest[]'][0].checked = true;
	f.elements['interest[]'][1].checked = true;
	f.elements['interest[]'][2].checked = true;
	f.elements['interest[]'][3].checked = true;
}

function validateForm(f) {
	var valid = false;
	var check = false;
	var err = new Array();
	var s = 0;

	for (i = 0; i < f.ctype.length; i++) {
		if (f.ctype[i].checked == true) {
			check = true;
		}
	}

	// Handle the first name
	if (f.first_name.value == '') {
		err.push('First name cannot be empty.');
		s = 1;
	} else {
		s = 0;
	}
	highlight(f.first_name, s);

	// Handle the last name
	if (f.last_name.value == '') {
		err.push('Last name cannot be empty.');
		s = 1;
	} else {
		s = 0;
	}
	highlight(f.last_name, s);

	// Handle email
	if (f.email.value == '') {
		err.push('Email address cannot be empty.');
		s = 1;
	} else if (!is_email(f.email.value)) {
		err.push('Incorrect email format.');
		s = 1;
	} else {
		s = 0;
	}
	highlight(f.email, s);

	// Handle the city
	if (f.city.value == '') {
		err.push('City cannot be empty.');
		s = 1;
	} else {
		s = 0;
	}
	highlight(f.city, s);

	// Handle the state
	if (f.state.selectedIndex == 0) {
		err.push('State cannot be empty.');
		s = 1;
	} else {
		s = 0;
	}
	highlight(f.state, s);

	// Handle the zip
	if (f.zip.value == '') {
		err.push('Zip code cannot be empty.');
		s = 1;
	} else {
		s = 0;
	}
	highlight(f.zip, s);

	// Handle the inquiry type.
	if (!check) {
		err.push('Inquiry type is required.');
	}

	// Comments
	if (f.comments.value == '') {
		err.push('Questions/comments cannot be empty.');
		s = 1;
	} else {
		s = 0;
	}
	highlight(f.comments, s);

	// Now show the user the error.
	if (err.length > 0) {
		alert("You have form errors that need to be corrected:\n\n-" + err.join("\n-"));
	} else {
		valid = true;
	}

	return valid;
}
