function checkData()
{
  var validname = true; 
  var validaddress = true; 
  var validphone = true; 
  var validemail = true;
  var emailmatch = true;
  var validact = true;

  var name = document.vol.name.value;
  var address1 = document.vol.address1.value;
  var address2 = document.vol.address2.value;
  var citystate = document.vol.citystate.value;
  var zipcode = document.vol.zipcode.value;
  var phone = document.vol.phone.value;
  var email1 = document.vol.email1.value;
  var email2 = document.vol.email2.value;

  if(/^\s*$/.test(name))
	validname = false;

  if(/^\s*$/.test(address1) && /^\s*$/.test(address2))
	validaddress = false;
  if(/^\s*$/.test(citystate))
	validaddress = false;

  if(!/([ ]*\([ ]*\d{3}[ ]*\)[ ]*|\d{3}([ ]*-?[ ]*)|\d{3}([ ]*\.?[ ]*))\d{3}([ ]*|[ ]*-[ ]*|[ ]*\.[ ]*)\d{4}/.test(phone))
	validphone = false;

  if(!/^\s*$/.test(email1) || !/^\s*$/.test(email2))
  {
     if(email1.toLowerCase() != email2.toLowerCase())
		emailmatch = false;

     if(!/[a-z0-9]+([_\.\-+][a-z0-9]+)*@[a-z0-9]+([_\.\-+][a-z0-9]+)*\.[a-z]{2,4}/.test(email1.toLowerCase()))
		validemail = false;
  }

  if(!/(\d\D*){5}/.test(zipcode))
	validaddress = false;
  
  none = true;
  if(document.vol.action1.checked ||
	document.vol.action2.checked ||
	document.vol.action3.checked ||
	document.vol.action4.checked ||
	document.vol.action5.checked ||
	document.vol.action6.checked || 
	document.vol.action7.checked ||
	document.vol.action8.checked ||
	document.vol.action9.checked ||
	document.vol.action10.checked)
	 none = false;
 

  if(none)
    validact = false;

if(!(validname && validaddress && validphone && validemail && emailmatch && validact))
{
	var alerttext = "There is an error in your submission:\n";
	if(!validname)
		alerttext += " * No first and last name\n";
	if(!validaddress)
		alerttext += " * Incomplete address\n";
	if(!validphone)
		alerttext += " * Incomplete phone number\n";
	if(!emailmatch)
		alerttext += " * Email addresses do not match\n";
	if(!validemail)
		alerttext += " * Invalid email address(es)\n";
	if(!validact)
		alerttext += " * You must click at least one volunteer activity\n";

	alerttext += "Please check the form and click \"Submit\" again";

	alert(alerttext);

}
else
{
	alert("Thank you! Your information has been successfully submitted.");
}
return (validname && validaddress && validphone && validemail && emailmatch && validact);
}
