// JavaScript Document
var ajax;
function createAjax(){
	var http;
	if (window.ActiveXObject) {
		http=new ActiveXObject("Microsoft.XMLHTTP") ? new ActiveXObject("Microsoft.XMLHTTP") : new ActiveXObject("Msxml2.XMLHTTP");
	} else if(window.XMLHttpRequest) {
		http=new XMLHttpRequest();
	}
	return http;
}
function openAjax(value,openurl) {
	var reHttp;
	ajax = createAjax();
	ajax.open("POST",openurl,false);
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=gb2312");
	ajax.onreadystatechange=GetValue;
	ajax.send(value);
	reHttp =ajax.responseText;
	return reHttp;
}

function findlqqk() {
	var inhtmlvalue;
	var sfz = document.getElementById("sfz").value;
	if (sfz != "") {
		inhtmlvalue = openAjax("sfz="+escape(sfz),"/chaxun.asp");
		//var inhtmlvalue = GetValue();
	} else {
		inhtmlvalue = "请正确输入身份证号码!";
	}
	document.getElementById("findjieguo").innerHTML = inhtmlvalue;
}

function GetValue() {
	if(ajax.readyState==4) {
		if(ajax.status==200 || ajax.status==0) {
			var test=ajax.responseText;
			return test;
		} else {
		  return "第二步出错";
		}
	} else {
		return "第一步出错";
	}
} 
