var suggestDiv=$("search_suggest"); var keynodes; var lastKey=""; var selectedIndex=0; var showSuggest=function(inputObj){ var xmlHttp = $ajax(); var key=document.getElementById("tbxsearch").value; if(key==lastKey)return false; else lastkey=key; if(/^/s*$/.test(key)){ suggestDiv.style.display="none"; return false; }; selectedIndex=-1; xmlHttp.open("get","js/search.aspx?skey="+encodeURI(key)+"&t=" + new Date().getTime(),true); xmlHttp.onreadystatechange = function(){ if(xmlHttp.readyState == 4&&xmlHttp.status == 200){ var xmldoc=xmlHttp.responseXML; keynodes=xmldoc.getElementsByTagName("key");