/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  November 5th 2009 4:13:51 PM PST                             */
/*      Machine:  10.16.140.103                                                */
/*       Source:  Global Cache                                                 */
/*     Location:  js/7rvjdmbw5qoso84c.pkg.js h:1b1alhy8                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/7rvjdmbw5qoso84c.pkg.js                                   */

function typeaheadpro(obj,_L1,_L2){if(!typeaheadpro.hacks){typeaheadpro.should_check_missing_events=ua.safari()<500;typeaheadpro.should_simulate_keypress=(ua.ie()<8)||(ua.safari()>500&&ua.safari()<523||ua.safari()>=525);if(typeaheadpro.should_use_iframe==undefined)typeaheadpro.should_use_iframe=typeaheadpro.should_simulate_keypress;typeaheadpro.should_use_overflow=ua.opera()<9.5||ua.safari()<500;if(ua.firefox())this.activate_poll_on_focus_events=true;typeaheadpro.hacks=true;}typeaheadpro.instances=(typeaheadpro.instances||[]);typeaheadpro.instances.push(this);this.instance=typeaheadpro.instances.length-1;copy_properties(this,_L2||{});this.obj=obj;this.obj.typeahead=this;this.obj.onfocus=this._onfocus.bind(this);this.obj.onblur=chain(this.obj.onblur,this._onblur.bind(this));this.obj.onchange=this._onchange.bind(this);this.obj.onkeyup=function(_L3){return this._onkeyup(_L3||window.event);}.bind(this);this.obj.onkeydown=function(_L3){return this._onkeydown(_L3||window.event);}.bind(this);this.obj.onkeypress=function(_L3){return this._onkeypress(_L3||window.event);}.bind(this);this.want_icon_list=false;this.showing_icon_list=false;this.stop_suggestion_select=false;if(this.typeahead_icon_class&&this.typeahead_icon_get_return){this.typeahead_icon=document.createElement('div');CSS.addClass(this.typeahead_icon,'typeahead_list_icon');CSS.addClass(this.typeahead_icon,this.typeahead_icon_class);this.typeahead_icon.innerHTML='&nbsp;';this.setup_typeahead_icon();setTimeout(function(){this.focus();}.bind(this),50);this.typeahead_icon.onmousedown=function(_L3){return this.typeahead_icon_onclick(_L3||window.event);}.bind(this);}this.focused=this.focused||this.obj.offsetWidth?true:false;this.anchor=this.setup_anchor();this.dropdown=document.createElement('div');CSS.addClass(this.dropdown,'typeahead_list');if(!this.focused)this.dropdown.style.display='none';this.anchor_block=this.anchor_block||this.anchor.tagName.toLowerCase()=='div';DOMScroll.getScrollRoot().appendChild(this.dropdown);this.dropdown.className+=' typeahead_list_absolute';this.list=$N('div');this.dropdown.appendChild(this.list);this.dropdown.onmousedown=function(_L3){return this.dropdown_onmousedown(_L3||window.event);}.bind(this);if(typeaheadpro.should_use_iframe&&!typeaheadpro.iframe){typeaheadpro.iframe=document.createElement('iframe');typeaheadpro.iframe.src="/common/blank.html";CSS.setClass(typeaheadpro.iframe,'typeahead_iframe');typeaheadpro.iframe.style.display='none';typeaheadpro.iframe.frameBorder=0;DOMScroll.getScrollRoot().appendChild(typeaheadpro.iframe);}if(typeaheadpro.should_use_iframe&&typeaheadpro.iframe)typeaheadpro.iframe.style.zIndex=parseInt(CSS.getStyle(this.dropdown,'zIndex'))-1;this.log_data={'kt':0,'kp':0,'sm':null,'ty':0,'f':1};this.results_text='';this.last_key_suggestion=0;this.status=typeaheadpro.STATUS_BLOCK_ON_SOURCE_BOOTSTRAP;this.clear_placeholder();if(_L1)this.set_source(_L1);if(this.source){this.selectedindex=-1;if(this.focused){this._onfocus();this.show();this._onkeyup();this.set_class('');this.capture_submit();}}else this.hide();onunloadRegister(this._onunload.bind(this),true);}typeaheadpro.prototype.enumerate=false;typeaheadpro.prototype.interactive=false;typeaheadpro.prototype.changed=false;typeaheadpro.prototype.render_block_size=50;typeaheadpro.prototype.typeahead_icon_class=false;typeaheadpro.prototype.typeahead_icon_get_return=false;typeaheadpro.prototype.old_value=null;typeaheadpro.prototype.poll_handle=null;typeaheadpro.prototype.activate_poll_on_focus_events=false;typeaheadpro.prototype.suggestion_count=0;typeaheadpro.STATUS_IDLE=0;typeaheadpro.STATUS_WAITING_ON_SOURCE=1;typeaheadpro.STATUS_BLOCK_ON_SOURCE_BOOTSTRAP=2;typeaheadpro.prototype.clear_value_on_blur=true;typeaheadpro.prototype.max_results=0;typeaheadpro.prototype.max_display=10;typeaheadpro.prototype.allow_placeholders=false;typeaheadpro.prototype.auto_select=true;typeaheadpro.dirty_instances=function(){if(typeaheadpro.instances)typeaheadpro.instances.forEach(function(_L0){_L0.update_status(typeaheadpro.STATUS_BLOCK_ON_SOURCE_BOOTSTRAP);if(_L0.source)_L0.source.is_ready=false;});};typeaheadpro.prototype.set_source=function(_L0){this.source=_L0;this.source.set_owner(this);this.status=typeaheadpro.STATUS_IDLE;this.cache={};this.last_search=0;this.suggestions=[];};typeaheadpro.prototype.setup_anchor=function(){return this.obj;};typeaheadpro.prototype.destroy=function(){if(this.typeahead_icon){DOM.remove(this.typeahead_icon);this.toggle_icon_list=function(){};}this.clear_render_timeouts();if(!this.anchor_block&&this.anchor.nextSibling.tagName.toLowerCase()=='br')DOM.remove(this.anchor.nextSibling);if(this.dropdown)DOM.remove(this.dropdown);if(this.obj){this.obj.onfocus=this.obj.onblur=this.obj.onkeyup=this.obj.onkeydown=this.obj.onkeypress=this.obj.typeahead=null;DOM.remove(this.obj);}this.anchor=this.obj=this.dropdown=null;delete typeaheadpro.instances[this.instance];};typeaheadpro.prototype.check_value=function(){if(this.obj){var _L0=this.obj.value;if(_L0!=this.old_value){this.dirty_results();this.old_value=_L0;if(this.old_value==='')this._onselect(false);}}};typeaheadpro.prototype._onkeyup=function(e){e=$E(e);this.last_key=e?e.keyCode:-1;if(this.key_down==this.last_key)this.key_down=0;var _L1=true;switch(this.last_key){case KEYS.ESC:this.selectedindex=-1;this._onselect(false);this.hide();e.stop();_L1=false;break;}return _L1;};typeaheadpro.prototype._onkeydown=function(e){e=$E(e);this.key_down=this.last_key=e?e.keyCode:-1;this.interactive=true;switch(this.last_key){case 33:case 34:case KEYS.UP:case KEYS.DOWN:this.log_data.kt+=1;if(typeaheadpro.should_simulate_keypress)this._onkeypress({keyCode:this.last_key});return false;case KEYS.TAB:this.log_data.kt+=1;this.select_suggestion(this.selectedindex);if(e.shiftKey){this.reverse_focus();}else this.advance_focus();break;case KEYS.RETURN:this.log_data.sm='key_ret';if(this.select_suggestion(this.selectedindex))this.hide();if(typeof(this.submit_keydown_return)!='undefined')this.submit_keydown_return=this._onsubmit(this.get_current_selection());return this.submit_keydown_return;case 229:if(!this.poll_handle)this.poll_handle=setInterval(this.check_value.bind(this),100);break;default:this.log_data.kp+=1;setTimeout(bind(this,'check_value'),this.source.check_limit);}};typeaheadpro.prototype._onkeypress=function(e){e=$E(e);var _L1=1;this.last_key=e?Event.getKeyCode(e):-1;this.interactive=true;switch(this.last_key){case 33:_L1=this.max_display;case KEYS.UP:this.set_suggestion(_L1>1&&this.selectedindex>0&&this.selectedindex<_L1?0:this.selectedindex-_L1);this.last_key_suggestion=(new Date()).getTime();return false;case 34:_L1=this.max_display;case KEYS.DOWN:if(trim(this.get_value())==''&&!this.enumerate){this.enumerate=true;this.results_text=null;this.dirty_results();}else{this.set_suggestion(this.suggestions.length<=this.selectedindex+_L1?this.suggestions.length-1:this.selectedindex+_L1);this.last_key_suggestion=(new Date()).getTime();}return false;case KEYS.RETURN:var ret=null;if(typeof(this.submit_keydown_return)=='undefined'){ret=this.submit_keydown_return=this._onsubmit(this.get_current_selection());}else{ret=this.submit_keydown_return;delete this.submit_keydown_return;}return ret;default:setTimeout(bind(this,'check_value'),this.source.check_limit);break;}return true;};typeaheadpro.prototype._onchange=function(){this.changed=true;};typeaheadpro.prototype._onfound=function(obj){return this.onfound?this.onfound.call(this,obj):true;};typeaheadpro.prototype._onsubmit=function(obj){if(this.onsubmit){var ret=this.onsubmit.call(this,obj);if(ret&&this.obj.form){if(!this.obj.form.onsubmit||this.obj.form.onsubmit())this.obj.form.submit();return false;}return ret;}else{this.advance_focus();return false;}};typeaheadpro.prototype._onselect=function(obj){var _L1=(function(){if(this.onselect)this.onselect.call(this,obj);}).bind(this);if(obj.no_email){var _L2=new AsyncRequest().setData({action:'require',require_field:'email',uid:obj.i}).setMethod('GET').setReadOnly(true).setURI('/friends/ajax/external.php');new Dialog().setCloseHandler(function(_L3){var _L4=this.getUserData();if(_L4){_L1();}else _L3.set_value('');}.bind(null,this)).setAsync(_L2).show();}else _L1();};typeaheadpro.prototype._onfocus=function(){if(!this.poll_handle&&this.activate_poll_on_focus_events)this.poll_handle=setInterval(this.check_value.bind(this),100);if(this.source)this.source.bootstrap();if(this.last_dropdown_mouse>(new Date()).getTime()-10||this.focused)return;if(this.changed)this.dirty_results();this.focused=true;this.changed=false;this.clear_placeholder();this.results_text='';this.set_class('');this.show();this.capture_submit();if(this.typeahead_icon)show(this.typeahead_icon);};typeaheadpro.prototype._onblur=function(_L0){if(this.last_dropdown_mouse&&this.last_dropdown_mouse>(new Date()).getTime()-10&&this.is_showing_suggestions()){Event.kill(_L0);setTimeout(function(){this.focus();}.bind(this),0);return false;}if(!this.stop_hiding){if(this.showing_icon_list)this.toggle_icon_list(true);}else{this.focus();return false;}this.focused=false;if(this.changed&&!this.interactive){this.dirty_results();this.changed=false;return;}if(!this.suggestions){this._onselect(false);}else if(this.selectedindex>=0&&this.auto_select)this.select_suggestion(this.selectedindex);this.hide();this.update_class();if(this.clear_value_on_blur&&!this.get_value()){var _L1=this.allow_placeholders?this.source.gen_noinput():'';this.set_value(_L1?_L1:'');this.set_class('DOMControl_placeholder');}if(this.poll_handle){clearInterval(this.poll_handle);this.poll_handle=null;}};typeaheadpro.prototype._onunload=function(){if(typeaheadpro.instances[this.instance])this.hide();};typeaheadpro.prototype.typeahead_icon_onclick=function(_L0){this.stop_hiding=true;this.focus();setTimeout(function(){this.toggle_icon_list();}.bind(this),50);Event.kill(_L0);return false;};typeaheadpro.prototype.dropdown_onmousedown=function(_L0){this.last_dropdown_mouse=(new Date()).getTime();};typeaheadpro.prototype.setup_typeahead_icon=function(){this.typeahead_parent=document.createElement('div');CSS.addClass(this.typeahead_parent,'typeahead_parent');this.typeahead_parent.appendChild(this.typeahead_icon);this.obj.parentNode.insertBefore(this.typeahead_parent,this.obj);};typeaheadpro.prototype.mouse_set_suggestion=function(_L0){if(!this.visible)return;if((new Date()).getTime()-this.last_key_suggestion>50)this.set_suggestion(_L0);};typeaheadpro.prototype.capture_submit=function(){if(!typeaheadpro.should_check_missing_events)return;if((!this.captured_form||this.captured_substitute!=this.captured_form.onsubmit)&&this.obj.form){this.captured_form=this.obj.form;this.captured_event=this.obj.form.onsubmit;this.captured_substitute=this.obj.form.onsubmit=function(){return ((this.key_down&&this.key_down!=KEYS.RETURN&&this.key_down!=KEYS.TAB)?this.submit_keydown_return:(this.captured_event?this.captured_event.apply(arguments,this.captured_form):true))?true:false;}.bind(this);}};typeaheadpro.prototype.set_suggestion=function(_L0){this.stop_suggestion_select=false;if(!this.suggestions||this.suggestions.length<=_L0)return;var _L1=this.get_suggestion_node(this.selectedindex);this.selectedindex=(_L0<=-1)?-1:_L0;var _L2=this.get_suggestion_node(this.selectedindex);if(_L1){CSS.removeClass(_L1,'typeahead_selected');CSS.addClass(_L1,'typeahead_not_selected');}if(_L2){CSS.removeClass(_L2,'typeahead_not_selected');CSS.addClass(_L2,'typeahead_selected');}this.recalc_scroll();this._onfound(this.get_current_selection());};typeaheadpro.prototype.get_suggestion_node=function(_L0){var _L1=this.list.childNodes;return _L0==-1?null:_L1[Math.floor(_L0/this.render_block_size)].childNodes[_L0%this.render_block_size];};typeaheadpro.prototype.get_current_selection=function(){return this.selectedindex==-1?false:this.suggestions[this.selectedindex];};typeaheadpro.prototype.update_class=function(){if(this.suggestions&&this.selectedindex!=-1&&typeahead_source.flatten_string(this.get_current_selection().t)==typeahead_source.flatten_string(this.get_value())){this.set_class('typeahead_found');}else this.set_class('');};typeaheadpro.prototype.select_suggestion=function(_L0){if(!this.stop_suggestion_select&&this.current_selecting!=_L0)this.current_selecting=_L0;var _L1=true;if(!this.suggestions||_L0==undefined||_L0===false||this.suggestions.length<=_L0||_L0<0){this._onfound(false);this._onselect(false);this.selectedindex=-1;this.set_class('');_L1=false;}else{this.selectedindex=_L0;var _L2=this.suggestions[_L0].ty;if(_L2!='web'&&_L2!='search')this.set_value(this.suggestions[_L0].t);this.set_class('typeahead_found');this._onfound(this.suggestions[this.selectedindex]);this._onselect(this.suggestions[this.selectedindex]);}if(!this.interactive){this.hide();this.blur();}this.current_selecting=null;if(!_L1&&this.ignore_invalid_suggestion)return false;return true;};typeaheadpro.prototype.is_showing_suggestions=function(){return (this.suggestions)&&(this.suggestions.length>0);};typeaheadpro.prototype.set_value=function(_L0){this.obj.value=_L0;};typeaheadpro.prototype.get_value=function(){if(this.showing_icon_list&&this.old_typeahead_value!=this.obj.value)this.toggle_icon_list();if(this.want_icon_list){return this.typeahead_icon_get_return;}else if(this.showing_icon_list)this.toggle_icon_list();return this.obj.value;};typeaheadpro.prototype.found_suggestions=function(_L0,_L1,_L2){if(!_L0)_L0=[];this.suggestion_count=_L0.length;if(!_L2){this.status=typeaheadpro.STATUS_IDLE;this.add_cache(_L1,_L0);}this.clear_render_timeouts();if(this.get_value()==this.results_text){return;}else if(!_L2){this.results_text=typeahead_source.flatten_string(_L1);if(this.enumerate&&trim(this.results_text)!='')this.enumerate=false;}var _L3=-1;if(this.selectedindex!=-1){var _L4=this.suggestions[this.selectedindex].i;for(var i=0,l=_L0.length;i<l;i++)if(_L0[i].i==_L4){_L3=i;break;}}if(_L3==-1&&this.auto_select&&_L0.length){_L3=0;this._onfound(_L0[0]);}this.selectedindex=_L3;this.suggestions=_L0;if(!_L2)this.real_suggestions=_L0;if(_L0.length){var _L7=[],_L8=Math.ceil(_L0.length/this.render_block_size),_L9={},_La,_Lb=null;DOM.empty(this.list);for(var i=0;i<_L8;i++)this.list.appendChild(document.createElement('div'));if(_L3>-1){_La=Math.floor(_L3/this.render_block_size);_L9[_La]=true;if(_L3%this.render_block_size>this.render_block_size/2){_L9[_La+1]=true;}else if(_La!=0)_L9[_La-1]=true;}else _L9[0]=true;for(var _Lc in _L9){this.render_block(_Lc);sample=this.list.childNodes[_Lc].firstChild;}this.show();if(_L8){var _Ld=sample.offsetHeight;this.render_timeouts=[];for(var i=1;i<_L8;i++)if(!_L9[i]){this.list.childNodes[i].style.height=_Ld*Math.min(this.render_block_size,_L0.length-i*this.render_block_size)+'px';this.render_timeouts.push(setTimeout(this.render_block.bind(this,i),700+i*50));}}}else{this.selectedindex=-1;this.set_message(this.status==typeaheadpro.STATUS_IDLE?this.source.gen_nomatch():this.source.gen_loading());this._onfound(false);}this.recalc_scroll();if(!_L2&&this.results_text!=typeahead_source.flatten_string(this.get_value()))this.dirty_results();};typeaheadpro.prototype.render_block=function(_L0,_L1){var _L2=this.suggestions,_L3=this.selectedindex,_L4=this.get_value(),_L5=this.instance,_L6=[],_L7=this.list.childNodes[_L0];for(var i=_L0*this.render_block_size,l=Math.min(_L2.length,(_L0+1)*this.render_block_size);i<l;i++){_L6.push('<div class="');if(_L3==i){_L6.push('typeahead_suggestion typeahead_selected');}else _L6.push('typeahead_suggestion typeahead_not_selected');if(i>0&&_L2[i-1].o<0&&_L2[i].o>=0)_L6.push(' typeahead_delimiter');_L6.push('" onmouseover="typeaheadpro.instances[',_L5,'].mouse_set_suggestion(',i,')" ','onmousedown="var instance=typeaheadpro.instances[',_L5,']; instance.select_suggestion(',i,');instance.hide();Event.kill(event);">',this.source.gen_html(_L2[i],_L4),'</div>');}_L7.innerHTML=_L6.join('');_L7.style.height='auto';CSS.addClass(_L7,'typeahead_suggestions');};typeaheadpro.prototype.clear_render_timeouts=function(){if(this.render_timeouts){for(var i=0;i<this.render_timeouts.length;i++)clearTimeout(this.render_timeouts[i]);this.render_timeouts=null;}};typeaheadpro.prototype.recalc_scroll=function(){var cn=this.list.firstChild;if(!cn)return;if(cn.childNodes.length>this.max_display){var _L1=cn.childNodes[this.max_display-1];var _L2=_L1.offsetTop+_L1.offsetHeight;this.dropdown.style.height=_L2+'px';var _L3=this.get_suggestion_node(this.selectedindex);if(_L3){var _L4=this.dropdown.scrollTop;if(_L3.offsetTop<_L4){this.dropdown.scrollTop=_L3.offsetTop;}else if(_L3.offsetTop+_L3.offsetHeight>_L2+_L4)this.dropdown.scrollTop=_L3.offsetTop+_L3.offsetHeight-_L2;}if(!typeaheadpro.should_use_overflow){this.dropdown.style.overflowY='scroll';this.dropdown.style.overflowX='hidden';}}else{this.dropdown.style.height='auto';if(!typeaheadpro.should_use_overflow)this.dropdown.style.overflowY='hidden';}};typeaheadpro.prototype.search_cache=function(_L0){return this.cache[typeahead_source.flatten_string(_L0)];};typeaheadpro.prototype.add_cache=function(_L0,_L1){if(this.source.cache_results)this.cache[typeahead_source.flatten_string(_L0)]=_L1;};typeaheadpro.prototype.update_status=function(_L0){this.status=_L0;this.dirty_results();};typeaheadpro.prototype.set_class=function(_L0){CSS.setClass(this.obj,(this.obj.className.replace(/typeahead_[^\s]+/g,'')+' '+_L0).replace(/ {2,}/g,' '));};typeaheadpro.prototype.dirty_results=function(){if(!this.enumerate&&this.get_value().trim()==''){DOM.empty(this.list);this.results_text='';this.set_message(this.source.gen_placeholder());this.suggestions=[];this.selectedindex=-1;return;}else if(this.results_text==typeahead_source.flatten_string(this.get_value())){return;}else if(this.status==typeaheadpro.STATUS_BLOCK_ON_SOURCE_BOOTSTRAP){this.set_message(this.source.gen_loading());return;}var _L0=(new Date()).getTime();var _L1=false;if(this.last_search<=(_L0-this.source.search_limit)&&this.status==typeaheadpro.STATUS_IDLE){_L1=this.perform_search();}else if(this.status==typeaheadpro.STATUS_IDLE)if(!this.search_timeout)this.search_timeout=setTimeout(function(){this.search_timeout=false;if(this.status==typeaheadpro.STATUS_IDLE)this.dirty_results();}.bind(this),this.source.search_limit-(_L0-this.last_search));if(this.source.allow_fake_results&&this.real_suggestions&&!_L1){var _L2=typeahead_source.tokenize(this.get_value()).sort(typeahead_source._sort);var _L3=[];for(var i=0;i<this.real_suggestions.length;i++)if(typeahead_source.check_match(_L2,this.real_suggestions[i].t+' '+this.real_suggestions[i].n))_L3.push(this.real_suggestions[i]);if(_L3.length){this.found_suggestions(_L3,this.get_value(),true);}else{this.selectedindex=-1;this.set_message(this.source.gen_loading());}}};typeaheadpro.prototype.perform_search=function(){if(this.get_value()==this.results_text)return true;var _L0;if((_L0=this.search_cache(this.get_value()))===undefined&&!(_L0=this.source.search_value(this.get_value()))){this.status=typeaheadpro.STATUS_WAITING_ON_SOURCE;this.last_search=(new Date()).getTime();return false;}this.found_suggestions(_L0,this.get_value(),false);return true;};typeaheadpro.prototype.set_message=function(_L0){this.clear_render_timeouts();if(_L0){this.list.innerHTML='<div class="typeahead_message">'+_L0+'</div>';this.reset_iframe();}else this.hide();this.recalc_scroll();};typeaheadpro.prototype.reset_iframe=function(){if(!typeaheadpro.should_use_iframe)return;typeaheadpro.iframe.style.top=this.dropdown.style.top;typeaheadpro.iframe.style.left=this.dropdown.style.left;typeaheadpro.iframe.style.width=this.dropdown.offsetWidth+'px';typeaheadpro.iframe.style.height=this.dropdown.offsetHeight+'px';typeaheadpro.iframe.style.display='';};typeaheadpro.prototype.advance_focus=function(){return this._move_focus(true);};typeaheadpro.prototype.reverse_focus=function(){return this._move_focus(false);};typeaheadpro.prototype._move_focus=function(_L0){var _L1=this.obj.form?get_all_form_inputs(this.obj.form):get_all_form_inputs();var _L2=[];_L2._insert=_L0?_L2.push:_L2.unshift;var _L3=!_L0;for(var i=0;i<_L1.length;i++)if(!_L0&&_L1[i]==this.obj){_L3=false;}else if(_L3&&_L1[i].type!='hidden'&&_L1[i].tabIndex!=-1&&_L1[i].offsetParent){_L2._insert(_L1[i]);}else if(_L1[i]==this.obj)_L3=true;setTimeout(function(){for(var i=0;i<this.length;i++)try{if(this[i].offsetParent){this[i].focus();setTimeout(function(){try{this.focus();}catch(e){}}.bind(this[i]),0);return;}}catch(e){}}.bind(_L2?_L2:[]),0);this.blur();this.hide();};typeaheadpro.prototype.clear_placeholder=function(){if(this.obj.className.indexOf('DOMControl_placeholder')!=-1){this.set_value('');this.set_class('');}};typeaheadpro.prototype.clear=function(){this.set_value('');this.set_class('');this.selectedindex=-1;this.enumerate=false;this.dirty_results();};typeaheadpro.prototype.hide=function(){if(this.stop_hiding)return;this.visible=false;this.dropdown.style.display='none';this.clear_render_timeouts();if(typeaheadpro.should_use_iframe)typeaheadpro.iframe.style.display='none';};typeaheadpro.prototype.show=function(){this.visible=true;if(this.focused){this.dropdown.style.top=elementY(this.anchor)+this.anchor.offsetHeight+'px';this.dropdown.style.left=elementX(this.anchor)+'px';this.dropdown.style.width=(this.anchor.offsetWidth-2)+'px';this.dropdown.style.display='';if(typeaheadpro.should_use_iframe){typeaheadpro.iframe.style.display='';this.reset_iframe();}}};typeaheadpro.prototype.toggle_icon_list=function(_L0){if(this.showing_icon_list){this.showing_icon_list=false;this.source.showing_icon_list=false;if(!_L0)this.focus();CSS.removeClass(this.typeahead_icon,'on_selected');this.want_icon_list=false;this.showing_icon_list=false;this.stop_suggestion_select=true;if(this.obj)this.dirty_results();}else{this.source.showing_icon_list=true;this.old_typeahead_value=this.obj.value;this.stop_suggestion_select=true;this.want_icon_list=true;this.dirty_results();this.focus();CSS.addClass(this.typeahead_icon,'on_selected');this.show();this.set_suggestion(-1);this.showing_icon_list=true;}setTimeout(function(){this.stop_hiding=false;}.bind(this),100);};typeaheadpro.prototype.focus=function(){this.obj.focus();};typeaheadpro.prototype.blur=function(e){if(this.obj)this.obj.blur(e);};typeaheadpro.kill_typeahead=function(obj){if(obj.typeahead){if(!this.anchor_block)obj.parentNode.removeChild(obj.nextSibling);obj.parentNode.removeChild(obj.nextSibling);if(obj.typeahead.source)obj.typeahead.source=obj.typeahead.source.owner=null;obj.onfocus=obj.onblur=obj.onkeypress=obj.onkeyup=obj.onkeydown=obj.typeahead=null;}};
function static_source(){this.values=null;this.index=null;this.index_includes_hints=false;this.exclude_ids={};this.parent.construct(this);}static_source.extend('typeahead_source');static_source.prototype.enumerable=true;static_source.prototype.filter_excluded=function(_L0){return _L0.filter((function(_L1){return !this.exclude_ids[_L1.i];}).bind(this));};static_source.prototype.build_index=function(){var _L0=[];var _L1=this.values;var _L2=_L1.length&&typeof _L1[0].i=='undefined';for(var i=0,il=_L1.length;i<il;i++){var _L5=typeahead_source.tokenize(_L1[i].t);for(var j=0,jl=_L5.length;j<jl;j++)_L0.push({t:_L5[j],o:_L1[i]});if(this.index_includes_hints&&_L1[i].s){var _L5=typeahead_source.tokenize(_L1[i].s);for(var j=0,jl=_L5.length;j<jl;j++)_L0.push({t:_L5[j],o:_L1[i]});}if(_L2)_L1[i].i=i;}_L0.sort(function(a,b){return (a.t==b.t)?0:(a.t<b.t?-1:1);});this.index=_L0;this.ready();};static_source.prototype._sort_text_obj=function(a,b){if(a.e&&!b.e)return 1;if(!a.e&&b.e)return -1;return a.t.localeCompare(b.t);};static_source.prototype.search_value=function(_L0){if(!this.is_ready)return;var _L1;if(_L0==''){_L1=this.values;}else{var _L2=typeahead_source.tokenize(_L0).sort(typeahead_source._sort);var _L3=this.index;var lo=0;var hi=this.index.length-1;var p=Math.floor(hi/2);while(lo<=hi){if(_L3[p].t>=_L2[0]){hi=p-1;}else lo=p+1;p=Math.floor(lo+((hi-lo)/2));}var _L1=[];var _L7={};var _L8=typeof _ignoreList!='undefined';for(var i=lo;i<_L3.length&&_L3[i].t.lastIndexOf(_L2[0],0)!=-1;i++){var _La=_L3[i].o.flid?_L3[i].o.flid:_L3[i].o.i;if(typeof _L7[_La]!='undefined'){continue;}else _L7[_La]=true;if((!_L8||!_ignoreList[_La])&&!this.exclude_ids[_La]&&(_L2.length==1||typeahead_source.check_match(_L2,_L3[i].o.t)))_L1.push(_L3[i].o);}}_L1.sort(this._sort_text_obj.bind(this));if(this.owner&&this.owner.max_results)_L1=_L1.slice(0,this.owner.max_results);return _L1;};static_source.prototype.set_exclude_ids=function(ids){this.exclude_ids=ids;};

if (window.Bootloader) { Bootloader.done(["js\/7rvjdmbw5qoso84c.pkg.js"]); }