function validateForm(f)
	{
	var errors = [];
	
	if (f.contactName.value === '')
			{
			errors.push('Contact name');
			}
	if (f.companyName.value === '')
		{
		errors.push('Company name');
		}
	if (f.address.value === '')
		{
		errors.push('Address');
		}
	if (f.city.value === '')
		{
		errors.push('City');
		}
	if (f.state.value === '')
		{
		errors.push('State');
		}
	if (f.zip.value === '')
		{
		errors.push('Zip');
		}
	if (f.phone.value === '')
		{
		errors.push('Telephone');
		}
	if (f.fax.value === '')
		{
		errors.push('Fax');
		}
	if (f.email.value === '')
		{
		errors.push('Email');
		}
	if (f.contactTitle.value === '')
		{
		errors.push('Contact title');
		}
	
	if (errors.length)
		{
		alert('Please fill out the following fields:\n\n' + errors.join('\n'));
		return false;
		}
	
	var fields =	{
					recycle: 'Recycling program',
					towel: 'Towel/linen reuse',
					transport: 'Public transportation or shuttle',
					lights: 'Lights/AC turned off',
					dispenser: 'Bulk dispensers',
					reusable: 'Reusable utensils',
					energy: 'Energy-efficient program',
					water: 'Water conservation',
					paperless: 'Paperless checkin/checkout',
					products: 'Recycled products',
					food: 'Food from local growers',
					green: 'Training on green initiatives'
					};
	
	for (var name in fields)
		{
		if (!f[name][0].checked && !f[name][1].checked)
			{
			errors.push(fields[name]);
			}
		}
	
	if (errors.length)
		{
		alert('Please answer the questions for the following topics:\n\n' + errors.join('\n'));
		return false;
		}
		
	if (f.recycleYes.checked && f.recycleDescription.value === '')
		{
		errors.push('You selected yes for the recycling program, but did not fill out the description');
		}
	
	if (f.energyYes.checked && f.energyDescription.value === '')
		{
		errors.push('You selected yes for the energy-efficient program, but did not fill out the description');
		}
	
	if (f.waterYes.checked && f.waterDescription.value === '')
		{
		errors.push('You selected yes for the water conservation program, but did not fill out the description');
		}
	
	if (errors.length)
		{
		alert('Please fill out the following fields:\n\n' + errors.join('\n'));
		return false;
		}
	
	return true;
	}
