var g_imgCaptcha;
var g_fldCaptcha;
var g_frmCaptcha;


function checkCaptcha(p_imgCaptcha, p_fldCaptcha, p_frmCaptcha){

	g_imgCaptcha = window.document.getElementById(p_imgCaptcha);
	g_fldCaptcha = window.document.getElementById(p_fldCaptcha);
	g_frmCaptcha = window.document.getElementById(p_frmCaptcha);

	var sUrl;
	sUrl ="/mvc/logic/http_proc.asp?FunctionID=8&CIDReq=0&captcha=" + encodeURIComponent(g_fldCaptcha.value);				
	makeHttpRequest("GET", sUrl, true);
}

function handleResponseData(){
			
	if (oRequest.responseText == '1')
	{
		g_frmCaptcha.submit();
	}
	else
	{
		alert('The numbers do not match!');
		g_imgCaptcha.src = g_imgCaptcha.src + '#';
		g_fldCaptcha.value = '';
		g_fldCaptcha.focus();
		g_bolFormSent = false;
	}
}
