$(document).ready(function() {
  // Stuff to do as soon as the DOM is ready;
  $("form[name='form1']").submit(function() {
    if ($(this).find("input[name='captcha']").length > 0 && $(this).find("input[name='captcha']").val() != 4) 
    {
      alert("We're sorry, you have not correctly answered 'What is 2+2?'.  Please check your answer and resubmit the form.");
      return false;
    }
    else
    {
      return true;
    }
  });
});

