function submitForm(){
document.emailForm.submit();
}
function checkFromAddr(){
theFromAddrVal = document.emailForm.emailx6.value;
		if (
		theFromAddrVal.indexOf('@') == -1
		||
		theFromAddrVal.indexOf('.') == -1
		||
		theFromAddrVal.length <= 7
		)
		{
			return(false);
		}
return(true);
}
function verifyForm(){
  var fromAddrValid = checkFromAddr();
  probFields = "";
  someFieldsFilled = 0;
  focusString = "";
  	for(i=1;i<=5;i++){
  	formVarString = "document.emailForm.emailx" + i;
  	valString = formVarString + ".value"
  	nameString = formVarString + ".name"
  		thisName = eval(nameString);
  		thisValue = eval(valString);
  		if(thisValue.length != 0) {
  			if (
  			thisValue.indexOf('@') == -1
  			||
  			thisValue.indexOf('.') == -1
  			||
  			thisValue.length <= 7
  			)
  			{
  				probFields+= "Email " + i + " has an incorrect format\n";
  				focusString = formVarString + ".focus()";
  			}
  		//not a zero length, something has been filled in.
  		someFieldsFilled+=1;
  		}
  	}
  //alert time
  if(fromAddrValid == false){
  	alert("Please fill in your email address");
  	document.emailForm.emailx6.focus();
    return false;
  }
  else if(someFieldsFilled == 0){
  	alert("Please fill in at least one address before sending");
  	document.emailForm.emailx1.focus();
    return false;
  }
  else if (probFields != ""){
  	alert("One or more email addresses have an incorrect format\n\n" + probFields + "\nThe correct format should be:\naname@adomain.com");
    return false;
  }
  else {
  	submitForm();
  }
  if(focusString != ""){
  setTimeout("eval(focusString)",500);
  }
}