// JavaScript Document

function chkCaptcha(var1){
	
	var url = 'captcha.php?capid=' + var1;
	var xhrObj =  new RemoteProcedure(url, callBackFunction, showWaitFunction);
}
function showWaitFunction(){
	//for showing loading images call back function for loading status
}

function callBackFunction(xhrObj){
	if (xhrObj.responseText){
		retVal = xhrObj.responseText; //or xhrObj.responseXml 
		if(retVal=='go')
		{
			if(!document.signup.chk_agree.checked)
			{
		        document.getElementById("div_msg").className="errmsg";

			document.getElementById("div_msg").innerHTML="Please indicate that you agree to the terms of the site before you register.";

			return false; 
			}
			else{
			//getEl("signupnow").disabled="disabled";
			getEl("signupnow").value="Signing up...";
			document.signup.submit();
			//getEl("signupnow").disabled="disabled";
			}

		}
		else
		{
			//alert("Number in the image doesn't match!");
		        document.getElementById("div_msg").className="errmsg";
			document.getElementById("div_msg").innerHTML="Number in the image doesn't match.";
			return false;
		}
	}
		
}
