function validationNewsletter(theForm){
	if (theForm.email.value == ""){
		alert("Please enter a value for the \"Email\" field.");   		
		theForm.email.focus();
   		return false;
	}
	var checkEmail = "@.";
	var checkStr = theForm.email.value;
	var EmailValid = false;
	var EmailAt = false;
	var EmailPeriod = false;
	for (i = 0;  i < checkStr.length;  i++){
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkEmail.length;  j++){
			if (ch == checkEmail.charAt(j) && ch == "@")
				EmailAt = true;
			if (ch == checkEmail.charAt(j) && ch == ".")
				EmailPeriod = true;
          	if (EmailAt && EmailPeriod)
                break;
          	if (j == checkEmail.length)
                break;
        }
	if (EmailAt && EmailPeriod){
    	    EmailValid = true
        break;
        }
	}
	if (!EmailValid){
		alert("The \"email\" field must contain an \"@\" and a \".\".");
		theForm.email.focus();
		return false;
	}
    return true;
}

function submitform(theForm){
  if (validationNewsletter(theForm)){
	document.theForm.submit();
	return true;
  } else {
	  return false;
  }
}