function getXmlHttp(){
try {
return new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (ee) {
}
}
if (typeof XMLHttpRequest!='undefined') {
return new XMLHttpRequest();
}
}
function getperson2(){
var s = document.getElementById("fio").value;
var ff = document.getElementById("findfio");
if (s.length < 3) {
ff.style.display = "none";
document.getElementById("depart").value = '';
document.getElementById("prof").value = '';
document.getElementById("phone").value = '';
}else{
ff.style.display = "block";
var xmlhttp = getXmlHttp();
xmlhttp.onreadystatechange=function(){
if (xmlhttp.readyState==4 && xmlhttp.status==200){
ff.innerHTML = xmlhttp.response;
}
}
xmlhttp.open("GET","getpersons2.asp?fio="+s,true);
xmlhttp.send();
}
}