<!--
// this function checks to be sure that a valid email address has been entered and a topic has been checked.
function form_validate() {
	with (document.survey) {
	if (email.length != "" && !isEmail(email.value)) {
		alert("You must enter a valid email address.");
		email.focus();
		return false; 
	}
	
	var checked = false;
	for (var i = 0; i < respondent_type.length; i++)
		if (checked = respondent_type[i].checked)
			break;
	if (!checked) {
		alert("You must select at least one descriptor that applies to you.");
		respondent_type[0].focus();
		return false;
	}	
	else {
		if (respondent_type[8].checked && other_respondent_type.value == "") {
			alert("You must enter another descriptor that applies to you.");
			other_respondent_type.focus();
			return false;	
		}
	}
			
	var checked = false;
	for (var i = 0; i < download_frequency.length; i++)
		if (checked = download_frequency[i].checked)
			break;
	if (!checked) {
		alert("You must select the frequency for downloading digital documents.");
		download_frequency[0].focus();
		return false;
	}

	var checked = false;
	for (var i = 0; i < reading_location.length; i++)
		if (checked = reading_location[i].checked)
			break;
	if (!checked) {
		alert("You must select at least one location where you read digital documents.");
		reading_location[0].focus();
		return false;
	}

	var checked = false;
	for (var i = 0; i < document_type.length; i++)
		if (checked = document_type[i].checked)
			break;
	if (!checked) {
		alert("You must select at least one type of digital document you read.");
		document_type[0].focus();
		return false;
	}
	
	var checked = false;
	for (var i = 0; i < document_use.length; i++)
		if (checked = document_use[i].checked)
			break;
	if (!checked) {
		alert("You must select at least one way you use digital documents.");
		document_use[0].focus();
		return false;
	}

	var checked = false;
	for (var i = 0; i < document_source.length; i++)
		if (checked = document_source[i].checked)
			break;
	if (!checked) {
		alert("You must select at least one way in which you find out about digital documents.");
		document_source[0].focus();
		return false;
	}
	else {
		if (document_source[5].checked && other_document_source.value == "") {
			alert("You must enter another way in which you find out about digital documents.");
			other_document_source.focus();
			return false;	
		}
	}

	// return true;
	document.survey.submit();
	return true;
	}
}
// -->
