window.onload = function showDiv() {

var divS= document.getElementById("divsearch");
var btnS = document.getElementById("btnSearch"); 
var txtS = document.getElementById("txtSearch");
var txtSs = encodeURI(txtS.value);


divS.style.left = txtS.style.left;
divS.style.top = txtS.style.top;
divS.style.display = "none";
			


            var oXmlHttp = zXmlHttp.createRequest();
            oXmlHttp.open("get", "ajax/divsearch.php?txt=" + txtSs  , true);
            oXmlHttp.onreadystatechange = function () {
                if (oXmlHttp.readyState == 4) {
                    if (oXmlHttp.status == 200) {
                       
						divS.innerHTML = oXmlHttp.responseText;

						if (txtSs  != "" ) {
                		divS.style.display = "";
                	
                		} else {
                		divS.style.display = "none";
                		
                		}
                    } else {
                    }
                }            
            };
           
	oXmlHttp.send(null);
setTimeout('showDiv()', 1000);
}
