function verify() {

  var re = /(<([^>]+)>)/gi;
  
  if (document.contributeForm.hope.value.match(re)) {
    alert( "Your hope cannot contain HTML tags." );
    document.contributeForm.hope.focus();
    return false;
  }
  
  if (document.contributeForm.fear.value.match(re)) {
    alert( "Your fear cannot contain HTML tags." );
    document.contributeForm.fear.focus();
    return false;
  }
  
  var pos = document.contributeForm.hope.value;
  var pos2 = pos.indexOf("http");
  if (pos2 >= 0) {
    alert("Your hope cannot contain HTML tags." );
	document.contributeForm.hope.focus();
    return false;
  }
  
  pos = document.contributeForm.fear.value;
  pos2 = pos.indexOf("http");
  if (pos2 >= 0) {
    alert("Your fear cannot contain HTML tags." );
	document.contributeForm.fear.focus();
    return false;
  }
  
  var emailCheck = checkEmail(document.contributeForm.email.value);
  if (emailCheck != "success") {
    alert(emailCheck);
	document.contributeForm.email.focus();
	return false;
  }
  
  document.contributeForm.submit();
}

function checkEmail(strng) {
	var error = "success";
	if (strng.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) { 
		error = "Please enter a valid email address.\n";
	}

	var illegalChars = /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
	if (strng.match(illegalChars)) {
	    error = "The email address contains illegal characters.\n";
	}
	
	return error;
}
