profile_autocompleter=Class.create();profile_autocompleter.prototype=Object.extend(new Autocompleter.Base(),{initialize:function(b,a){this.element=$("explore_profile_input");this.update=$("explore_profile_search");Element.addClassName(this.update,"autocomplete");this.baseInitialize(this.element,this.update,a);this.selectOptions=[];Event.observe(this.element,"click",this.activate.bindAsEventListener(this));this.options.afterUpdateElement=function(e,d){var c=d.id.split("_");document.location="/explore/profile/"+c[3]}},getUpdatedChoices:function(){if(!this.network){var a=this;IOL.API.request("user.get.network",{},a);return}this.updateChoices(this.setValues())},user_get_network_onApi:function(f,c,a,e){if(f){c.network[c.network.length]=glob_u;this.network=c.network;for(var d=0;d<c.network.length;d++){var b=c.network[d];if(!Data.user[b.user_id]){Data.user[b.user_id]=b}}$("explore_profile_input").focus();this.getUpdatedChoices(this.setValues())}else{modal.complain(c,{},1);this.element.value=""
}},setValues:function(){var f=this.element.value.toLowerCase().trim();var a=f.split(/\s+/);var b=[];for(var d=0;d<this.network.length;d++){var c=this.network[d].title.toLowerCase();if(a[0]&&(c.indexOf(a[0])==0||c.match(" "+a[0]))){b.push(this.network[d])}}if(b.length){var e="<ul>";for(var d=0;d<b.length;d++){var g="profile_tag_search_"+b[d].user_id;e+='<li id="'+g+'" style="font-size:16px"><img src="'+b[d].doc_url+'" width="25" height="25"/>'+b[d].title+"</li>"}e+="</ul>";$("explore_profile_nomatch").style.display="none";return(e)}else{if(f){$("explore_profile_nomatch").style.display="block"}return("<ul></ul>")}return("<ul>"+this.selectOptions.join("")+"</ul>")},setOptions:function(a){this.options=Object.extend({inputClass:"combo",url:"",width:0,debug:false,autoSubmit:false,inputClass:""},a||{})}});