$(function() {
	//create captcha
    var strJq = "<p>Please answer the math question before submitting this form.<br />";
    strJq += " <span id=\'botq\'></span> = <input name=\'botanswer\' type=\"text\" class=\"required\" id=\"botanswer\" size=\"3\" maxlength=\"2\" />";
    strJq += "  [ <a href=\'#botq\' title=\"Click here to try another Question, if you are having problem\" onclick=\'getbotquestion()\'>Click here to try another question</a> ]</p>";
    
    $("#captcha").html(strJq);
	
	
	$("form.validate").validate({
		rules: {
			botanswer : {
				required:true,
				remote: "/script/spamtestvalidate.asp"
			}
		},
		messages: {
			botanswer : "Try again"
		},
		onkeyup: false

	});
	getbotquestion();
});
function getbotquestion() {
     $("#botq").load('/script/spamtest.asp');
}
