function toggleReminder(foo) {
	if (foo == true) {
		document.getElementById('reminder').style.display = 'block';
	} else {
		document.getElementById('reminder').style.display = 'none';
	}
}
function getPass() {
	em = document.getElementById('email').value;
	pq = document.getElementById('question').value;
	qa = document.getElementById('answer').value;
	if (em != '' && pq != '' && qa != '') { 
		xmlHttp = GetXmlHttpObject();
		if (xmlHttp == null) {
			alert ("Your browser does not support AJAX!");
			return;
		} 
		url = "/check_question.php";
		url += "?em=" + em;
		url += "&pq=" + pq;
		url += "&qa=" + qa;
		url += "&sid=" + Math.random();
		xmlHttp.onreadystatechange = stateChanged;
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null);
	} else {
		document.getElementById('forgot_message').innerHTML = 'You must fill in all the fields.';
	}
}
function stateChanged() {
	if (xmlHttp.readyState == 4) {
		document.getElementById("forgot_message").innerHTML = xmlHttp.responseText;
	}
}
function GetXmlHttpObject() {
	var xmlHttp = null;
	try {
		xmlHttp = new XMLHttpRequest();
	}
	catch (e) {
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}
