
function loadcaptcha()
{
$('#capt').load('media/js/captcha.html');
}

function check()
{
var a=document.getElementById("recaptcha_response_field").value;
var b= document.getElementById("recaptcha_challenge_field").value;

alert("a = "+a);
alert("b = "+b);

var html = $.ajax({
type: "POST",
url: "media/js/captcha.php",
data: "recaptcha_challenge_field=" + b + "&recaptcha_response_field=" + a,
async: false
}).responseText;

alert("html ="+html);

if(html == " success") {
return true;
} else {

$("#captcha_err").html("The security code you entered did not match. Please try again.");
Recaptcha.reload();
return false;
}

}







