var req;function Initialize(){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{req=new ActiveXObject("Microsoft.XMLHTTP");}catch(oc){req=null;}}if(!req&&typeof XMLHttpRequest!="undefined"){req=new XMLHttpRequest();}}function SendQuery(key){Initialize();var url="/blog/ajaxsearch.php?s="+key;if(req!=null){req.onreadystatechange=Process;req.open("GET",url,true);req.send(null);}}function Process(){if(req.readyState==4){if(req.status==200){if(req.responseText=="")document.getElementById("instantsearch").innerHTML="";else{document.getElementById("instantsearch").innerHTML="<div><h3>Instant search results... <a href=''>[close]</a></h3>"+req.responseText+"</div>";$('#instantsearch h3 a').click(function(){$('#instantsearch').html('');$("#searchform #s").attr('value', 'Type to Search Instantly...');return false;});}}else{document.getElementById("instantsearch").innerHTML="There was a problem retrieving data:<br>"+req.statusText;}}}