/*
HTTP Host: static.ak.fbcdn.net
Generated: March 18th 2010 11:42:38 PM PDT
Machine: 10.16.139.102
Locale: nu_ll
Path: js/ci0m4jq31b4gkgss.pkg.js
*/

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/ci0m4jq31b4gkgss.pkg.js"]); }

function ads_refresh(tab,_L1,_L2,_L3,_L4,_L5,_L6){if(window.ads_refreshing)return;if(_L5===undefined)_L5=0;var _L7=['sidebar_ads','home_sponsor_nile','ego'];var _L8=[];for(var i=0;i<_L7.length;i++)if(ge(_L7[i]))_L8.push(_L7[i]);if(_L8.length==0)return;var _La={'page':_L1,'tab':tab,'locations':_L8,'photo_refresh':(_L4?'yes':'no'),'cache':_L5};var _Lb=function(_L6,_Ld){window.ads_refreshing=false;if(!_L6){var _Le=_Ld.getPayload();for(var id in _Le){var elem=ge(id);if(elem&&_Le[id].length>0)if(ua.ie()<7){elem.outerHTML=_Le[id];}else DOM.replace(elem,HTML(_Le[id]));}}if(_L2)_L2(_Ld);}.curry(_L6);var _Lc=function(_Ld){window.ads_refreshing=false;if(_L3)_L3(_Ld);};new AsyncRequest().setURI('/ajax/location_refresh.php').setData(_La).setOption('bundle',true).setHandler(_Lb).setErrorHandler(_Lc).send();window.ads_refreshing=true;}function social_ads_pagecache_log_imps(){var ads=DOM.scry(document,'div.pagecache_social_ad');for(var i=0;i<ads.length;i++){var _L2={'meta':DataStore.get(ads[i],'link_data')};new AsyncRequest().setURI('/ajax/social_ad_impression.php').setOption('bundle',true).setData(_L2).send();}}
function InstrumentedLogger(_L0){if(this===window)return new InstrumentedLogger(_L0);if(InstrumentedLogger._instances[_L0])return InstrumentedLogger._instances[_L0];copy_properties(this,{id:_L0,_phases:{}});return InstrumentedLogger._instances[_L0]=this;}copy_properties(InstrumentedLogger,{_instances:{}});copy_properties(InstrumentedLogger.prototype,{beginPhase:function(_L0){if(this._phases[_L0]&&this._phases[_L0].start)this.endPhase(_L0);if(typeof(this._phases[_L0])=='undefined')this._phases[_L0]={start:0,count:0,duration:0};this._phases[_L0].start=new Date().getTime();return this;},endPhase:function(_L0){var _L1=this._phases[_L0];if(_L1&&_L1.start){_L1.count++;_L1.duration+=new Date().getTime()-_L1.start;_L1.start=null;}return this;},dumpAndReset:function(){this.dump();return this.reset();},dump:function(){for(var _L0 in this._phases){var p=this._phases[_L0];var _L2=(this.id?this.id+'::':'')+_L0;Util.warn(' %s %f ms [%d ms / %d]',_L2,p.duration/p.count,p.duration,p.count);}return this;},get:function(_L0){if(this._phases[_L0])return this._phases[_L0].duration/this._phases[_L0].count;return 0;},reset:function(){this._phases={};return this;}});InstrumentedLogger.prototype.b=InstrumentedLogger.prototype.beginPhase;InstrumentedLogger.prototype.e=InstrumentedLogger.prototype.endPhase;InstrumentedLogger.prototype.d=InstrumentedLogger.prototype.dump;InstrumentedLogger.prototype.D=InstrumentedLogger.prototype.dumpAndReset;InstrumentedLogger.prototype.r=InstrumentedLogger.prototype.reset;var IL=InstrumentedLogger;
function DOMControl(_L0){copy_properties(this,{root:_L0&&$(_L0),updating:false});if(_L0)_L0.getControl=identity.bind(null,this);}copy_properties(DOMControl.prototype,{getRoot:function(){return this.root;},beginUpdate:function(){if(this.updating)return false;this.updating=true;return true;},endUpdate:function(){this.updating=false;},update:function(e){if(!this.beginUpdate())return this;this.onupdate(e);this.endUpdate();}});
function TextInputControl(_L0){this.parent.construct(this,_L0);copy_properties(this,{placeholderText:null,maxLength:this.getRoot().maxLength||null,radio:null,focused:false,interval:null,nativePlaceholder:false});var r=this.getRoot();if((String(r.type).toLowerCase()=='search')&&ua.safari()){this.nativePlaceholder=true;this.setPlaceholderText(r.getAttribute('placeholder'));}addEventBase(r,'focus',this.onfocus.bind(this));addEventBase(r,'blur',this.onblur.bind(this));var up=this.update.bind(this);Event.listen(r,{'keyup':up,'keydown':up,'keypress':up});this.setFocused(false);}TextInputControl.extend('DOMControl');copy_properties(TextInputControl.prototype,{associateWithRadioButton:function(_L0){this.radio=_L0&&$(_L0);return this;},setMaxLength:function(_L0){var r=this.getRoot();this.maxLength=_L0;if(_L0){r.maxLength=_L0;}else r.removeAttribute('maxlength');return this;},getValue:function(){if(!this.focused&&this.getRoot().value==this.placeholderText)return null;return this.getRoot().value;},isEmpty:function(){var v=this.getValue();return (v===null||v=='');},setValue:function(_L0){this.getRoot().value=_L0;this.update();return this;},clear:function(){return this.setValue('');},isFocused:function(){return this.focused;},setFocused:function(_L0){var _L1=this.isEmpty();this.focused=_L0;if(this.placeholderText&&!this.nativePlaceholder){var r=this.getRoot();var v=r.value;if(this.focused){CSS.removeClass(r,'DOMControl_placeholder');if(_L1)this.clear();}else if(_L1){CSS.addClass(r,'DOMControl_placeholder');this.setValue(this.placeholderText);}}this.update();return this;},setPlaceholderText:function(_L0){this.placeholderText=_L0;if(this.nativePlaceholder)this.getRoot().setAttribute('placeholder',_L0);return this.setFocused(this.isFocused());},getPlaceholderText:function(){return this.placeholderText;},onupdate:function(){if(this.radio)if(this.focused)this.radio.checked=true;var _L0=this.getRoot();if(this.maxLength>0)if(_L0.value.length>this.maxLength){var _L1=_L0.value;var _L2=_L1.length-this.maxLength;var _L3=DOM.getCaretPosition(_L0);var _L4=_L3.end||_L1.length;_L0.value=_L1.substring(0,_L4-_L2)+_L1.substring(_L4);if(typeof _L3.start!='undefined')DOM.setCaretPosition(_L0,_L3.start-_L2,Math.max(_L3.start,_L3.end)-_L2);}this.setFocused(this.focused);},onfocus:function(){this.setFocused(true);if(this.interval)clearInterval(this.interval);this.interval=setInterval(this.update.bind(this),150);return this;},onblur:function(){this.setFocused(false);if(this.interval)this.interval=clearInterval(this.interval);return this;}});function placeholderSetup(id){if(!ge(id)){Util.warn('Setting up a placeholder for an element which does not exist: %q.',id);return;}if(!$(id).getAttribute('placeholder')){Util.warn('Setting up a placeholder for an element with no placeholder text: %q.',id);return;}return new TextInputControl($(id)).setPlaceholderText($(id).getAttribute('placeholder'));}
function UISelectList(){this._callback=bagofholding;this.container=$N('div',{className:'UISelectList clearfix'});this._mode=UISelectList.MULTI_SELECT_MODE;this._inputName='UISelectList_name_'+(+new Date());this._items={};}copy_properties(UISelectList,{MULTI_SELECT_MODE:1,SINGLE_SELECT_MODE:2,MULTI_SELECT_MODE_CHECKED_CLASS_NAME:'UISelectList_check_Checked',SINGLE_SELECT_MODE_CHECKED_CLASS_NAME:'UISelectList_radio_Checked'});UISelectList.prototype={setMode:function(_L0){if(_L0!=UISelectList.MULTI_SELECT_MODE&&_L0!=UISelectList.SINGLE_SELECT_MODE){Util.error('invalid mode %s passed to UISelectList.selectMode',_L0);return this;}if(!is_empty(this._items)){Util.error("You have to set `mode' before adding any items to "+"UISelectList");return this;}this._mode=_L0;return this;},setCallback:function(fn){this._callback=fn;return this;},addItem:function(_L0,_L1,key){var _L3={label:_L0,checked:_L1,key:key};this._renderItem(_L3);return this;},addItems:function(_L0){for(var i=0;i<_L0.length;i++)this.addItem(_L0[i].label,_L0[i].checked,_L0[i].key);return this;},clearItems:function(){this._items={};DOM.empty(this.container);return this;},setSelected:function(key,_L1){if(this._items[key]){var _L2=this._items[key].input;_L2.checked=!_L1;_L2.click();}return this;},getElement:function(){return this.container;},reset:function(){for(var key in this._items){var _L1=this._items[key].input;var _L2=this._items[key].label;_L1.checked=_L1.defaultChecked;CSS.conditionClass(_L2,this._getCheckedClass(),_L1.checked);}},_renderItem:function(_L0){var _L1=$N('input',{type:this._getInputType(),name:this._inputName});_L1.checked=_L0.checked;_L1.defaultChecked=_L0.checked;var _L2=$N('a',{className:'UISelectList_Label',href:'#'},_L0.label);if(_L0.checked)_L2.addClass(this._getCheckedClass());_L2.listen('click',this._linkClicked.bind(this,_L1));_L1.listen('click',this._clicked.bind(this,_L1,_L2,_L0.key));this.container.appendContent($N('div',{className:'UISelectList_Item'},[_L1,_L2]));_L0.input=_L1;_L0.label=_L2;this._items[_L0.key]=_L0;},_getInputType:function(){if(this._mode==UISelectList.MULTI_SELECT_MODE)return 'checkbox';return 'radio';},_getCheckedClass:function(){if(this._mode==UISelectList.MULTI_SELECT_MODE)return UISelectList.MULTI_SELECT_MODE_CHECKED_CLASS_NAME;return UISelectList.SINGLE_SELECT_MODE_CHECKED_CLASS_NAME;},_linkClicked:function(_L0,e){_L0.click();},_clicked:function(_L0,_L1,key,e){var _L4;if(this._mode==UISelectList.SINGLE_SELECT_MODE){for(var k in this._items){var _L6=_L0==this._items[k].input;CSS.conditionClass(this._items[k].label,this._getCheckedClass(),_L6);}_L4=true;}else{_L4=_L0.checked;CSS.conditionClass(_L1,this._getCheckedClass(),_L0.checked);}this._callback(_L4,key);$E(e).stop();}};
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='';this.list.style.width=this.dropdown.style.width;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 typeahead_source(){}typeahead_source.prototype.cache_results=false;typeahead_source.prototype.enumerable=false;typeahead_source.prototype.allow_fake_results=false;typeahead_source.prototype.search_limit=10;typeahead_source.prototype.check_limit=10;typeahead_source.prototype.bootstrap=bagofholding;typeahead_source.check_match=function(_L0,_L1){_L1=typeahead_source.tokenize(_L1);for(var i=0,il=_L0.length;i<il;i++)if(_L0[i].length){var _L4=false;for(var j=0,jl=_L1.length;j<jl;j++)if(_L1[j].length>=_L0[i].length&&_L1[j].substring(0,_L0[i].length)==_L0[i]){_L4=true;_L1[j]='';break;}if(!_L4)return false;}return true;};typeahead_source.tokenize=function(_L0,_L1,_L2){return (_L2?_L0:typeahead_source.flatten_string(_L0)).split(_L1?typeahead_source.normalizer_regex_capture:typeahead_source.normalizer_regex);};typeahead_source.normalizer_regex_str='(?:(?:^| +)["\'.\\-]+ *)|(?: *[\'".\\-]+(?: +|$)|[@_]| +)';typeahead_source.normalizer_regex=new RegExp(typeahead_source.normalizer_regex_str,'g');typeahead_source.normalizer_regex_capture=new RegExp('('+typeahead_source.normalizer_regex_str+')','g');typeahead_source.flatten_string=function(_L0){if(!typeahead_source.accents)typeahead_source.accents={a:/\u0430|\u00e0|\u00e1|\u00e2|\u00e3|\u00e4|\u00e5/g,b:/\u0431/g,c:/\u0446|\u00e7/g,d:/\u0434|\u00f0/g,e:/\u044d|\u0435|\u00e8|\u00e9|\u00ea|\u00eb/g,f:/\u0444/g,g:/\u0433/g,h:/\u0445/g,i:/\u0438|\u00ec|\u00ed|\u00ee|\u00ef/g,j:/\u0439/g,k:/\u043a/g,l:/\u043b/g,m:/\u043c/g,n:/\u043d|\u00f1/g,o:/\u043e|\u00f8|\u00f6|\u00f5|\u00f4|\u00f3|\u00f2/g,p:/\u043f/g,r:/\u0440/g,s:/\u0441/g,t:/\u0442/g,u:/\u0443|\u044e|\u00fc|\u00fb|\u00fa|\u00f9/g,v:/\u0432/g,y:/\u044b|\u00ff|\u00fd/g,z:/\u0437/g,ae:/\u00e6/g,oe:/\u0153/g,ts:/\u0446/g,ch:/\u0447/g,sh:/\u0448/g,ya:/\u044f/g};_L0=_L0.toLowerCase();for(var i in typeahead_source.accents)_L0=_L0.replace(typeahead_source.accents[i],i);return _L0;};typeahead_source.prototype.set_owner=function(obj){this.owner=obj;if(this.is_ready)this.owner.update_status(typeaheadpro.STATUS_IDLE);};typeahead_source.prototype.ready=function(){if(this.owner&&!this.is_ready){this.is_ready=true;this.owner.update_status(typeaheadpro.STATUS_IDLE);}else this.is_ready=true;};typeahead_source.highlight_found=function(_L0,_L1){var _L2=[];resultv=typeahead_source.tokenize(_L0,true,true);_L0=typeahead_source.tokenize(_L0,true);_L1=typeahead_source.tokenize(_L1);_L1.sort(typeahead_source._sort);for(var i=0,il=resultv.length;i<il;i++){var _L5=false;for(var j=0,jl=_L1.length;j<jl;j++)if(_L1[j]&&_L0[i].lastIndexOf(_L1[j],0)!=-1){_L2.push('<em>',htmlspecialchars(resultv[i].substring(0,_L1[j].length)),'</em>',htmlspecialchars(resultv[i].substring(_L1[j].length,resultv[i].length)));_L5=true;break;}if(!_L5)_L2.push(htmlspecialchars(resultv[i]));}return _L2.join('');};typeahead_source._sort=function(a,b){return b.length-a.length;};typeahead_source.prototype.gen_nomatch=function(){return this.text_nomatch!=null?this.text_nomatch:_tx("No matches found");};typeahead_source.prototype.gen_loading=function(){return this.text_loading!=null?this.text_loading:_tx("Loading...");};typeahead_source.prototype.gen_placeholder=function(){return this.text_placeholder!=null?this.text_placeholder:_tx("Start typing...");};typeahead_source.prototype.gen_noinput=function(){return this.text_noinput!=null?this.text_noinput:_tx("Start typing...");};typeahead_source.prototype.onselect_not_found=function(){if(typeof this.tokenizer._ontokennotfound!='undefined')this.tokenizer._ontokennotfound(this.obj.value);if(typeof this.tokenizer.onselect!='undefined')return this.tokenizer.onselect();};
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,_L1){if(!this.is_ready)return;var _L2;if(_L0==''){_L2=this.values;}else{var _L3=typeahead_source.tokenize(_L0).sort(typeahead_source._sort);var _L4=this.index;var lo=0;var hi=this.index.length-1;var p=Math.floor(hi/2);while(lo<=hi){if(_L4[p].t>=_L3[0]){hi=p-1;}else lo=p+1;p=Math.floor(lo+((hi-lo)/2));}var _L2=[];var _L8={};var _L9=typeof _ignoreList!='undefined';for(var i=lo;i<_L4.length&&_L4[i].t.lastIndexOf(_L3[0],0)!=-1;i++){var _Lb=_L4[i].o.flid?_L4[i].o.flid:_L4[i].o.i;if(typeof _L8[_Lb]!='undefined'){continue;}else _L8[_Lb]=true;if((!_L9||!_ignoreList[_Lb])&&!this.exclude_ids[_Lb]&&(_L3.length==1||typeahead_source.check_match(_L3,_L4[i].o.t)))_L2.push(_L4[i].o);}}_L2.sort(this._sort_text_obj.bind(this));if(this.owner&&this.owner.max_results)_L2=_L2.slice(0,this.owner.max_results);if(_L1)_L1(this,_L0,_L2);return _L2;};static_source.prototype.set_exclude_ids=function(ids){this.exclude_ids=ids;};
function RenderManager(_L0){copy_properties(this,{_isDirty:false,_obj:_L0});}copy_properties(RenderManager.prototype,{dirty:function(){if(!this._isDirty){this._isDirty=true;bind(this,this.doPaint).defer();}},doPaint:function(){this._isDirty=false;this._obj.paint();}});
var HistoryManager={_IFRAME_BASE_URI:'http://static.ak.facebook.com/common/history_manager.html',history:null,current:0,fragment:null,_setIframeSrcFragment:function(src){src=src.toString();var _L1=HistoryManager.history.length-1;HistoryManager.iframe.src=HistoryManager._IFRAME_BASE_URI+'?|index='+_L1+'#'+encodeURIComponent(src);return HistoryManager;},getIframeSrcFragment:function(){return decodeURIComponent(URI(HistoryManager.iframe.contentWindow.document.location.href).getFragment());},nextframe:function(_L0,_L1){if(_L1){HistoryManager._setIframeSrcFragment(_L0);return;}if(_L0!==undefined){HistoryManager.iframeQueue.push(_L0);}else{HistoryManager.iframeQueue.splice(0,1);HistoryManager.iframeTimeout=null;HistoryManager.checkURI();}if(HistoryManager.iframeQueue.length&&!HistoryManager.iframeTimeout){var src=HistoryManager.iframeQueue[0];HistoryManager.iframeTimeout=setTimeout(function(){HistoryManager._setIframeSrcFragment(src);},100,false);}},isInitialized:function(){return !!HistoryManager._initialized;},init:function(){if(URI.getRequestURI(false).getProtocol().toLowerCase()=='https')return;if(!env_get('ALLOW_TRANSITION_IN_IFRAME')&&window!=window.top)return;if(HistoryManager._initialized)return HistoryManager;var uri=URI();var _L1=uri.getFragment()||'';copy_properties(HistoryManager,{_initialized:true,fragment:_L1,orig_fragment:_L1,history:[uri],callbacks:[],lastChanged:new Date().getTime(),canonical:URI('#'),fragmentTimeout:null,user:0,iframeTimeout:null,iframeQueue:[],enabled:true,debug:bagofholding});if(ua.safari()<500||ua.firefox()<2){HistoryManager.enabled=false;return HistoryManager;}if(ua.ie()<8){HistoryManager.iframe=document.createElement('iframe');copy_properties(HistoryManager.iframe.style,{width:'0',height:'0',frameborder:'0',left:'0',top:'0',position:'absolute'});onloadRegister(function(){HistoryManager._setIframeSrcFragment(_L1);document.body.insertBefore(HistoryManager.iframe,document.body.firstChild);});}else setInterval(HistoryManager.checkURI,42,false);HistoryManager._updateRefererURI(URI.getRequestURI(false));return HistoryManager;},registerURIHandler:function(_L0){HistoryManager.callbacks.push(_L0);return HistoryManager;},setCanonicalLocation:function(loc){HistoryManager.canonical=URI(loc);return HistoryManager;},notify:function(uri){if(uri==HistoryManager.orig_fragment)uri=HistoryManager.canonical.getFragment();for(var ii=0;ii<HistoryManager.callbacks.length;ii++)try{if(HistoryManager.callbacks[ii](uri))return true;}catch(ex){Util.error('Uncaught exception in HistoryManager URI handler callback: %x',ex);}return false;},checkURI:function(){if(new Date().getTime()-HistoryManager.lastChanged<400)return;if(ua.ie()<8&&HistoryManager.iframeQueue.length)return;if(ua.safari()&&window.history.length==200){if(!HistoryManager.warned){HistoryManager.warned=true;Util.error('Your history length is over 200 and you are in Safari; things will '+'start behaving oddly now. This is a known bug.');}return;}var _L0=URI().getFragment();if(ua.ie()<8)_L0=HistoryManager.getIframeSrcFragment();if(_L0!=HistoryManager.fragment){HistoryManager.debug([_L0,' vs ',HistoryManager.fragment,'whl: ',window.history.length,'QHL: ',HistoryManager.history.length].join(' '));for(var ii=HistoryManager.history.length-1;ii>=0;--ii)if(HistoryManager.history[ii].getFragment()==_L0)break;++HistoryManager.user;if(ii>=0){HistoryManager.go(ii-HistoryManager.current);}else HistoryManager.go('#'+_L0);--HistoryManager.user;}delete _L0;},_updateRefererURI:function(uri){uri=uri.toString();if(uri.charAt(0)!='/'&&uri.indexOf('//')==-1)return;setCookie('x-referer',URI(uri).getQualifiedURI().setFragment('').toString());},go:function(_L0,now,_L2){HistoryManager.debug('go: '+_L0);if(now===undefined)now=true;if(!HistoryManager.enabled)if(!now)return false;if(typeof(_L0)=='number'){if(!_L0)return false;var dst=_L0+HistoryManager.current;var loc=Math.max(0,Math.min(HistoryManager.history.length-1,dst));HistoryManager.current=loc;dst=HistoryManager.history[loc].getFragment()||HistoryManager.orig_fragment;HistoryManager.fragment=dst;HistoryManager.lastChanged=new Date().getTime();if(ua.ie()<8){if(HistoryManager.fragmentTimeout)clearTimeout(HistoryManager.fragmentTimeout);HistoryManager._temporary_fragment=dst;HistoryManager.fragmentTimeout=setTimeout(function(){window.location.hash='#'+dst;delete HistoryManager._temporary_fragment;},750,false);if(!HistoryManager.user)HistoryManager.nextframe(dst,_L2);}else if(!HistoryManager.user)go_or_replace(window.location,window.location.href.split('#')[0]+'#'+dst,_L2);if(now)HistoryManager.notify(dst);HistoryManager._updateRefererURI(dst);return false;}_L0=URI(_L0);if(_L0.getDomain()==URI().getDomain())_L0=URI('#'+_L0.getUnqualifiedURI());var cur=HistoryManager.history[HistoryManager.current].getFragment();var tgt=_L0.getFragment();if(tgt==cur||(cur==HistoryManager.orig_fragment&&tgt==HistoryManager.canonical.getFragment())){if(now)HistoryManager.notify(tgt);HistoryManager._updateRefererURI(tgt);return false;}if(_L2)HistoryManager.current--;var _L7=(HistoryManager.history.length-HistoryManager.current)-1;HistoryManager.history.splice(HistoryManager.current+1,_L7);HistoryManager.history.push(URI(_L0));return HistoryManager.go(1,now,_L2);},getCurrentFragment:function(){var _L0=HistoryManager._temporary_fragment!==undefined?HistoryManager._temporary_fragment:URI.getRequestURI(false).getFragment();return _L0==HistoryManager.orig_fragment?HistoryManager.canonical.getFragment():_L0;}};var PageTransitions={_transition_handlers:[],_scroll_positions:{},isInitialized:function(){return !!PageTransitions._initialized;},_init:function(){if(URI.getRequestURI(false).getProtocol().toLowerCase()=='https')return;if(!env_get('ALLOW_TRANSITION_IN_IFRAME')&&window!=window.top)return;if(PageTransitions._initialized)return PageTransitions;PageTransitions._initialized=true;var _L0=URI.getRequestURI(false);var _L1=_L0.getUnqualifiedURI();var _L2=URI(_L1).setFragment(null);if(_L2.toString()===_L1.getFragment())_L1=_L2;copy_properties(PageTransitions,{_current_uri:_L1,_most_recent_uri:_L1,_next_uri:_L1});var _L3;if(_L0.getFragment().startsWith('/')){_L3=_L0.getFragment();}else _L3=_L1;HistoryManager.init().setCanonicalLocation('#'+_L3).registerURIHandler(PageTransitions._historyManagerHandler);LinkController.registerFallbackHandler(PageTransitions._rewriteHref,LinkController.TARGETS|LinkController.MODIFIERS);LinkController.registerFallbackHandler(PageTransitions._onlinkclick);FormController.registerFallbackHandler(PageTransitions._onformsubmit);window.onscroll=chain(window.onscroll,function(){var _L4=HistoryManager.getCurrentFragment();if(PageTransitions._current_uri==_L4)PageTransitions._scroll_positions[_L4]=Vector2.getScrollPosition();});return PageTransitions;},registerHandler:function(_L0,_L1){PageTransitions._init();if(PageTransitions._transition_handlers.contains(_L0))Util.warn('Registering a transition handler that\'s already been '+'registered.  Ur probably doin it wrong.');if(_L1){PageTransitions._transition_handlers.unshift(_L0);}else PageTransitions._transition_handlers.push(_L0);},getCurrentURI:function(_L0){if(!PageTransitions._current_uri&&!_L0){Util.warn('You\'ve requested the current URI, but there is no "current" '+'URI.  This is probably because you\'re in the middle of a '+'page transition.  That\'s an awkward time to ask for the '+'current URI, and you should probably avoid this situation.  '+'For now, I\'m just gonna return the most recent page URI, '+'since that\'s better than returning null.');return new URI(PageTransitions._most_recent_uri);}return new URI(PageTransitions._current_uri);},getMostRecentURI:function(){return new URI(PageTransitions._most_recent_uri);},getNextURI:function(){return new URI(PageTransitions._next_uri);},_rewriteHref:function(_L0){var _L1=_L0.getAttribute('href');var _L2=_computeRelativeURI(PageTransitions._most_recent_uri.getQualifiedURI(),_L1).toString();if(_L1!=_L2)_L0.setAttribute('href',_L2);},_onlinkclick:function(_L0){_BusyUIManager.lookBusy(_L0);PageTransitions.go(_L0.getAttribute('href'));return false;},_onformsubmit:function(_L0){var _L1=new URI(_L0.getAttribute('action')||''),_L2=_computeRelativeURI(PageTransitions._most_recent_uri,_L1);_L0.setAttribute('action',_L2.toString());if(!_L0.method||_L0.method.toUpperCase()=='GET'){PageTransitions.go(_L2.addQueryData(serialize_form(_L0)));return false;}},_rewriteSubDomain:function(uri){uri=URI(uri);var _L1=uri.getDomain();if(_L1.indexOf('apps.')===0){var _L2=URI.getRequestURI().getDomain();uri.addQueryData({_fb_qsub:_L1}).setDomain(_L2);}return uri;},_revertSubDomain:function(uri){uri=URI(uri);var _L1=uri.getQueryData();if('_fb_qsub' in _L1){var _L2=_L1._fb_qsub;uri.removeQueryData('_fb_qsub').setDomain(_L2).setProtocol(URI().getProtocol());}return uri;},go:function(uri,_L1){var _L2=new URI(uri).removeQueryData('quickling').getQualifiedURI();_L2=PageTransitions._rewriteSubDomain(_L2);var _L3=_L2.getUnqualifiedURI();delete PageTransitions._scroll_positions[_L3];_BusyUIManager.lookBusy();PageTransitions._loadPage(_L2,function(_L4){if(_L4){HistoryManager.go(_L2.toString(),false,_L1);}else{_L2=PageTransitions._revertSubDomain(_L2);go_or_replace(window.location,_L2,_L1);}});},_historyManagerHandler:function(_L0){if(_L0.charAt(0)!='/')return false;PageTransitions._loadPage(new URI(_L0),function(_L1){if(!_L1){_L0=PageTransitions._revertSubDomain(_L0);go_or_replace(window.location,_L0,true);}});return true;},_loadPage:function(uri,_L1){if(uri.getFragment()&&are_equal(URI(uri).setFragment(null).getQualifiedURI(),URI(PageTransitions._current_uri).setFragment(null).getQualifiedURI())){PageTransitions._current_uri=PageTransitions._most_recent_uri=uri;PageTransitions.restoreScrollPosition();_BusyUIManager.stopLookingBusy();return;}var _L2=PageTransitions._scroll_positions[PageTransitions._current_uri];PageTransitions._current_uri=null;PageTransitions._next_uri=uri;if(_L2)DOMScroll.scrollTo(_L2,false);var _L3=function(){var _L5=PageTransitions._handleTransition(uri);_L1&&_L1(_L5);};var _L4=_runHooks('onbeforeleavehooks');if(_L4){_BusyUIManager.stopLookingBusy();PageTransitions._warnBeforeLeaving(_L4,_L3);}else _L3();},_handleTransition:function(uri){window.onbeforeleavehooks=undefined;_BusyUIManager.lookBusy();for(var i=PageTransitions._transition_handlers.length-1;i>=0;--i)if(PageTransitions._transition_handlers[i](uri)===true){var _L2={sender:this,uri:uri};Arbiter.inform(Arbiter.PAGE_TRANSITION,_L2);return true;}else PageTransitions._transition_handlers.splice(i,1);return false;},unifyURI:function(){PageTransitions._current_uri=PageTransitions._most_recent_uri=PageTransitions._next_uri;},transitionComplete:function(){_BusyUIManager.stopLookingBusy();PageTransitions.unifyURI();PageTransitions.restoreScrollPosition();},_warnBeforeLeaving:function(_L0,_L1){new Dialog().setTitle(_tx("Are you sure you want to navigate away from this page?")).setSummary(_tx("Press {ok} to continue, or {cancel} to stay on the current page.",{ok:_tx("Okay"),cancel:_tx("Cancel")})).setBody(htmlize(_L0)).setButtons(Dialog.OK_AND_CANCEL).setHandler(_L1).setModal().show();},restoreScrollPosition:function(){var _L0=PageTransitions._current_uri;var _L1=PageTransitions._scroll_positions[_L0];if(_L1){DOMScroll.scrollTo(_L1,false);return;}function _L2(_L5){return (_L5||null)&&(DOM.find(document,sprintf('a[name=%e]',_L5))||ge(_L5));}var _L3=_L2(_L0.getFragment());if(_L3){var _L4=Vector2.getElementPosition(_L3);_L4.x=0;DOMScroll.scrollTo(_L4);}}};function _computeRelativeURI(_L0,_L1){var ret=new URI(),_L3=_L1;_L0=new URI(_L0);_L1=new URI(_L1);if(!_L1.isFacebookURI())return _L3;var _L4=_L0;var _L5=['Protocol','Domain','Port','Path','QueryData','Fragment'];_L5.forEach(function(_L6){var _L7=_L6=='Path'&&_L4===_L0;if(_L7)ret.setPath(_computeRelativePath(_L0.getPath(),_L1.getPath()));if(!is_empty(_L1['get'+_L6]()))_L4=_L1;if(!_L7)ret['set'+_L6](_L4['get'+_L6]());});return ret;}function _computeRelativePath(_L0,_L1){if(!_L1)return _L0;if(_L1.charAt(0)=='/')return _L1;var _L2=_L0.split('/').slice(0,-1);if(_L2[0]!=='')Util.warn('Original path is not absolute.');_L1.split('/').forEach(function(_L3){if(_L3=='.'){}else if(_L3=='..'){if(_L2.length>1)_L2=_L2.slice(0,-1);}else _L2.push(_L3);});return _L2.join('/');}function go_or_replace(_L0,_L1,_L2){var uri=new URI(_L1);if(_L0.pathname=='/'&&uri.getPath()!='/'&&uri.isQuicklingEnabled()){var _L4=_L0.search?{}:{q:''};uri=new URI().setPath('/').setQueryData(_L4).setFragment(uri.getUnqualifiedURI()).toString();_L1=uri.toString();}if(_L2&&!(ua.ie()<8)){_L0.replace(_L1);}else if(_L0.href==_L1){_L0.reload();}else _L0.href=_L1;}var _BusyUIManager={_looking_busy:false,_original_cursors:[],lookBusy:function(_L0){if(_L0)_BusyUIManager._giveProgressCursor(_L0);if(_BusyUIManager._looking_busy)return;_BusyUIManager._looking_busy=true;_BusyUIManager._giveProgressCursor(document.body);},stopLookingBusy:function(){if(!_BusyUIManager._looking_busy)return;_BusyUIManager._looking_busy=false;while(_BusyUIManager._original_cursors.length){var _L0=_BusyUIManager._original_cursors.pop();var _L1=_L0[0];var _L2=_L0[1];if(_L1.style)_L1.style.cursor=_L2||'';}},_giveProgressCursor:function(_L0){if(!ua.safari()){_BusyUIManager._original_cursors.push([_L0,_L0.style.cursor]);_L0.style.cursor='progress';}}};
function Template(_L0){copy_properties(this,{_templateSource:_L0});}copy_properties(Template,{_operatorRepeat:function(s,_L1){var _L2='';var _L3=s.match(/([^:]*):(.*)/);if(!_L3){Util.warn('Invalid template call: %s',s);}else if(!TemplateRegistry.hasTemplate(_L3[2])){Util.warn('Template not available: %s',s);}else if(_L1[_L3[1]]){var _L4=TemplateRegistry.getTemplate(_L3[2]);var _L5=arrayize(_L1[_L3[1]]);_L2+=_L5.map(function(_L4,_L1){return _L4.render(_L1);}.curry(_L4)).join(' ');}return _L2;}});copy_properties(Template.prototype,{getSource:function(){return this._templateSource;},render:function(_L0){var _L1=function(_L2,_L3,_L4,key){switch(_L4){case 'H':return _L2[key]||'';case 'R':return Template._operatorRepeat(key,_L2);default:return _L2[key]?htmlize(_L2[key]):'';}return _L2[key]?translator(_L2[key]):'';}.curry(_L0||{});return this._templateSource.replace(/\$(H|R)?{([^\}]*)\}/g,_L1);}});var TemplateRegistry={_storage:{},registerTemplate:function(_L0,_L1){if(typeof(_L1)=="string")_L1=new Template(_L1);this._storage[_L0]=_L1;return this;},unregisterTemplate:function(_L0){delete this._storage[_L0];},hasTemplate:function(_L0){return _L0 in this._storage;},getTemplate:function(_L0){if(this.hasTemplate(_L0))return this._storage[_L0];return null;},registerServerSideTemplate:function(_L0,_L1,_L2,_L3){_L1=_L1||bagofholding;_L2=!!_L2;_L3=!!_L3;if(this.hasTemplate(_L0)){_L1();return this;}var _L4=new AsyncRequest(_L0).setReadOnly(true).setMethod('GET').setOption('asynchronous',!_L2).setOption('suppressEvaluation',!_L3);if(!_L2)_L4.setErrorHandler(this._registerErrorHandler.bind(this,_L0)).setHandler(this._registerHandler.bind(this,_L0,_L3,_L1));_L4.send();if(_L2){var _L5=this._stripHasteComments(_L4.transport.responseText);this.registerTemplate(_L0,new Template(_L5));_L1();}return this;},_registerErrorHandler:function(_L0,_L1){Util.warn('Failed to register template "%s"',_L0);},_registerHandler:function(_L0,_L1,_L2,_L3){var _L4=_L3.getPayload();var _L5=null;if(_L1){if(_L4.template)_L5=_L4.template;}else _L5=this._stripHasteComments(_L4.responseText);if(_L5){this.registerTemplate(_L0,_L5);_L2();}else Util.error('No template found in response payload');},_stripHasteComments:function(_L0){return _L0.replace(/^\s*\/\*\*?(.|\n)*\*\//m,'');},_onRegisterTemplate:function(_L0,_L1){if(_L0=='template/registerTemplate'){if(!_L1||!_L1.name||!_L1.template){Util.warn('TemplateRegister: Invalid template data.');}else this.registerTemplate(_L1.name,_L1.template);return false;}Util.warn('TemplateRegister: Invalid arbiter message type: %s',_L0);return true;}};Arbiter.subscribe('template/registerTemplate',TemplateRegistry._onRegisterTemplate.bind(TemplateRegistry),Arbiter.SUBSCRIBE_ALL);
function TemplateObject(_L0,_L1){_L1=_L1||{};if(!(_L0 instanceof Template))if(TemplateRegistry.hasTemplate(_L0)){_L0=TemplateRegistry.getTemplate(_L0);}else if(_L0 instanceof URI){TemplateRegistry.registerServerSideTemplate(_L0.toString(),null,true);_L0=TemplateRegistry.getTemplate(_L0);}if(_L0==null)throw new Error("Template could not be found");var _L2=_L0.render(_L1);copy_properties(this,{_nodes:HTML(_L2).getNodes(),_template:_L0,_rendered:_L2});TemplateObject.bindNodes(this._nodes,this);}copy_properties(TemplateObject,{bindNodes:function(_L0,_L1){var _L2=[];for(var i=0;i<_L0.length;i++)if(_L0[i].nodeType==DOM.NODE_TYPES.ELEMENT){_L2.push(_L0[i]);var _L4=_L0[i].getElementsByTagName('*');_L2=_L2.concat(to_array(_L4));}for(var i=0;i<_L2.length;i++){var _L5=_L2[i].getAttribute('bindPoint');var _L6=_L2[i].getAttribute('listen');if(_L5)if(hasArrayNature(_L1[_L5])){_L1[_L5].push(_L2[i]);}else _L1[_L5]=_L2[i];if(_L6)_L6.replace(/(\w+) *: *(\w+)/g,function(_L7,_L8,_L9,_La){if(typeof(this[_La])=="function"){Event.listen(_L7,_L9,bind(this,this[_La]));}else Event.listen(_L7,_L9,bind(this,TemplateObject._eventWrapper,_La));}.bind(_L1,_L2[i]));}},_eventWrapper:function(_L0,_L1){if(typeof(this[_L0])=="function"){return this[_L0](_L1);}else{Util.warn('Event wrapper [%s] not defined for template object',_L0);return true;}}});copy_properties(TemplateObject.prototype,{getNodes:function(){return this._nodes;},getRendered:function(){return this._rendered;}});
var SocialGraphManager=function(){var _L0=false;var _L1=-1;var _L2=-1;var _L3=null;var _L4=function(_L7){if(!_L0)return null;var _L8={'class':_L1,'node_id':_L2};copy_properties(_L7,_L8);return _L7;};var _L5=function(uri,_L8,_L9){new AsyncRequest().setURI(uri).setData(_L4(_L8)).setHandler(_L9?_L9:bagofholding).send();return false;};var _L6=function(uri,_L8){if(!(_L8=_L4(_L8)))return;var _L9=new AsyncRequest().setMethod('POST').setURI(uri).setData(_L8);_L3=new Dialog().setModal(true).setAsync(_L9).show();return false;};return {init:function(_L7,_L8){_L0=true;_L1=_L7;_L2=_L8;return this;},getCurrentNodeID:function(){return _L2;},showInviteDialog:function(){_L6('/ajax/social_graph/invite_dialog.php',{});},showAddAdminDialog:function(){_L6('/ajax/social_graph/add_admin_dialog.php',{});},showBrowseDialog:function(_L7){var _L8=URI.getRequestURI().getQueryData();if('viewas' in _L8){if(_L7==null)_L7={};_L7['viewas']=_L8['viewas'];}_L6('/ajax/social_graph/dialog/browse.php',_L7||{});},submitDialog:function(_L7,_L8){if(Dialog.getCurrent()){var _L9=serialize_form($(_L7));Dialog.getCurrent().hide();if(_L9['ids']||_L9['email_addresses'])_L6(_L8,_L9);}},cancelDialog:function(){if(_L3)_L3.hide();},fetch:function(_L7,_L8,_L9,_La,_Lb){var uri='/ajax/social_graph/fetch.php';var _Ld={'edge_type':_L7,'page':_L9,'limit':_La};var _Le=URI.getRequestURI().getQueryData();if('viewas' in _Le)_Ld['viewas']=_Le['viewas'];if(_L8)copy_properties(_Ld,_L8);return _L5(uri,_Ld,_Lb);},search:function(_L7,_L8,_L9){var uri='/ajax/social_graph/search.php';var _Lb={'query':_L7};if(_L8)copy_properties(_Lb,_L8);return _L5(uri,_Lb,_L9);},add:function(_L7,_L8,_L9,_La,_Lb,_Lc){var uri='/ajax/social_graph/add.php';var _Le={'fbids':_L7,'edge_type':_L8,'app_id':_La,'message':_Lb};if(_L9)copy_properties(_Le,_L9);return _L5(uri,_Le,_Lc);},remove:function(_L7,_L8,ban,_La,_Lb,_Lc){var uri='/ajax/social_graph/remove.php';var _Le={'fbid':_L7,'edge_type':_L8,'ban':ban,'message':_Lb};if(_La)copy_properties(_Le,_La);return _L5(uri,_Le,_Lc);}};}();
Arbiter.inform("template\/registerTemplate", {"name":"\/templates\/UIActionMenu.tmpl","template":"\n<div class=\"UIActionMenu\" bindPoint=\"root\">\n  <a class=\"UIActionMenu_Wrap\" bindPoint=\"wrap\" href=\"#\">\n    <span class=\"UIActionMenu_Icon\" bindPoint=\"icon\"><\/span>\n    <span class=\"UIActionMenu_Text\" bindPoint=\"text\"><\/span>\n    <span class=\"UIActionMenu_Chevron\"><\/span>\n  <\/a>\n  <div class=\"UIActionMenu_Menu\" bindPoint=\"menu\"><\/div>\n<\/div>\n"}, Arbiter.BEHAVIOR_PERSISTENT);
function UIActionMenu(_L0){this.root=null;this.wrap=null;this.icon=null;this.text=null;this.menu=null;this._dirty=true;this._title=_L0;this._contentCallback=bagofholding;this._selectList=null;this.parent.construct(this,URI('/templates/UIActionMenu.tmpl'));this._initialize();}UIActionMenu.extend('TemplateObject');copy_properties(UIActionMenu,{ICONS:{LOCK:'UIActionMenu_Lock',PEOPLE:'UIActionMenu_People'},COLORS:{BLUE:'UIActionMenu_Blue'}});UIActionMenu.mixin('Arbiter',{_initialize:function(){Event.listen(this.wrap,'click',this.click.bind(this));Event.listen(this.root,'mouseover',function(_L0){var _L1=DOM.getNearest(_L0.getTarget(),'a');_L1&&_L1.focus();});},hideMenu:function(){Toggler.hide();this.wrap.focus();return this;},click:function(_L0){if(this._dirty){this.buildMenu();this.setDirty(false);}this.inform('menuActivated');Toggler.toggle(this.wrap);_L0.prevent();},setAlignRight:function(_L0){this._right=_L0;CSS.conditionClass(this.root,'UIActionMenu_AlignRight',_L0);return this;},setContentCallback:function(fn){this._contentCallback=fn;return this;},setSuppressButton:function(_L0){CSS.conditionClass(this.root,'UIActionMenu_SuppressButton',_L0);return this;},setSuppressText:function(_L0){CSS.conditionClass(this.root,'UIActionMenu_SuppressText',_L0);return this;},setColor:function(_L0){switch(_L0){case UIActionMenu.COLORS.BLUE:if(this.color)CSS.removeClass(this.root,this.color);CSS.addClass(this.root,_L0);this.color=_L0;break;default:if(this.color){CSS.removeClass(this.root,this.color);this.color=null;}}return this;},setIcon:function(_L0){switch(_L0){case UIActionMenu.ICONS.LOCK:case UIActionMenu.ICONS.PEOPLE:CSS.addClass(this.root,'UIActionMenu_IconIncluded');CSS.addClass(this.icon,_L0);break;default:CSS.removeClass(this.root,'UIActionMenu_IconIncluded');Util.error('invalid icon passed to `UIActionMenu.setIcon`');}return this;},_getContent:function(){var _L0=this._contentCallback();return _L0;},setTitle:function(_L0){this._title=_L0;DOM.setContent(this.text,this._title);return this;},setTooltip:function(_L0){if(this.tooltip){if(_L0){DOM.setContent(this.tooltip.firstChild,_L0);}else{DOM.remove(this.tooltip);CSS.removeClass(this.wrap,'uiTooltip');this.tooltip=null;}}else{this.tooltip=$N('span',{className:'uiTooltipWrap'},$N('span',{className:'uiTooltipText'},_L0));CSS.addClass(this.wrap,'uiTooltip');if(this._right)CSS.addClass(this.tooltip,'right');DOM.prependContent(this.wrap,this.tooltip);}return this;},getNodes:function(){DOM.setContent(this.text,this._title);return [this.root];},buildMenu:function(){DOM.setContent(this.menu,this._getContent());return this;},useSelectList:function(_L0,_L1,_L2){_L2=_L2||UISelectList.MULTI_SELECT_MODE;this.setContentCallback(function(){this._selectList=new UISelectList().setMode(_L2).setCallback(function(_L3,key){this.hideMenu();_L1&&_L1(_L3,key);}.bind(this)).addItems(_L0);return this._selectList.getElement();}.bind(this));return this;},resetSelectList:function(){this._selectList&&this._selectList.reset();},getSelectList:function(){return this._selectList;},setDirty:function(_L0){this._dirty=_L0;return this;}});
Arbiter.inform("template\/registerTemplate", {"name":"\/templates\/UIPager.tmpl","template":"\n<span class=\"UIPager\" bindPoint =\"root\">\n  <span class=\"UIPager_PageNum\" bindPoint=\"pageNumber\"><\/span>\n  <span class=\"UIPager_ButtonWrapper\" bindPoint=\"backWrapper\">\n    <a class=\"UIPager_Button UIPager_ButtonBack\" bindPoint=\"backRoot\" href=\"#\"><\/a>\n  <\/span>\n  <span class=\"UIPager_ButtonWrapper\" bindPoint=\"forwardWrapper\">\n    <a class=\"UIPager_Button UIPager_ButtonForward\" bindPoint=\"forwardRoot\" href=\"#\"><\/a>\n  <\/span>\n<\/span>\n"}, Arbiter.BEHAVIOR_PERSISTENT);
function UIPager(_L0,_L1,_L2,_L3){copy_properties(this,{_rm:new RenderManager(this),_callback:_L3||bagofholding,_backHandler:null,_forwardHandler:null,_maxPerPage:_L1,_total:_L0,_offset:_L2,_isDisabled:false,root:null,backRoot:null,forwardRoot:null,pageNumber:null,backWrapper:null,fowardWrapper:null});this.parent.construct(this,URI('/templates/UIPager.tmpl'));this._summaryTextHandler=this._getSummaryText;this._rm.dirty();this._setupHandlers();return this;}UIPager.extend('TemplateObject');UIPager.prototype._setupHandlers=function(){this._backHandler=Event.listen(this.backRoot,'click',this._handleClick.bind(this,'back'));this._forwardHandler=Event.listen(this.forwardRoot,'click',this._handleClick.bind(this,'forward'));};UIPager.prototype._handleClick=function(_L0){var _L1;var dir;if(_L0=='forward'){_L1=this.forwardWrapper;dir=1;}else{_L1=this.backWrapper;dir=-1;}if(!CSS.hasClass(_L1,'UIPager_ButtonDisabled')){this._offset=this._offset+(dir*this._maxPerPage);this._callback(this._offset,dir);this._rm.dirty();}return false;};UIPager.prototype._getSummaryText=function(_L0,_L1,_L2){if(_L1==0)return '';if(_L1<=_L2){if(_L1==1){return _tx("1 result");}else return _tx("{number_of_results} results",{number_of_results:_L1});}else{if(_L0+_L2<_L1){var _L3=((_L0/_L2+1)*_L2);}else var _L3=_L1;if(_L1>500){var _L4=_tx("{starting_offset}-{ending_offset} of over {number_of_results} results",{starting_offset:(_L0+1),ending_offset:_L3,number_of_results:500});}else var _L4=_tx("{starting_offset}-{ending_offset} of {number_of_results} results",{starting_offset:(_L0+1),ending_offset:_L3,number_of_results:_L1});return _L4;}};UIPager.prototype.setCallback=function(_L0){this._callback=_L0;return this;};UIPager.prototype.setMaxPerPage=function(_L0){this._maxPerPage=Math.max(_L0,0);this._rm.dirty();return this;};UIPager.prototype.setTotal=function(_L0){this._total=Math.max(_L0,0);this._rm.dirty();return this;};UIPager.prototype.setOffset=function(_L0){this._offset=Math.max(_L0,0);this._rm.dirty();return this;};UIPager.prototype.setPage=function(_L0){this._offset=Math.max(_L0-1,0)*this._maxPerPage;this._rm.dirty();return this;};UIPager.prototype.setDisabled=function(_L0){this._isDisabled=_L0;this._rm.dirty();return this;};UIPager.prototype._getCurrentPage=function(){return this._offset/this._maxPerPage+1;};UIPager.prototype._getPageCount=function(){return Math.ceil(this._total/this._maxPerPage);};UIPager.prototype.setSummaryTextHandler=function(fn){this._summaryTextHandler=fn;this._rm.dirty();return this;};UIPager.prototype._setDisabled=function(_L0,_L1){var _L2;if(_L0=="back"){_L2=this.backWrapper;}else if(_L0=="forward")_L2=this.forwardWrapper;CSS.conditionClass(_L2,'UIPager_ButtonDisabled',_L1);return this;};UIPager.prototype.paint=function(){if(this._offset==0||this._isDisabled){this._setDisabled("back",true);}else this._setDisabled("back",false);if((this._offset+this._maxPerPage)>=this._total||this._isDisabled){this._setDisabled("forward",true);}else this._setDisabled("forward",false);var _L0=this._summaryTextHandler(this._offset,this._total,this._maxPerPage);if(_L0){DOM.setContent(this.pageNumber,_L0);}else hide(this.pageNumber);};UIPager.prototype.resetPager=function(_L0,_L1,_L2,_L3){this.setOffset(_L2);this.setTotal(_L0);this.setMaxPerPage(_L1);if(_L3)this._callback=_L3;this._rm.dirty();};UIPager.prototype.getRoot=function(){return this.root;};UIPager.prototype.setHidden=function(_L0){CSS.conditionClass(this.root,'hidden_elem',_L0);return this;};UIPager.prototype.getHidden=function(){return CSS.hasClass(this.root,'hidden_elem');};

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