function required_fields (form) {
 
 if (form.Country.selectedIndex == 0) {
  alert ("Please select your country.");
  form.Country.focus();
  return false;
 }

 var message = form.Content.value;
 if (message == "" || message==null) {
  alert ("Please enter a message");
  form.Content.focus();
  return false;
 }
           
 if (form.stateProvidence.selectedIndex == 0) {
	 alert ("Please select your State or Province.");
	 form.stateProvidence.focus();
	 return false;
	}

 if (form.Age.selectedIndex == 0) {
	 alert ("Please select your age range.");
	 form.Age.focus();
	 return false;
	}

 if (form.Age.selectedIndex == 1) {
		window.location="/under13.shtml";
		return false;
	}


 //  Will check for @, period after @ and text in between
 var addr = form.EMail.value;
  
 if (addr=="None Entered") {  // None if null after last pass  
  return true;  
 }
    
 if (addr=="" || addr==null) { 
  alert ('Without an email address, we will not be able to reply by email.\nWe would still appreciate your comment.\nTo send an "anonymous" message click the "Submit" button after closing this window.');
  form.EMail.value = "None Entered";
  form.EMail.select();
  return false; 
 }
    
 var in_space = addr.indexOf(" ");
 if (in_space != -1) { 
  alert ("Email address should contain no spaces and be of the form jdoe\@aol.com");
  form.EMail.focus();
  return false;  
 }

 var len = addr.length;
 var alpha = addr.indexOf("@");
 var last_alpha = addr.lastIndexOf("@");

 if (alpha != last_alpha) {  
  alert ("Bad email address. Should contain only one @ and be of the form jdoe\@aol.com");
  form.EMail.focus();
  return false; 
 }

 // No @, in first position, or name too short
 if (alpha == -1 || alpha == 0 || len<6 ) {
  alert ("Bad email address. Should contain an @ and be of the form jdoe\@aol.com");
  form.EMail.focus();
  return false; 
 }

 var last_p = addr.lastIndexOf(".");
 // Be sure period at least two spaces after @, but not last char.
 if (last_p - alpha < 2 || last_p == (len - 1) ) {  
  alert ("Bad email address. Should contain a period after the @ and be of the form jdoe\@aol.com");
  form.EMail.focus();
  return false; 
 }

 return true;
}


// Checks form of basic single email address
function fntest(form) {
 //  Will check for @, period after @ and text in between
 var addr = form.email.value;
 var in_space = addr.indexOf(" ");
 if (in_space != -1) { 
  alert ("Email address should contain no spaces and be of the form jdoe\@aol.com");
  form.email.focus();
  return false;  
 }
 
 var len = addr.length;
 var alpha = addr.indexOf("@");
 var last_alpha = addr.lastIndexOf("@");

 if (alpha != last_alpha) {
  alert ("Bad email address. Should contain only one @ and be of the form jdoe\@aol.com");
  form.email.focus();
  return false; 
 }

 // No @, in first position, or name too short
 if (alpha == -1 || alpha == 0 || len<6 ) {
  alert ("Bad email address. Should contain an @ and be of the form jdoe\@aol.com");
  form.email.focus();
  return false; 
 }

 var last_p = addr.lastIndexOf(".");
 // Be sure period at least two spaces after @, but not last char.
 if (last_p - alpha < 2 || last_p == (len - 1) ) {
  alert ("Bad email address. Should contain a period after the @ and be of the form jdoe\@aol.com");
  form.email.focus();
  return false; 
 }

 return true;
}