function RemoteStateSuggestions(){if(typeof XMLHttpRequest!="undefined")this.http=new XMLHttpRequest;else if(typeof ActiveXObject!="undefined")this.http=new ActiveXObject("MSXML2.XmlHttp");else alert("No XMLHttpRequest object available. This functionality will not work.")}RemoteStateSuggestions.prototype.requestSuggestions=function(oAutoSuggestControl,bTypeAhead){var oHttp=this.http;oHttp.readyState!=0&&oHttp.abort();var thelexicon=oAutoSuggestControl.lexicon,thehost=oAutoSuggestControl.host,theport=oAutoSuggestControl.port,sURL=RootPath+"/Catalog/Suggestions.aspx?text="+encodeURIComponent(oAutoSuggestControl.textbox.value)+"&language="+thelexicon+"&host="+thehost+"&port="+theport;oHttp.open("get",sURL,true);oHttp.onreadystatechange=function(){if(oHttp.readyState==4){var data=oHttp.responseText,deb=data.indexOf("<res>"),fin=data.indexOf("</res>");data=data.substring(deb+5,fin);var aSuggestions=eval(data);oAutoSuggestControl.autosuggest(aSuggestions,bTypeAhead)}};oHttp.send(null)};
