function findchecks(cb)
{
	for (var i = 0; i < cb.length; i++)
	{
		if (cb[i].checked) return true;
	}	
	return false;
}

// ---------------------------------------------

function validate_form(f)
{
	if (!findchecks(f.p_cr_term) && !findchecks(f.p_nc_term) && !findchecks(f.p_brochure) && !findchecks(f.p_program) && !f.p_comments.value.match(/\w/))	
	{
		alert('Please help us to serve you better by specifying which schedule/catalog/brochure you would like to receive.  If the information you need is not listed, please describe it in the "Additional Comments or Requests" section.');
		return false;
	}
	
	if (!f.p_first_name.value.match(/\w/) || !f.p_last_name.value.match(/\w/))
	{
		alert('Please enter your full name.  First and last name are required.');
		return false;
	}
	
	if (!f.p_addr_line1.value.match(/\w/) || !f.p_city.value.match(/\w/) || !f.p_state.value.match(/\w/) || !f.p_zip.value.match(/\w/) || !f.p_country.value.match(/\w/))	// allow fruity zip for int'l postcodes
	{
		alert('Please enter your complete address.  Street address, city, state/province, ZIP/postal code, and country are required.');
		return false;
	}
}

