var obj;
var selobj;
var divresults;
function GetDataViaAJAX(e, txtbx){
	divresults = document.getElementById('ajaxResults');
	if (window.XMLHttpRequest) {obj = new XMLHttpRequest();}
	else if (window.ActiveXObject) {
		try{obj = new ActiveXObject("Msxml2.XMLHTTP");}
		catch(e){ try{ obj = new ActiveXObject("Microsoft.XMLHTTP");} catch(e1){obj = null;}}
	}
	if(obj!=null){
	    if( selobj == null ) { selobj=-1; }
		if(e.keyCode==27){divresults.style.display='none';}
		else if(e.keyCode >=37 && e.keyCode <= 40){/*do nothing*/}
		else if( txtbx.value.length > 1){
			obj.onreadystatechange = ProcessResponse;
			var aURL = "ajaxSearch.aspx?SearchTerm=" + txtbx.value + "&src=sapp";
			obj.open("GET", aURL,  true);
			obj.send(null);
		}
		else
		{
		    divresults.style.display='none';
		}
	}
	return false;
}
function ProcessResponse(){
    try {
	if(obj.readyState == 4){
		if(obj.status == 200){
    		var retval=obj.responseText;
	    	divresults.style.display='inline';
			divresults.innerHTML = retval;
		}
		else{}
	}
	}catch(e){}
}
function ClearAll(){setTimeout("document.getElementById('ajaxResults').style.display='none'",100);}