function funLogin(){
	
	document.getElementById("login_error_box").style.visibility = "hidden";
	document.getElementById("login_error_box").style.display = "none";
	param_array = new Array();
	param_array[0] = "email="+document.frm_login.email.value;
	param_array[1] = "password="+document.frm_login.password.value;
	param_list = param_array.join("&");
	http_request = false;
	
	
	if (window.XMLHttpRequest) { // Mozilla, Safari,...
	 http_request = new XMLHttpRequest();
	} else if (window.ActiveXObject) { // IE
	 try {
		http_request = new ActiveXObject("Msxml2.XMLHTTP");
	 } catch (e) {
		try {
		   http_request = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (e) {}
	 }
	}
	if (!http_request) {
	 	alert('Cannot create XMLHTTP instance');
	 	return false;
	}

	
	http_request.onreadystatechange = function() {
		//alert(http_request.readyState)
		//alert(http_request.readystate)
		//alert(http_request.status)
		if(http_request.readyState == 4) {
			JSONresponse = eval(http_request.responseText);
			//alert(http_request.responseText)
			if(JSONresponse){
				if(JSONresponse[0]){
					//alert("got here")
					if(JSONresponse[0]["type"] == "registrant"){
						window.location.href = "../registrants/applications";
					}else if(JSONresponse[0]["type"] == "member"){
						window.location.href = "../members/resource_center";
					}else if(JSONresponse[0]["type"] == "reviewer"){
						window.location.href = "../reviewers";
					}else if(JSONresponse[0]["type"] == "staff"){
						window.location.href = "../staff/resource_center";
					}
					
				}else{
					//alert("here3")
					document.getElementById("login_error_box").style.visibility = "visible";
					document.getElementById("login_error_box").style.display = "block";
				}
			}else{
				document.getElementById("login_error_box").style.visibility = "visible";
				document.getElementById("login_error_box").style.display = "block";
			}
		}
	}
	http_request.open("POST", "../_php/public/login.php", true);
	//Send the proper header information along with the request
	http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http_request.setRequestHeader("Content-length", param_list.length);
	http_request.setRequestHeader("Connection", "close");
	http_request.send(param_list);
	//alert("here4")
}