var a = Math.ceil(Math.random() * 10); var b = Math.ceil(Math.random() * 10); var c = a + b; var actionurl = "/incl/feedback_client_outreach.php"; function DoMathCaptcha() { document.write("What is "+ a + " + " + b +"? "); document.write(""); document.write(" (What's this?)"); } function ValidateMath(myform){ var d = document.getElementById('MathInput').value; if(document.getElementById('MathInput').value == c) { myform.action = actionurl; myform.submit(); } else { alert("In order to verify that you are indeed human, and not a spambot, please enter the correct answer to the math problem: "+a+" + "+b+""); return false; } } function CaptchaHelp() { alert("This form uses a Math Captcha to verify that you are a human and to help reduce the amount of spam produced by automated spam bots. Simply fill in the correct answer to the math problem and hit submit."); }