function verifyForm() {
	var code=document.getElementById('security_code').value;
	// Set up the request
	var xmlhttp =  new XMLHttpRequest();
	xmlhttp.open('POST', '/captcha-test.php', true);

	// The callback function
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4) {
			if (xmlhttp.status == 200) {
				if(xmlhttp.responseXML.getElementsByTagName('result')[0].firstChild.data =='pass') {
					document.getElementById('submitButton').disabled=false;
					
					var hiddenInput = document.createElement('input');
					hiddenInput.setAttribute('type','hidden');
					hiddenInput.setAttribute('name','safety');
					hiddenInput.setAttribute('id','safety');
					hiddenInput.setAttribute('value','safe');
					document.getElementById('signupForm').appendChild(hiddenInput);

				}
			}
		}
	}

	// Send the POST request
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send('securityCode=' + code);
}
