var xmlHttp;
var Arr;
function createXMLHttpRequest(){
	if(window.ActiveXObject){
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	} else if(window.XMLHttpRequest){
		xmlHttp = new XMLHttpRequest();
	}
}
function checkletter(){
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = handleAvailable;
	var url = "/checking.php?inputbox="+document.getElementById("inputbox").value;
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}
function handleAvailable(){
	//if(xmlHttp.readyState == 4 ){alert("avai"+xmlHttp.status);}
	if(xmlHttp.readyState == 4 && xmlHttp.status == 200){
		if (xmlHttp.responseText == "1") {
			document.getElementById("surplus").submit();
		} else {
			alert("Plase answer the question correctly");
		}
	}
}