/*
Created on February 3, 2007
Developer: Maria Erlandson
http://www.teasso.com
*/
function capCheck(theForm) {

var xmlhttp;
	var sReply;

	DataToSend = "action=process&captext=" + escape(theForm.captext.value);

	if (window.XMLHttpRequest) {
		xmlhttp=new XMLHttpRequest();
		xmlhttp.open("POST",'/incl/pro/captcha/captchaProcess.php',false);
		xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlhttp.send(DataToSend);
		sReply = xmlhttp.responseText;
	} else if (window.ActiveXObject) {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		xmlhttp.open("POST",'/incl/pro/captcha/captchaProcess.php',false);
		xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlhttp.send(DataToSend);
		sReply = xmlhttp.responseText;
	}
	if (sReply == "good") {
	//	alert("Correct Captcha Text Entered"); 
		return true;
	} else if (sReply == "bad") {
		alert("Verification Code Not Valid"); 
		return false;
	} else if (sReply == "") {
		alert("You must enter Verification Code."); 
		return false;
	} else {
		alert("Error"); 
		return false;
	}
}