/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 9th 2010 7:35:12 PM PST                             */
/*      Machine:  10.16.140.104                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/1gnr7bble38gk00w.pkg.js h:7sekomm1                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/1gnr7bble38gk00w.pkg.js                                   */

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

function object(o){var F=new Function();F.prototype=o;return new F();}function is_scalar(v){switch(typeof(v)){case 'string':case 'number':case 'null':case 'boolean':return true;}return false;}function keys(obj){if(hasArrayNature(obj))throw new TypeError('keys() was passed an array.');var _L1=[];for(var i in obj)_L1.push(i);return _L1;}function values(obj){if(hasArrayNature(obj))throw new TypeError('values() was passed an array; use to_array().');var _L1=[];for(var i in obj)_L1.push(obj[i]);return _L1;}function count(obj){if(hasArrayNature(obj))throw new TypeError('count() was passed an array.');var _L1=0;for(var i in obj)_L1++;return _L1;}function are_equal(a,b){return JSON.encode(a)==JSON.encode(b);}function merge(){var ret={};for(var i=0;i<arguments.length;i++)copy_properties(ret,arguments[i]);return ret;}function obj_filter_keys(obj,_L1){var ret={};for(var ii=0;ii<_L1.length;ii++){var key=_L1[ii];if(key in obj)ret[key]=obj[key];}return ret;}function obj_intersect_keys(){var ret={};var _L1=arguments[0];oloop:for(var j in _L1){if(!_L1.hasOwnProperty(j))continue;iloop:for(var ii=1;ii<arguments.length;ii++){var obj=arguments[ii];for(var k in obj)if(k===j){if(arguments.length-1===ii)ret[j]=_L1[j];continue iloop;}continue oloop;};};return ret;}function head(obj){for(var i in obj)return obj[i];return null;}Object.from=function(_L0,_L1){if(!hasArrayNature(_L0))throw new TypeError('Must pass an array of keys.');var _L2={};var _L3=hasArrayNature(_L1);if(typeof _L1=='undefined')_L1=true;for(var i=_L0.length;i--;)_L2[_L0[i]]=_L3?_L1[i]:_L1;return _L2;};function coalesce(){for(var i=0;i<arguments.length;++i)if(arguments[i]!=null)return arguments[i];return null;}
function to_array(obj){var ret=[];for(var i=0,l=obj.length;i<l;++i)ret.push(obj[i]);return ret;}var $A=to_array;Array.prototype.alloc=function(_L0){return _L0?new Array(_L0):[];};Array.prototype.map=function(_L0,_L1){if(this==window)throw new TypeError();if(typeof(_L0)!=="function")throw new TypeError();var ii;var len=this.length;var r=this.alloc(len);for(ii=0;ii<len;++ii)if(ii in this)r[ii]=_L0.call(_L1,this[ii],ii,this);return r;};Array.prototype.forEach=function(_L0,_L1){this.map(_L0,_L1);return this;};Array.prototype.each=function(_L0,_L1){return this.forEach.apply(this,arguments);};Array.prototype.filter=function(_L0,_L1){_L0=_L0||identity;if(this==window)throw new TypeError();if(typeof(_L0)!=="function")throw new TypeError();var ii,val,len=this.length,r=this.alloc();for(ii=0;ii<len;++ii)if(ii in this){val=this[ii];if(_L0.call(_L1,val,ii,this))r.push(val);}return r;};Array.prototype.every=function(_L0,_L1){return (this.filter(_L0,_L1).length==this.length);};Array.prototype.some=function(_L0,_L1){return (this.filter(_L0,_L1).length>0);};Array.prototype.pull=function(_L0){if(this==window)throw new TypeError();if(typeof(_L0)=='string'){var _L1=_L0;_L0=function(){return this[_L1];};}if(typeof(_L0)!=='function')throw new TypeError();var _L2=Array.prototype.slice.call(arguments,1);var len=this.length;var r=this.alloc(len);for(ii=0;ii<len;++ii)if(ii in this)r[ii]=_L0.apply(this[ii],_L2);return r;};Array.prototype.pullEach=function(_L0){this.pull.apply(this,arguments);return this;};Array.prototype.filterEach=function(_L0){var map=this.pull.apply(this,arguments);var len=this.length;var r=this.alloc();for(var ii=0;ii<len;++ii)if(ii in this)r.push(this[ii]);return r;};Array.prototype.reduce=null;Array.prototype.reduceRight=null;Array.prototype.sort=(function(_L0){return function(_L1){return (this==window)?null:(_L1?_L0.call(this,function(a,b){return _L1(a,b);}):_L0.call(this));};})(Array.prototype.sort);Array.prototype.reverse=(function(_L0){return function(){return (this==window)?null:_L0.call(this);};})(Array.prototype.reverse);Array.prototype.concat=(function(_L0){return function(){return (this==window)?null:_L0.apply(this,arguments);};})(Array.prototype.concat);Array.prototype.slice=(function(_L0){return function(){return (this==window)?null:_L0.apply(this,arguments);};})(Array.prototype.slice);Array.prototype.clone=Array.prototype.slice;if(Array.prototype.indexOf){Array.prototype.indexOf=(function(_L0){return function(val,_L2){return (this==window)?null:_L0.apply(this,arguments);};})(Array.prototype.indexOf);}else Array.prototype.indexOf=function(val,_L1){if(this==window)throw new TypeError();var len=this.length;var _L3=Number(_L1)||0;_L3=(_L3<0)?Math.ceil(_L3):Math.floor(_L3);if(_L3<0)_L3+=len;for(;_L3<len;_L3++)if(_L3 in this&&this[_L3]===val)return _L3;return -1;};Array.prototype.contains=function(val){return this.indexOf(val)!=-1;};Array.prototype.remove=function(val){var _L1=this.indexOf(val);if(_L1!=-1)this.splice(_L1,1);};function mapToInt(_L0){return _L0.map(function(val,i){return parseInt(val,10);});}function unique(_L0){var obj={};var res=[];for(var i=0;i<_L0.length;i++){var val=_L0[i];if(!obj[val])res.push(val);obj[val]=1;}return res;}function array_set_add(_L0,_L1){if(!_L0.contains(_L1))_L0.push(_L1);return _L0;}function array_intersect(a1,a2){var ret=[];for(var i=0;i<a1.length;i++)if(a2.contains(a1[i]))ret.push(a1[i]);return ret;}
function env_get(k){return typeof(window['Env'])!='undefined'&&Env[k];}function muffinize(str){var _L1='a';var _L2='d';var _L3=[_L1,_L2].join('');return str.replace(/muffin/g,_L3);}var Util=window.Util||{isDevelopmentEnvironment:function(){return env_get('dev');},warn:bagofholding,error:bagofholding,info:bagofholding,group:bagofholding,groupEnd:bagofholding,log:bagofholding,stack:bagofholding,trace:bagofholding};
window.aiert=(function(a){var _L1=function _aiert(m){if(window.last_alert){(window.alerts=window.alerts||[]).push((new Date()).getTime()-window.last_alert);window.alerts.splice(0,window.alerts.length-3);if(window.alerts.length==3&&window.alerts[0]+window.alerts[1]+window.alerts[2]<200){if(!confirm(m+'\n\nThis page may be caught in an infinite loop. Press "Cancel" to abort, or "Ok" to continue.'))window.aiert=bagofholding;window.last_alert=(new Date()).getTime();return;}}a(m);window.last_alert=(new Date()).getTime();};return _L1;})(window.alert);window.alert=function _alert(m){if(m!==undefined){(new Image()).src='/ajax/typeahead_callback.php?l='+escapeURI(document.location)+'&m='+escapeURI(m)+(typeof Env!='undefined'?'&t='+Math.round(((new Date()).getTime()-Env.start)/100):'')+'&d='+escapeURI((typeof fbpd!='undefined')?JSON.encode(fbpd):'')+'&ai='+escapeURI(window.aiert)+'&al='+escapeURI(window.alert);return window.aiert(m);}};
window.onloadRegister=function(_L0){window.loaded?_runHook(_L0):_addHook('onloadhooks',_L0);};function onafterloadRegister(_L0){window.afterloaded?setTimeout(function(){_runHook(_L0);},0):_addHook('onafterloadhooks',_L0);}function _onloadHook(){_runHooks('onloadhooks');!window.loaded&&window.CavalryLogger&&CavalryLogger.getInstance().setTimeStamp('t_hooks');window.loaded=true;if(window.logOnloadData)aggregate_js_onload('onloadRegister');}function _onafterloadHook(){_runHooks('onafterloadhooks');window.afterloaded=true;if(window.logOnloadData)aggregate_js_onload('onafterloadRegister');}function _runHook(_L0){try{_L0();}catch(ex){Util.error('Uncaught exception in hook (run after page load): %x',ex);}}function _runHooks(_L0){var _L1=_L0=='onbeforeleavehooks'||_L0=='onbeforeunloadhooks';var _L2=null;if(window.logOnloadData){var _L3=new Date().getTime();window.totalHookTime=window.totalHookTime||{};}do{var h=window[_L0];if(!_L1)window[_L0]=null;if(!h)break;for(var ii=0;ii<h.length;ii++)try{if(_L1){_L2=_L2||h[ii]();}else h[ii]();}catch(ex){Util.error('Uncaught exception in hook (%q) %q: %x',_L0,h[ii],ex);}if(_L1)break;}while(window[_L0]);if(window.logOnloadData){var _L6=new Date().getTime();window.totalHookTime[_L0]=_L6-_L3;}if(_L1&&_L2)return _L2;}function keep_window_set_as_loaded(){if(window.loaded==false){window.loaded=true;_runHooks('onloadhooks');}if(window.afterloaded==false){window.afterloaded=true;_runHooks('onafterloadhooks');}}function log_js_onload(_L0,_L1,_L2){window.logOnloadData=window.logOnloadData||{};window.logOnloadData[_L0]=window.logOnloadData[_L0]||{};var _L3=window.logOnloadData[_L0];if(_L3[_L2]){_L3[_L2].count++;_L3[_L2].total_time+=_L1;}else{_L3[_L2]={};_L3[_L2]={count:1,total_time:_L1};}}function aggregate_js_onload(_L0){var _L1=window.logOnloadData[_L0];var _L2=[];var _L3=0;for(var _L4 in _L1){_L3+=_L1[_L4].total_time;_L2.push(sprintf("%' 4.4d",_L1[_L4].total_time)+'ms : '+sprintf("%' 2.2d",_L1[_L4].count)+' calls : '+_L4.replace('Task_','(Task) '));}if(!_L2.length)return;_L2.sort().reverse();var key;if(_L0=='onloadRegister'){key='onloadhooks';}else key='onafterloadhooks';Util.group(_L0+' took a total of '+_L3+' ms with '+window.totalHookTime[key]+' ms spent in _runHooks');_L2.each(function(_L6){Util.info(_L6);});Util.groupEnd(_L0);window.logOnloadData[_L0]={};}Arbiter.registerCallback(_onloadHook,[Arbiter.ONLOAD_DOMCONTENT,InitialJSLoader.INITIAL_JS_READY]);Arbiter.registerCallback(_onafterloadHook,[Arbiter.ONLOAD_DOMCONTENT,OnloadEvent.ONLOAD_CALLBACK,InitialJSLoader.INITIAL_JS_READY]);Arbiter.subscribe(OnloadEvent.ONBEFOREUNLOAD,function(_L0,e){e.warn=_runHooks('onbeforeleavehooks')||_runHooks('onbeforeunloadhooks');if(!e.warn){window.loaded=false;window.afterloaded=false;}},Arbiter.SUBSCRIBE_NEW);Arbiter.subscribe(OnloadEvent.ONUNLOAD,function(_L0,e){_runHooks('onleavehooks');_runHooks('onunloadhooks');},Arbiter.SUBSCRIBE_NEW);
function chain(u,v){var fn,_L3=[];for(var ii=0;ii<arguments.length;ii++)_L3.push(arguments[ii]);fn=function(_L5){_L5=_L5||window.event;for(var ii=0;ii<_L3.length;ii++)if(_L3[ii]&&_L3[ii].apply(this,arguments)===false){return false;}else if(_L5&&_L5.cancelBubble)return true;return true;};fn.toString=function(){return chain._toString(_L3);};return fn;}if(!chain._toString)chain._toString=function(_L0){var ret='chained fns',_L2=_L0.filter();for(var i=0;i<_L0.length;i++)ret+='\n'+_L0[i].toString();return ret;};
0;
function ads_fetch_admarket_ad(_L0,_L1,_L2,_L3,_L4){var _L5={'page':_L0,'location':_L1,'adnetwork_id':_L2};var r=new AsyncRequest().setURI(muffinize('/muffins/ajax/fetch_admarket_muffin.php')).setData(_L5).setHandler(_L3).setErrorHandler(_L4).send();}
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'];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)elem.parentNode.innerHTML=_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();}}
DataStore=window.DataStore||{_storage:{},_elements:{},_tokenCounter:1,_NOT_IN_DOM_CONST:1,_getStorage:function(_L0){var _L1;if(typeof _L0=='string'){_L1='str_'+_L0;}else{_L1='elem_'+(_L0.__FB_TOKEN||(_L0.__FB_TOKEN=[DataStore._tokenCounter++]))[0];DataStore._elements[_L1]=_L0;}return DataStore._storage[_L1]||(DataStore._storage[_L1]={});},_shouldDeleteData:function(_L0){if(!_L0.nodeName)return false;try{if(null!=_L0.offsetParent)return false;}catch(ex){}if(document.documentElement.contains){return !document.documentElement.contains(_L0);}else return (document.documentElement.compareDocumentPosition(_L0)&DataStore._NOT_IN_DOM_CONST);},set:function(_L0,key,_L2){var _L3=DataStore._getStorage(_L0);_L3[key]=_L2;return _L0;},get:function(_L0,key,_L2){var _L3=DataStore._getStorage(_L0);var _L4=_L3[key];if((undefined===_L4)&&(typeof _L0.getAttribute=='function')){var _L5=_L0.getAttribute('data-'+key);_L4=(null===_L5)?undefined:_L5;}if((_L2!==undefined)&&(_L4===undefined))_L4=_L3[key]=_L2;return _L4;},remove:function(_L0,key){var _L2=DataStore._getStorage(_L0);delete _L2[key];return _L0;},cleanup:function(){var _L0,_L1;for(_L0 in DataStore._elements){_L1=DataStore._elements[_L0];if(DataStore._shouldDeleteData(_L1)){delete DataStore._storage[_L0];delete DataStore._elements[_L0];}}}};
window.Event=window.Event||function(){};Event.prototype=Event.prototype||{};Event.DATASTORE_KEY='Event.listeners';function $E(e){e=e||window.event||{};if(!e._inherits_from_prototype)for(var k in Event.prototype)try{e[k]=Event.prototype[k];}catch(ignored){}return e;}(function(){copy_properties(Event.prototype,{_inherits_from_prototype:true,stop:function(){this.cancelBubble=true;this.stopPropagation&&this.stopPropagation();return this;},prevent:function(){this.returnValue=false;this.preventDefault&&this.preventDefault();return this;},kill:function(){this.stop().prevent();return false;},getTarget:function(){var _L6=this.target||this.srcElement;return _L6?$(_L6):null;},getRelatedTarget:function(){var _L6=this.relatedTarget||this.fromElement;return _L6?$(_L6):null;},getModifiers:function(){var m={control:!!this.ctrlKey,shift:!!this.shiftKey,alt:!!this.altKey,meta:!!this.metaKey};m.access=ua.osx()?m.control:m.alt;m.any=m.control||m.shift||m.alt||m.meta;return m;}});copy_properties(Event,{listen:function(_L6,_L7,_L8,_L9){if(typeof _L6=='string')_L6=$(_L6,true);if(typeof _L9=='undefined')_L9=Event.Priority.NORMAL;if(typeof _L7=='object'){var _La={};for(var t in _L7)_La[t]=Event.listen(_L6,t,_L7[t],_L9);return _La;}if(_L7.match(/^on/i))throw new TypeError("Bad event name `"+event+"': use `click', not `onclick'.");_L7=_L7.toLowerCase();var _Lc=DataStore.get(_L6,key,{});if(_L3[_L7]){var _Ld=_L3[_L7];_L7=_Ld.base;_L8=_Ld.wrap(_L8);}_L4(_L6,_L7);var _Le=_Lc[_L7];if(!(_L9 in _Le))_Le[_L9]=[];var id=_Le[_L9].length,ref=new EventHandlerRef(_L8,_Le[_L9],id);_Le[_L9].push(ref);return ref;},stop:function(e){return $E(e).stop();},prevent:function(e){return $E(e).prevent();},kill:function(e){return $E(e).kill();},getKeyCode:function(_L6){_L6=$E(_L6);if(!_L6)return false;switch(_L6.keyCode){case 63232:return 38;case 63233:return 40;case 63234:return 37;case 63235:return 39;case 63272:case 63273:case 63275:return null;case 63276:return 33;case 63277:return 34;}if(_L6.shiftKey)switch(_L6.keyCode){case 33:case 34:case 37:case 38:case 39:case 40:return null;}return _L6.keyCode;},getPriorities:function(){if(!_L0){var _L6=values(Event.Priority);_L6.sort(function(a,b){return a-b;});_L0=_L6;}return _L0;}});var _L0=null,key=Event.DATASTORE_KEY;var _L2=function(_L6){return function(e){if(!DOM.contains(this,e.getRelatedTarget()))return _L6.call(this,e);};};var _L3={'mouseenter':{base:'mouseover',wrap:_L2},'mouseleave':{base:'mouseout',wrap:_L2}};var _L4=function(_L6,_L7){var _L8='on'+_L7,_L9=DataStore.get(_L6,key);if(_L7 in _L9){if(_L6[_L8]!==_L5)throw new Error("`"+_L8+"' listen handler gone!");return;}_L9[_L7]={};var _La=_L6[_L8];_L6[_L8]=_L5;if(_La)Event.listen(_L6,_L7,_La,Event.Priority.TRADITIONAL);};var _L5=function(_L6){_L6=$E(_L6);var _L7=_L6.type;if(!DataStore.get(this,key))throw new Error("Bad listenHandler context.");var _L8=DataStore.get(this,key)[_L7];if(!_L8)throw new Error("No registered handlers for `"+_L7+"'.");var _L0=Event.getPriorities();for(var _L9=0;_L9<_L0.length;_L9++){var _La=_L0[_L9];if(_La in _L8){var _Lb=_L8[_La];for(var idx=0;idx<_Lb.length;idx++){if(!_Lb[idx])continue;var _Ld=_Lb[idx].fire(this,_L6);if(_Ld===false){return _L6.kill();}else if(_L6.returnValue===false){return false;}else if(_L6.cancelBubble)return _L6.stop();}}}};})();NodeAugment.add({listen:Event.listen});Event.Priority={URGENT:-20,TRADITIONAL:-10,NORMAL:0};function EventHandlerRef(_L0,_L1,_L2){this._handler=_L0;this._container=_L1;this._index=_L2;}EventHandlerRef.prototype={remove:function(){delete this._handler;delete this._container[this._index];},fire:function(_L0,_L1){return this._handler.call(_L0,_L1);}};function addEventBase(obj,_L1,fn,_L3){if(obj.addEventListener){obj.addEventListener(_L1,fn,false);}else if(obj.attachEvent){var _L4=_L1+fn+_L3;obj["e"+_L4]=fn;obj[_L4]=function(){obj["e"+_L4](window.event);};obj.attachEvent("on"+_L1,obj[_L4]);}return fn;}function removeEventBase(obj,_L1,fn,_L3){if(obj.removeEventListener){obj.removeEventListener(_L1,fn,false);}else if(obj.detachEvent){var _L4=_L1+fn+_L3;if(obj[_L4]){obj.detachEvent("on"+_L1,obj[_L4]);obj[_L4]=null;obj["e"+_L4]=null;}}}
var LinkController=(function(){var key='LinkControllerHandler';var _L1={ALL:1,TARGETS:2,MODIFIERS:4,BUTTONS:8};var _L2=[[],[]];var _L3=function(_L9){var _La=_L9.match(/^(\w+):/);return !_La||_La[1].match(/^http/i);};var _L4=function(_L9,_La,_Lb){if(_L9&_L1.ALL)return true;if((!(_L9&_L1.TARGETS)&&_La.target)||(!(_L9&_L1.MODIFIERS)&&_Lb.getModifiers().any)||(!(_L9&_L1.BUTTONS)&&ua.safari()>=525&&_Lb.which!=1))return false;return true;};var _L5=function(_L9,_La){var h=_L2[0].concat(_L2[1]);for(var i=0,l=h.length;i<l;i++)if(_L4(h[i].filters,_L9,_La)&&h[i].callback(_L9,_La)===false)return _La.kill();};var _L6=function(_L9){var _La=DOM.getNearest(_L9.getTarget(),'a');var _Lb=_La&&_La.getAttribute('href',2);if(!_Lb||_La.rel||(_Lb.charAt(_Lb.length-1)=='#')||!_L3(_Lb)||DataStore.get(_La,key))return;DataStore.set(_La,key,Event.listen(_La,'click',function(_L9){_L5(_La,_L9);}));};var _L7=function(){_L7=bagofholding;onloadRegister(function(){Event.listen(document.documentElement,'mousedown',_L6);});};var _L8=function(_L9,_La,_Lb,_Lc){_L7();_L9[_Lc?'unshift':'push']({callback:_La,filters:_Lb||0});};_L1.registerHandler=function(_L9,_La,_Lb){_L8(_L2[0],_L9,_La,_Lb);};_L1.registerFallbackHandler=function(_L9,_La,_Lb){_L8(_L2[1],_L9,_La,_Lb);};return _L1;})();
function AsyncSignal(uri,_L1){this.data=_L1||{};this.uri=uri;this.handler=null;}AsyncSignal.prototype.setHandler=function(h){this.handler=h;return this;};AsyncSignal.prototype.send=function(){var h=this.handler,d=this.data,u=this.uri,s=[],i=new Image(),a=document.getElementById('post_form_id');d.asyncSignal=Math.floor(Math.random()*10000)+1;if(a)d.post_form_id=a.value;for(var k in d)s.push(encodeURIComponent(k)+'='+encodeURIComponent(d[k]));if(u.indexOf('?')==-1)u+='?';u+=s.join('&');if(h)i.onload=i.onerror=(function(i,h){return function(){h((i.height==1));};})(i,h);i.src=u;return this;};
function gen_unique(){return ++gen_unique._counter;}gen_unique._counter=0;function create_hidden_input(_L0,_L1){return $N('input',{name:_L0,id:_L0,value:_L1,type:'hidden'});}function getTableRowShownDisplayProperty(){if(ua.ie()<8){return 'inline';}else return 'table-row';}function showTableRow(){for(var i=0;i<arguments.length;i++){var _L1=ge(arguments[i]);if(_L1&&_L1.style)_L1.style.display=getTableRowShownDisplayProperty();}return false;}function getParentRow(el){el=ge(el);while(el.tagName&&el.tagName!="TR")el=el.parentNode;return el;}function abTest(_L0,_L1){AsyncRequest.pingURI('/ajax/abtest.php',{data:_L0,"post_form_id":null},true);return !_L1;}function ac(_L0){new AsyncSignal('/ajax/ac.php',{'meta':_L0}).send();return true;}function scribe_log(_L0,_L1){AsyncRequest.pingURI('/ajax/scribe_log.php',{'category':_L0,'message':_L1,'post_form_id':null},true);}function textLimit(ta,_L1){var _L2=ge(ta);if(_L2.value.length>_L1){_L2.value=_L2.value.substring(0,_L1);if(arguments.length>2)$(arguments[2]).style.display='block';}}function textLimitStrict(_L0,_L1,_L2,_L3,_L4){var _L5=ge(_L0);if(_L5){var len=_L5.value.length;var _L7=len-_L1;if(_L7>0){if(_L7>25000){_L5.value=_L5.value.substring(0,_L1+25000);_L7=25000;}$(_L2).style.display='block';$(_L3).innerHTML=_L7;$(_L4).disabled=true;}else if(len==0){$(_L2).style.display='none';$(_L4).disabled=true;$(_L3).innerHTML=1;}else if($(_L3).innerHTML!=0){$(_L3).innerHTML=0;$(_L2).style.display='none';$(_L4).disabled=false;}}}function city_selector_onfound(_L0,obj){_L0.value=obj?obj.i:-1;}function city_selector_onselect(_L0){if(window[_L0])window[_L0]();}onloadRegister(function(){var _L0=[38,38,40,40,37,39,37,39,66,65,13],ii=0;function fn(evt){var kk=evt?evt.keyCode:event.keyCode;if(ii==-1){return;}else if(_L0[ii]==kk){++ii;if(ii==_L0.length){new AsyncRequest('/ajax/lensflare.php').setReadOnly(true).setMethod('GET').send();ii=-1;}}else if(ii)ii=0;}addEventBase(document,'keydown',fn);});
String.prototype.trim=function(){if(this==window)return null;return this.replace(/^\s*|\s*$/g,'');};function trim(_L0){try{return String(_L0.toString()).trim();}catch(ignored){return '';}}String.prototype.startsWith=function(_L0){if(this==window)return null;return this.substring(0,_L0.length)==_L0;};String.prototype.endsWith=function(_L0){if(this==window)return null;return this.length>=_L0.length&&this.substring(this.length-_L0.length)==_L0;};String.prototype.split=(function(_L0){return function(_L1,_L2){var _L3="";if(_L1===null||_L2===null){return [];}else if(typeof _L1=='string'){return _L0.call(this,_L1,_L2);}else if(_L1===undefined){return [this.toString()];}else if(_L1 instanceof RegExp){if(!_L1._2||!_L1._1){_L3=_L1.toString().replace(/^[\S\s]+\//,"");if(!_L1._1)if(!_L1.global){_L1._1=new RegExp(_L1.source,"g"+_L3);}else _L1._1=1;}separator1=_L1._1===1?_L1:_L1._1;var _L4=(_L1._2?_L1._2:_L1._2=new RegExp("^"+separator1.source+"$",_L3));if(_L2===undefined||_L2<0){_L2=false;}else{_L2=Math.floor(_L2);if(!_L2)return [];}var _L5,_L6=[],_L7=0,i=0;while((_L2?i++<=_L2:true)&&(_L5=separator1.exec(this))){if((_L5[0].length===0)&&(separator1.lastIndex>_L5.index))separator1.lastIndex--;if(separator1.lastIndex>_L7){if(_L5.length>1)_L5[0].replace(_L4,function(){for(var j=1;j<arguments.length-2;j++)if(arguments[j]===undefined)_L5[j]=undefined;});_L6=_L6.concat(this.substring(_L7,_L5.index),(_L5.index===this.length?[]:_L5.slice(1)));_L7=separator1.lastIndex;}if(_L5[0].length===0)separator1.lastIndex++;}return (_L7===this.length)?(separator1.test("")?_L6:_L6.concat("")):(_L2?_L6:_L6.concat(this.substring(_L7)));}else return _L0.call(this,_L1,_L2);};})(String.prototype.split);
window.CSS.setClass=function(_L0,_L1){$(_L0,true).className=_L1||'';return _L0;};window.CSS.toggleClass=function(_L0,_L1){return CSS.hasClass(_L0,_L1)?CSS.removeClass(_L0,_L1):CSS.addClass(_L0,_L1);};window.CSS.conditionClass=function(_L0,_L1,_L2){return (_L2?CSS.addClass:CSS.removeClass)(_L0,_L1);};window.CSS.chooseClass=function(_L0,_L1,_L2,_L3){CSS.conditionClass(_L0,_L2,_L1);CSS.conditionClass(_L0,_L3,!_L1);};window.CSS.setStyle=function(_L0,_L1,_L2){_L0.style[_L1]=_L2;return _L0;};window.CSS.getStyle=function(_L0,_L1){_L0=$(_L0);function _L2(_L1){return _L1.replace(/[A-Z]/g,function(_L4){return '-'+_L4.toLowerCase();});}if(window.getComputedStyle)return window.getComputedStyle(_L0,null).getPropertyValue(_L2(_L1));if(document.defaultView&&document.defaultView.getComputedStyle){var _L3=document.defaultView.getComputedStyle(_L0,null);if(_L3)return _L3.getPropertyValue(_L2(_L1));if(_L1=="display")return "none";Util.error("Can't retrieve requested style %q due to a bug in Safari",_L1);}if(_L0.currentStyle)return _L0.currentStyle[_L1];return _L0.style[_L1];};window.CSS.setOpacity=function(_L0,_L1){_L0=$(_L0);var _L2=(_L1==1);try{_L0.style.opacity=(_L2?'':''+_L1);}catch(ignored){}try{_L0.style.filter=(_L2?'':'alpha(opacity='+(_L1*100)+')');}catch(ignored){}};window.CSS.getOpacity=function(_L0){_L0=$(_L0);var _L1=CSS.getStyle(_L0,'filter');var val=null;if(_L1&&(val=/(\d+(?:\.\d+)?)/.exec(_L1))){return parseFloat(val.pop())/100;}else if(_L1=CSS.getStyle(_L0,'opacity')){return parseFloat(_L1);}else return 1;};window.CSS.Cursor={kGrabbable:'grabbable',kGrabbing:'grabbing',kEditable:'editable',set:function(_L0,_L1){_L0=$(_L0);_L0=_L0||document.body;switch(_L1){case CSS.Cursor.kEditable:_L1='text';break;case CSS.Cursor.kGrabbable:if(ua.firefox()){_L1='-moz-grab';}else _L1='move';break;case CSS.Cursor.kGrabbing:if(ua.firefox()){_L1='-moz-grabbing';}else _L1='move';break;}_L0.style.cursor=_L1;}};NodeAugment.add(window.CSS);
function List(_L0){if(arguments.length>1){for(var ii=0;ii<arguments.length;ii++)this.push(arguments[ii]);}else this.resize(_L0||0);}List.prototype.length=0;List.prototype.size=function(){return this.length;};List.prototype.resize=function(_L0){this.length=_L0;return this;};List.prototype.alloc=function(n){return new List(n);};List.prototype.toString=function(){return '['+this.join(', ')+']';};List.prototype.push=Array.prototype.push;List.prototype.pop=Array.prototype.pop;List.prototype.join=Array.prototype.join;List.prototype.map=Array.prototype.map;List.prototype.forEach=Array.prototype.forEach;List.prototype.each=Array.prototype.each;List.prototype.filter=Array.prototype.filter;List.prototype.every=Array.prototype.every;List.prototype.some=Array.prototype.some;List.prototype.pull=Array.prototype.pull;List.prototype.pullEach=Array.prototype.pullEach;List.prototype.pullFilter=Array.prototype.pullFilter;List.prototype.splice=Array.prototype.splice;
function HTML(_L0){if(this===window){if(_L0 instanceof HTML)return _L0;return new HTML(_L0);}this._content=_L0;this._defer=false;this._extra_action='';this._nodes=null;this._inline_js=bagofholding;this._has_option_elements=false;return this;}copy_properties(HTML.prototype,{toString:function(){var str=this._content;if(this._extra_action)str+='<script type="text/javascript">'+this._extra_action+'</scr'+'ipt>';return str;},setAction:function(js){this._extra_action=js;return this;},getAction:function(){this._fillCache();var fn=function(){this._inline_js();eval_global(this._extra_action);}.bind(this);if(this.getDeferred()){return fn.defer.bind(fn);}else return fn;},setDeferred:function(_L0){this._defer=!!_L0;return this;},getDeferred:function(){return this._defer;},getContent:function(){return this._content;},getNodes:function(){this._fillCache();return this._nodes;},getRootNode:function(){return this.getNodes()[0];},hasOptionElements:function(){this._fillCache();return this._has_option_elements;},_fillCache:function(){if(null!==this._nodes)return;var _L0=this._content;if(!_L0){this._nodes=[];return;}_L0=_L0.replace(/(<(\w+)[^>]*?)\/>/g,function(all,_Lc,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:_Lc+'></'+tag+'>';});var _L1=_L0.trim().toLowerCase(),_L2=document.createElement('div'),_L3=false;var _L4=(!_L1.indexOf('<opt')&&[1,'<select multiple="multiple" class="__WRAPPER">','</select>'])||(!_L1.indexOf('<leg')&&[1,'<fieldset class="__WRAPPER">','</fieldset>'])||(_L1.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,'<table class="__WRAPPER">','</table>'])||(!_L1.indexOf('<tr')&&[2,'<table><tbody class="__WRAPPER">','</tbody></table>'])||((!_L1.indexOf('<td')||!_L1.indexOf('<th'))&&[3,'<table><tbody><tr class="__WRAPPER">','</tr></tbody></table>'])||(!_L1.indexOf('<col')&&[2,'<table><tbody></tbody><colgroup class="__WRAPPER">','</colgroup></table>'])||null;if(null===_L4){_L2.className='__WRAPPER';if(ua.ie()){_L4=[0,'<span style="display:none">&nbsp;</span>',''];_L3=true;}else _L4=[0,'',''];}_L2.innerHTML=_L4[1]+_L0+_L4[2];while(_L4[0]--)_L2=_L2.lastChild;if(_L3)_L2.removeChild(_L2.firstChild);if(_L2.className!='__WRAPPER')Util.warn('HTML._fillCache: HTML markup is not well formed.');if(0!=_L2.getElementsByTagName('option').length)this._has_option_elements=true;if(ua.ie()){var _L5;if(!_L1.indexOf('<table')&&-1==_L1.indexOf('<tbody')){_L5=_L2.firstChild&&_L2.firstChild.childNodes;}else if(_L4[1]=='<table>'&&-1==_L1.indexOf('<tbody')){_L5=_L2.childNodes;}else _L5=[];for(var ii=_L5.length-1;ii>=0;--ii)if(_L5[ii].nodeName&&_L5[ii].nodeName.toLowerCase()=='tbody'&&_L5[ii].childNodes.length==0)_L5[ii].parentNode.removeChild(_L5[ii]);}var _L7=_L2.getElementsByTagName('script');var _L8=[];for(var i=0;i<_L7.length;i++)if(_L7[i].src){_L8.push(Bootloader.requestResource.bind(Bootloader,'js',_L7[i].src));}else _L8.push(eval_global.bind(null,_L7[i].innerHTML));for(var i=_L7.length-1;i>=0;i--)_L7[i].parentNode.removeChild(_L7[i]);var _La=function(){for(var ii=0;ii<_L8.length;ii++)_L8[ii]();};this._nodes=to_array(_L2.childNodes);this._inline_js=_La;}});
function Vector2(x,y,_L2){copy_properties(this,{x:parseFloat(x),y:parseFloat(y),domain:_L2||'pure'});}copy_properties(Vector2.prototype,{toString:function(){return '('+this.x+', '+this.y+')';},add:function(vx,vy){if(arguments.length==1){if(vx.domain!='pure')vx=vx.convertTo(this.domain);return this.add(vx.x,vx.y);}var dx=parseFloat(vx);var dy=parseFloat(vy);return new Vector2(this.x+dx,this.y+dy,this.domain);},mul:function(sx,sy){if(typeof(sy)=="undefined")sy=sx;return new Vector2(this.x*sx,this.y*sy,this.domain);},sub:function(vx,vy){if(arguments.length==1){return this.add(vx.mul(-1));}else return this.add(-vx,-vy);},distanceTo:function(v){return this.sub(v).magnitude();},magnitude:function(){return Math.sqrt((this.x*this.x)+(this.y*this.y));},convertTo:function(_L0){if(_L0!='pure'&&_L0!='viewport'&&_L0!='document'){Util.error('Domain %q is not valid; legitimate coordinate domains are %q, %q, '+'%q.',_L0,'pure','viewport','document');return new Vector2(0,0);}if(_L0==this.domain)return new Vector2(this.x,this.y,this.domain);if(_L0=='pure')return new Vector2(this.x,this.y);if(this.domain=='pure'){Util.error('Unable to covert a pure vector to %q coordinates; a pure vector is '+'abstract and does not exist in any document coordinate system. If '+'you need to hack around this, create the vector explicitly in some '+'document coordinate domain, by passing a third argument to the '+'constructor. But you probably don\'t, and are just using the class '+'wrong. Stop doing that.',_L0);return new Vector2(0,0);}var o=Vector2.getScrollPosition('document');var x=this.x,y=this.y;if(this.domain=='document'){x-=o.x;y-=o.y;}else{x+=o.x;y+=o.y;}return new Vector2(x,y,_L0);},setElementPosition:function(el){var p=this.convertTo('document');el.style.left=parseInt(p.x)+'px';el.style.top=parseInt(p.y)+'px';return this;},setElementDimensions:function(el){return this.setElementWidth(el).setElementHeight(el);},setElementWidth:function(el){el.style.width=parseInt(this.x,10)+'px';return this;},setElementHeight:function(el){el.style.height=parseInt(this.y,10)+'px';return this;},scrollElementBy:function(el){if(el==document.body)el=DOMScroll.getScrollRoot();if(el==document.body){window.scrollBy(this.x,this.y);}else{el.scrollLeft+=this.x;el.scrollTop+=this.y;}return this;}});copy_properties(Vector2,{compass:{east:'e',west:'w',north:'n',south:'s',center:'center',northeast:'ne',northwest:'nw',southeast:'se',southwest:'sw'},getEventPosition:function(e,_L1){_L1=_L1||'document';e=$E(e);var x=e.pageX||(e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var y=e.pageY||(e.clientY+(document.documentElement.scrollTop||document.body.scrollTop));var v=new Vector2(x,y,'document');if(DOMScroll.getScrollWrapper())v=v.add(Vector2.getScrollPosition());return v.convertTo(_L1);},getScrollPosition:function(_L0){_L0=_L0||'document';var _L1=DOMScroll.getScrollWrapper();if(_L1){var x=_L1.scrollLeft;var y=_L1.scrollTop;}else{var x=document.body.scrollLeft||document.documentElement.scrollLeft;var y=document.body.scrollTop||document.documentElement.scrollTop;}return (new Vector2(x,y,'document').convertTo(_L0));},getElementPosition:function(el,_L1){_L1=_L1||'document';if(!el)return;if(ua.safari()<500&&el.tagName=='TR')el=el.firstChild;var _L2=el.offsetLeft;var top=el.offsetTop;var op=el.offsetParent;var _L5=DOMScroll.getScrollWrapper()||document.body;var _L6=false;while(el.parentNode&&_L5!=el.parentNode&&document.body!=el.parentNode){el=el.parentNode;if(!isNaN(el.scrollTop))if(!(ua.opera()<9.5)||!operaIgnoreScroll[window.getComputedStyle(el,'').getPropertyValue('display')]){top-=el.scrollTop;_L2-=el.scrollLeft;}if(op==el){if(ua.safari()<500&&el.tagName=='TR'){top+=el.firstChild.offsetTop;_L2+=el.firstChild.offsetLeft;}else{top+=el.offsetTop;_L2+=el.offsetLeft;}op=el.offsetParent;}if(op&&CSS.getStyle(op,'position')=='fixed'){_L6=true;top+=op.offsetTop;_L2+=op.offsetLeft;break;}}if(_L6){var _L7=Vector2.getScrollPosition('document');_L2+=_L7.x;top+=_L7.y;}return (new Vector2(_L2,top,'document').convertTo(_L1));},getElementDimensions:function(el,_L1){if(ua.safariPreWebkit()&&el.nodeName=='TR'){var tds=el.getElementsByTagName('td');var _L3=Vector2.getElementCompassPoint(tds[tds.length-1],Vector2.compass.southeast,_L1).sub(Vector2.getElementPosition(tds[0],'document',_L1));return _L3;}var x=(_L1?el.clientWidth:el.offsetWidth)||0;var y=(_L1?el.clientHeight:el.offsetHeight)||0;return new Vector2(x,y);},getHiddenElementDimensions:function(el){var _L1=$(el);var els=_L1.style;var _L3=els.visibility;var _L4=els.position;var _L5=els.display;if(_L5=='none'){els.visibility='hidden';els.position='absolute';els.display='block';}var _L6=Vector2.getElementDimensions(_L1);els.display=_L5;els.position=_L4;els.visibility=_L3;return _L6;},getElementCompassPoint:function(el,_L1,_L2){_L1=_L1||Vector2.compass.southeast;var p=Vector2.getElementPosition(el);var d=Vector2.getElementDimensions(el,_L2);var c=Vector2.compass;switch(_L1){case c.east:return p.add(d.x,d.y*.5);case c.west:return p.add(0,d.y*.5);case c.north:return p.add(d.x*.5,0);case c.south:return p.add(d.x*.5,d.y);case c.center:return p.add(d.mul(.5));case c.northwest:return p;case c.northeast:return p.add(d.x,0);case c.southwest:return p.add(0,d.y);case c.southeast:return p.add(d);}Util.error('Unknown compass point %s.',_L1);return p;},getViewportDimensions:function(){var x=(window&&window.innerWidth)||(document&&document.documentElement&&document.documentElement.clientWidth)||(document&&document.body&&document.body.clientWidth)||0;var y=(window&&window.innerHeight)||(document&&document.documentElement&&document.documentElement.clientHeight)||(document&&document.body&&document.body.clientHeight)||0;return new Vector2(x,y,'viewport');},getDocumentDimensions:function(){var _L0=DOMScroll.getScrollWrapper();var x=(_L0&&_L0.scrollWidth)||(document&&document.documentElement&&document.documentElement.scrollWidth)||(document&&document.body&&document.body.scrollWidth)||0;var y=(_L0&&_L0.scrollHeight)||(document&&document.documentElement&&document.documentElement.scrollHeight)||(document&&document.body&&document.body.scrollHeight)||0;return new Vector2(x,y,'document');},scrollIntoView:function(el){var _L1=el.offsetParent;var _L2=Rect(el);var _L3=_L2.boundWithin(Rect(_L1)).getPositionVector();_L2.getPositionVector().sub(_L3).scrollElementBy(_L1);}});var operaIgnoreScroll={'table':true,'inline-table':true,'inline':true};function elementX(obj){return Vector2.getElementPosition(obj,'document').x;}function elementY(obj){return Vector2.getElementPosition(obj,'document').y;}NodeAugment.add({getPosition:Vector2.getElementPosition,getDimensions:Vector2.getElementDimensions,getHiddenDimensions:Vector2.getHiddenElementDimensions,getCompassPoint:Vector2.getElementCompassPoint});
var DOMScroll={_scrollWrapper:0,usingScrollWrapper:function(){return env_get('use_scroll_wrapper');},getScrollWrapper:function(){if(DOMScroll._scrollWrapper===0)DOMScroll._scrollWrapper=DOMScroll.usingScrollWrapper()?ge('scroll_wrapper'):null;return DOMScroll._scrollWrapper;},getScrollRoot:function(){return DOMScroll.getScrollWrapper()||document.body;},SCROLL_CHANGE:'scroll_change',_hasScrollListeners:false,_isScrolled:null,registerScrollChangeHandler:function(cb){Arbiter.subscribe(DOMScroll.SCROLL_CHANGE,cb);if(!DOMScroll._hasScrollListeners){DOMScroll._hasScrollListeners=true;Event.listen(window,'resize',DOMScroll.updateScrollState);}},updateScrollState:function(){if(DOMScroll.usingScrollWrapper()){var _L0=DOMScroll.getScrollWrapper();var _L1=Vector2.getElementDimensions(_L0);var _L2=Vector2.getElementDimensions(_L0,true);var _L3=(_L1.y>_L2.y);var _L4=(_L1.x>_L2.x);}else{var _L5=Vector2.getViewportDimensions();var _L6=Vector2.getDocumentDimensions();var _L3=(_L6.x>_L5.x);var _L4=(_L6.y>_L5.y);}_L3+=0;_L4+=0;var _L7=(DOMScroll._isScrolled===null)||(_L3!=DOMScroll._isScrolled.x)||(_L4!=DOMScroll._isScrolled.y);if(_L7){DOMScroll._isScrolled=new Vector2(_L3,_L4);var _L8={sender:DOMScroll,is_scrolled:DOMScroll.getScrollState()};Arbiter.inform(DOMScroll.SCROLL_CHANGE,_L8,Arbiter.BEHAVIOR_STATE);}},getScrollState:function(){if(DOMScroll._isScrolled===null)DOMScroll.updateScrollState();return DOMScroll._isScrolled;},_scrollbarSize:null,_initScrollbarSize:function(){var _L0=$N('p');_L0.style.width='100%';_L0.style.height='200px';var _L1=$N('div');_L1.style.position='absolute';_L1.style.top='0px';_L1.style.left='0px';_L1.style.visibility='hidden';_L1.style.width='200px';_L1.style.height='150px';_L1.style.overflow='hidden';_L1.appendChild(_L0);document.body.appendChild(_L1);var w1=_L0.offsetWidth;_L1.style.overflow='scroll';var w2=_L0.offsetWidth;if(w1==w2)w2=_L1.clientWidth;document.body.removeChild(_L1);DOMScroll._scrollbarSize=w1-w2;if(DOMScroll._scrollbarSize<5)DOMScroll._scrollbarSize=15;},getScrollbarSize:function(){if(DOMScroll._scrollbarSize===null)DOMScroll._initScrollbarSize();return DOMScroll._scrollbarSize;},scrollTo:function(v,_L1,_L2,_L3){_L1=_L1||_L1===undefined;if(!(v instanceof Vector2)){var x=Vector2.getScrollPosition().x;var y=Vector2.getElementPosition($(v)).y;y=y-Math.min(0,Math.max(Vector2.getViewportDimensions().y/3,100));v=new Vector2(x,y,'document');}if(_L2){v.y-=Vector2.getViewportDimensions().y/2;}else if(_L3){v.y-=Vector2.getViewportDimensions().y;v.y+=_L3;}v=v.convertTo('document');var _L6=DOMScroll.getScrollWrapper();if(_L1&&window.animation){var _L7=_L6||document.body;animation(_L7).to('scrollTop',v.y).to('scrollLeft',v.x).ease(animation.ease.end).duration(750).go();}else if(_L6){_L6.scrollTop=v.y;_L6.scrollLeft=v.x;}else if(window.scrollTo)window.scrollTo(v.x,v.y);}};
function show(){for(var i=0;i<arguments.length;i++){var _L1=ge(arguments[i]);if(_L1&&_L1.style)_L1.style.display='';}return false;}function hide(){for(var i=0;i<arguments.length;i++){var _L1=ge(arguments[i]);if(_L1&&_L1.style)_L1.style.display='none';}return false;}function shown(el){el=ge(el);return (el.style.display!='none'&&!(el.style.display==''&&el.offsetWidth==0));}function toggle(){for(var i=0;i<arguments.length;i++){var _L1=$(arguments[i]);_L1.style.display=CSS.getStyle(_L1,"display")=='block'?'none':'block';}return false;}function toggleDisplayNone(){for(var i=0;i<arguments.length;i++){var _L1=$(arguments[i]);if(shown(_L1)){hide(_L1);}else show(_L1);}return false;}function set_inner_html(obj,_L1,_L2){DOM.setContent(obj,HTML(_L1).setDeferred(!!_L2));}function expandCollapseInplace(_L0,_L1){topElem=ge(_L0);bottomElem=ge(_L1);if(!topElem||!bottomElem)return false;topElemHeight=topElem.clientHeight;if(shown(_L1)){bottomElemHeight=bottomElem.clientHeight;newHeight=topElemHeight+bottomElemHeight;topElem.style.height=newHeight+'px';CSS.addClass(bottomElem,'hidden_elem');}else{CSS.removeClass(bottomElem,'hidden_elem');bottomElemHeight=bottomElem.clientHeight;newHeight=topElemHeight-bottomElemHeight;topElem.style.height=newHeight+'px';}return true;}
var DOM={tryElement:function(id,_L1){if(typeof(id)=='undefined'){Util.error('Tried to get "undefined" element!');return null;}var obj;var aug=_L1?identity:NodeAugment.extend;if(typeof(id)=='string'){if(id=='book')Util.error('FB95: Trying to get #book element from JS. #book no'+'longer exists.');obj=document.getElementById(id);if(!(ua.ie()>=7&&ua.ie()<8))return aug(obj);if(!obj){return null;}else if(typeof(obj.id)=='string'&&obj.id==id){return aug(obj);}else{var _L4=document.getElementsByName(id);if(!_L4||!_L4.length)return null;var _L5=[];for(var ii=0;ii<_L4.length;ii++){var c=_L4[ii];if(!c.id&&id)continue;if(typeof(c.id)=='string'&&c.id!=id)continue;_L5.push(_L4[ii]);}if(!_L5.length)return null;return aug(_L5[0]);}}return aug(id);},getElement:function(id,_L1){var el=DOM.tryElement.apply(null,$A(arguments),_L1);if(!el)Util.warn('Tried to get element %q, but it is not present in the page. (Use '+'ge() to test for the presence of an element.)',arguments[0]);return el;},find:function(_L0,_L1){var _L2=DOM.scry(_L0,_L1);if(1!=_L2.length){Util.error('DOM.find located %d elements that matched the selector `%s\''+'.  Please only use find when you are sure that 1 element '+'should match (like $).  Otherwise, please use DOM.scry.',_L2.length,_L1);return null;}return _L2[0];},scry:function(_L0,_L1,_L2){var _L3=_L1.split(' ');var _L4=[_L0||document];var _L5=_L4[0]==document;for(var i=0;i<_L3.length;i++){if(_L4.length==0)break;if(_L3[i]=='')continue;var _L7=_L3[i];var _L8=[];var _L9=false;if(_L7.charAt(0)=='^')if(i==0){_L9=true;_L7=_L7.slice(1);}else{Util.error('upwards looking selectors only supported on first selector');return;}_L7=_L7.replace(/\./g,' .');_L7=_L7.replace(/\#/g,' #');_L7=_L7.replace(/\[/g,' [');var _La=_L7.split(' ');var tag=_La[0]||'*';var _Lc=_La[1]&&_La[1].charAt(0)=='#';if(i==0&&tag=='*'&&_L5&&Util.isDevelopmentEnvironment()&&!_Lc)Util.error('DOM.scry was called without a tag in the selector. You '+'should probably use DOM.scry like `%s` instead of `%s`.','div'+_L1,_L1);if(_Lc){var _Ld=ge(_La[1].slice(1),true);if(_Ld&&('*'==tag||_Ld.tagName.toLowerCase()==tag))for(var _Le=0;_Le<_L4.length;_Le++)if(_L9&&DOM.contains(_Ld,_L4[_Le])){_L8=[_Ld];break;}else if(document==_L4[_Le]||DOM.contains(_L4[_Le],_Ld)){_L8=[_Ld];break;}}else{var _Lf=[];var _L10=_L4.length;for(var ii=0;ii<_L10;ii++){if(_L9){var _L12=[];var _L13=_L4[ii].parentNode;var all=tag=='*';while(DOM.isNode(_L13)){if(all||_L13.tagName.toLowerCase()==tag)_L12.push(_L13);_L13=_L13.parentNode;}}else var _L12=_L4[ii].getElementsByTagName(tag);var _L15=_L12.length;for(var jj=0;jj<_L15;jj++)_Lf.push(_L12[jj]);}var _L17;var _L18;for(var _L19=1;_L19<_La.length;_L19++){var _L1a=_La[_L19];if(_L1a.charAt(0)=='.'){_L17=true;_L18=new RegExp('\\b'+_L1a.substring(1)+'\\b');}else _L17=false;for(var ii=0;ii<_Lf.length;ii++){var _L1b=_Lf[ii];if(!_L1b)continue;if(_L17){if(!_L18.test(_L1b.className))delete _Lf[ii];continue;}else{var _L1c=_L1a.slice(1,_L1a.length-1);if(_L1c.indexOf('=')==-1){if(_L1b.getAttribute(_L1c)===null){delete _Lf[ii];continue;}}else{var _L1d=_L1c.split('=');var attr=_L1d[0];var _L1f=_L1d[1];_L1f=_L1f.slice(1,_L1f.length-1);if(_L1b.getAttribute(attr)!=_L1f){delete _Lf[ii];continue;}}}}}for(var ii=0;ii<_Lf.length;ii++)if(_Lf[ii]){_L8.push(_Lf[ii]);if(_L9)break;}}_L4=_L8;}var list=null;if(!_L2){for(var ii=0;ii<_L4.length;ii++)$(_L4[ii]);list=new NodeList();list.push.apply(list,$A(_L4));}else list=_L4;return list;},getBoxWidth:function(obj){var pL=parseInt(CSS.getStyle(obj,'paddingLeft'),10),pR=parseInt(CSS.getStyle(obj,'paddingRight'),10),bL=parseInt(CSS.getStyle(obj,'borderLeftWidth'),10),bR=parseInt(CSS.getStyle(obj,'borderRightWidth'),10);return obj.offsetWidth-(pL?pL:0)-(pR?pR:0)-(bL?bL:0)-(bR?bR:0);},getBoxHeight:function(obj){var pT=parseInt(CSS.getStyle(obj,'paddingTop'),10),pB=parseInt(CSS.getStyle(obj,'paddingBottom'),10),bT=parseInt(CSS.getStyle(obj,'borderTopWidth'),10),bW=parseInt(CSS.getStyle(obj,'borderBottomWidth'),10);return obj.offsetHeight-(pT?pT:0)-(pB?pB:0)-(bT?bT:0)-(bW?bW:0);},setText:function(el,_L1){if(DOM.isNode(el,DOM.NODE_TYPES.TEXT)){el.data=_L1;}else{DOM.empty(el);el.appendChild(document.createTextNode(_L1));}},getText:(function(){var div=document.createElement('div'),_L1=div.innerText==null?'textContent':'innerText';return function(el){if(!el){return '';}else if(DOM.isNode(el,DOM.NODE_TYPES.TEXT)){return el.data;}else return el[_L1];};})(),_getSelectionPrivate:function(_L0){var _L1=_L0?false:'';if(document.selection&&document.selection.createRange&&document.selection.createRange.text){_L1=_L0?true:document.selection.createRange().text;}else if(document.getSelection){_L1=_L0?true:document.getSelection();}else if(window.getSelection)_L1=_L0?true:window.getSelection();return _L1;},getSelectionSupported:function(){return DOM._getSelectionPrivate(true);},getSelection:function(){return DOM._getSelectionPrivate(false);},create:function(_L0,_L1,_L2,_L3){_L0=document.createElement(_L0);if(_L1){_L1=copy_properties({},_L1);if(_L1.style){copy_properties(_L0.style,_L1.style);delete _L1.style;}for(var k in _L1)if(k.toLowerCase().indexOf('on')==0){if(typeof _L1[k]!='function')Util.error('Handlers passed to DOM.create must be functions; '+'handler passed for '+k+' was '+(typeof _L1[k])+'.');Event.listen(_L0,k.substr(2),_L1[k]);delete _L1[k];}copy_properties(_L0,_L1);}if(_L2!=undefined)DOM.setContent(_L0,_L2);return $(_L0,_L3);},setID:function(_L0,id){_L0.id=id;},prependContent:function(_L0,_L1){if(!DOM.isNode(_L0))throw new Error('DOM.prependContent: reference element is not a node');var _L2=function(_L3){if(_L0.firstChild){_L0.insertBefore(_L3,_L0.firstChild);}else _L0.appendChild(_L3);};return DOM._addContent(_L1,_L2,_L0);},insertAfter:function(_L0,_L1){if(!DOM.isNode(_L0)||!_L0.parentNode)throw new Error('DOM.insertAfter: reference element is not a node');var _L2=function(_L3){if(_L0.nextSibling){_L0.parentNode.insertBefore(_L3,_L0.nextSibling);}else _L0.parentNode.appendChild(_L3);};return DOM._addContent(_L1,_L2,_L0.parentNode);},insertBefore:function(_L0,_L1){if(!DOM.isNode(_L1)||!_L1.parentNode)throw new Error('DOM.insertBefore: reference element is not a node or '+'does not have a parent.');var _L2=function(_L3){_L1.parentNode.insertBefore(_L3,_L1);};return DOM._addContent(_L0,_L2,_L1.parentNode);},setContent:function(el,_L1){if(!DOM.isNode(el))throw new Error('DOM.setContent: reference element is not a node');DOM.empty(el);return DOM.appendContent(el,_L1);},appendContent:function(_L0,_L1){if(!DOM.isNode(_L0))throw new Error('DOM.appendContent: reference element is not a node');var _L2=function(_L3){_L0.appendChild(_L3);};return DOM._addContent(_L1,_L2,_L0);},replace:function(_L0,_L1){if(!DOM.isNode(_L0)||!_L0.parentNode)throw new Error('DOM.replace: reference element must be a node with a'+' parent');var _L2=function(_L3){_L0.parentNode.replaceChild(_L3,_L0);};return DOM._addContent(_L1,_L2,_L0.parentNode);},_gettingCaretPosition:false,getCaretPosition:function(_L0){_L0=$(_L0);if(!DOM.isNode(_L0,['input','textarea']))return {start:undefined,end:undefined};if(!document.selection)return {start:_L0.selectionStart,end:_L0.selectionEnd};if(DOM.isNode(_L0,'input')){var _L1=document.selection.createRange();return {start:-_L1.moveStart('character',-_L0.value.length),end:-_L1.moveEnd('character',-_L0.value.length)};}else{if(!DOM._gettingCaretPosition){DOM._gettingCaretPosition=true;_L0.focus();DOM._gettingCaretPosition=false;}var _L1=document.selection.createRange();var _L2=_L1.duplicate();_L2.moveToElementText(_L0);_L2.setEndPoint('StartToEnd',_L1);var end=_L0.value.length-_L2.text.length;_L2.setEndPoint('StartToStart',_L1);return {start:_L0.value.length-_L2.text.length,end:end};}},setCaretPosition:function(obj,_L1,end){obj=$(obj);if(document.selection){if(obj.tagName=='TEXTAREA'){var i=obj.value.indexOf("\r",0);while(i!=-1&&i<end){end--;if(i<_L1)_L1--;i=obj.value.indexOf("\r",i+1);}}var _L4=obj.createTextRange();_L4.collapse(true);_L4.moveStart('character',_L1);if(end!=undefined)_L4.moveEnd('character',end-_L1);_L4.select();}else{obj.selectionStart=_L1;var _L5=end==undefined?_L1:end;obj.selectionEnd=Math.min(_L5,obj.value.length);obj.focus();}},remove:function(_L0,_L1){_L0=$(_L0,true);if(_L0.parentNode){_L0.parentNode.removeChild(_L0);if(!_L1&&ua.ie()<8)try{}catch(ignored){}}},empty:function(_L0){_L0=$(_L0,true);while(_L0.firstChild)DOM.remove(_L0.firstChild);},contains:function(_L0,_L1){_L0=ge(_L0,true);_L1=ge(_L1,true);if(!_L0||!_L1){return false;}else if(_L0===_L1){return true;}else if(DOM.isNode(_L0,'#text')){return false;}else if(DOM.isNode(_L1,'#text')){return DOM.contains(_L0,_L1.parentNode);}else if(_L0.contains){return _L0.contains(_L1);}else if(_L0.compareDocumentPosition){return !!(_L0.compareDocumentPosition(_L1)&16);}else return false;},getRootElement:function(){var _L0=null;if(window.Quickling&&Quickling.isActive())_L0=ge('content');return _L0||DOMScroll.getScrollRoot();},suppressSelection:function(_L0){if(typeof _L0.onselectstart!='undefined'){_L0.listen('selectstart',function(){return false;});}else if(typeof _L0.style.MozUserSelect!='undefined'){_L0.style.MozUserSelect='none';}else _L0.listen('mousedown',function(){return false;});return _L0;},isNode:function(o,_L1){if(typeof(Node)=='undefined')Node=null;try{if(!o||!((Node!=undefined&&o instanceof Node)||o.nodeName))return false;}catch(ignored){return false;}if(typeof(_L1)!=='undefined'){_L1=arrayize(_L1).map(function(i){return (i+'').toUpperCase();});var _L2,_L3;try{_L2=new String(o.nodeName).toUpperCase();_L3=o.nodeType;}catch(ignored){return false;}for(var ii=0;ii<_L1.length;ii++)try{if(_L2==_L1[ii]||_L3==_L1[ii])return true;}catch(ignored){}return false;}return true;},NODE_TYPES:{ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION_NODE:12},_addContent:function(_L0,_L1,_L2){var _L3,_L4=new NodeList(),_L5=[];var _L6=document.createDocumentFragment();if(!(_L0 instanceof Array))_L0=[_L0];for(var ii=0;ii<_L0.length;ii++){_L3=_L0[ii];if(_L3 instanceof HTML){_L5.push(_L3.getAction());var _L8=_L3.getNodes(),_L9;for(var jj=0;jj<_L8.length;jj++){_L9=(ua.safari()||(ua.ie()&&_L3.hasOptionElements()))?_L8[jj]:_L8[jj].cloneNode(true);_L4.push(_L9);_L6.appendChild(_L9);}}else if(is_scalar(_L3)){var _Lb=document.createTextNode(_L3);_L4.push(_Lb);_L6.appendChild(_Lb);}else if(DOM.isNode(_L3)){_L4.push(_L3);_L6.appendChild(_L3);}else if(_L3 instanceof Array){Util.error('DOM._addContent: Nested arrays not supported');}else if(_L3!==null)Util.error('DOM._addContent: No way to set content %q.',_L3);}_L1(_L6);for(var ii=0;ii<_L5.length;ii++)_L5[ii]();return _L4;},getNearest:function(_L0,tag){while(_L0&&!DOM.isNode(_L0,tag))_L0=_L0.parentNode;return _L0;},findParentByClass:function(_L0,cls){while(DOM.isNode(_L0)){if(CSS.hasClass(_L0,cls))return _L0;_L0=_L0.parentNode;}return null;}};function NodeList(_L0){if(!NodeList._augmented){copy_properties(NodeList.prototype,NodeList._getAugment());NodeList._augmented=true;}List.call(this,_L0);}NodeList.prototype=new List();copy_properties(NodeList.prototype,{toString:function(){return '[NodeList]';}});copy_properties(NodeList,{_augmented:false,_getAugment:function(){var _L0=function(_L3,fn){return function(){var _L5=$A(arguments);return this[_L3](function(_L6,idx,_L8){return fn.apply(null,[_L6].concat(_L5));});};};var _L1=function(fn){return function(){fn.apply(this,$A(arguments));return this;};};var _L2=function(_L3,fn){return function(){var _L5=fn.apply(this,$A(arguments));var _L6=new _L3();for(var ii=0;ii<_L5.length;ii++)_L6.push.apply(_L6,$A(_L5[ii]));return _L6;};};return {scry:_L2(NodeList,_L0('map',DOM.scry)),addClass:_L1(_L0('map',CSS.addClass)),removeClass:_L1(_L0('map',CSS.removeClass)),hasClass:_L0('every',CSS.hasClass),toggleClass:_L1(_L0('map',CSS.toggleClass)),getStyle:_L0('map',CSS.getStyle),setStyle:_L1(_L0('map',CSS.setStyle))};}});function $N(_L0,_L1,_L2){if(typeof _L1!='object'||DOM.isNode(_L1)||_L1 instanceof Array||_L1 instanceof HTML){_L2=_L1;_L1=null;}return DOM.create(_L0,_L1,_L2);}var ge=DOM.tryElement;var $$=function _$$(_L0){if(Util.isDevelopmentEnvironment()&&_L0&&!(/^[a-zA-Z1-6]+$/).test(_L0)&&-1==_L0.indexOf('#'))Util.warn('$$() has been called with `%s\' as a selector. You should not use only '+'class or attribute selectors from the document element, because these '+'can not be efficiently queried. Call DOM.find() or DOM.scry() with a '+'root element, or look at DOM.scry() for more information.',_L0);return DOM.scry.apply(null,[document].concat($A(arguments)));};var $=DOM.getElement;NodeAugment.add({setContent:DOM.setContent,prependContent:DOM.prependContent,appendContent:DOM.appendContent,replace:DOM.replace,remove:DOM.remove,empty:DOM.empty,scry:DOM.scry,find:DOM.find,isNode:DOM.isNode,setText:DOM.setText,getText:DOM.getText});
function delay_add_class(_L0,evt){var _L2='hovered';var _L3=250;var _L4=null;var _L5=null;var _L6=function(e){if(!DOM.contains(_L0,e.getTarget())){clearTimeout(_L4);CSS.removeClass(_L0,_L2);_L5&&_L5.remove();}};var add=function(){_L4=setTimeout(CSS.addClass.bind(null,_L0,_L2),_L3||0);_L5=Event.listen(document,'mousemove',_L6);};Event.listen(_L0,'mouseenter',add);if(DOM.contains(_L0,$E(evt).getTarget()))add();}
var kError_Account_IncorrectPassword=1340001,kError_Global_ValidationError=1346001,kError_Login_GenericError=1348009,kError_Chat_NotAvailable=1356002,kError_Chat_SendOtherNotAvailable=1356003,kError_Async_NotLoggedIn=1357001,kError_Async_LoginChanged=1357003,kError_Async_CSRFCheckFailed=1357004,kError_Chat_TooManyMessages=1356008,kError_Platform_CallbackValidationFailure=1349007,kError_Platform_ApplicationResponseInvalid=1349008,kError_FBPayments_Unknown=1383001,kError_FBPayments_InvalidParameters=1383002,kError_Gifts_NoGiftSelected=1391001,kError_Gifts_NoReceiverSpecified=1391003,kError_Gifts_NoMessageAttached=1391004,kError_Async_InternalCaptchaRequired=1357007,kError_Recruiting_MessageDeliveryFailed=1405001,kError_FBPayments_PaymentFailure=1383003,kError_Intern_UnknownError=1408001,kError_Privacy_FriendListNameAlreadyExists=1409001,kError_Mobile_InvalidWapLocale=1347008,kError_Gifts_MessageTooLong=1391007,kError_Inbox_DuplicateMessages=1415001,kError_Async_ConfirmationRequired=1357008,kError_Gifter_GiftNotMoved=1416001,kError_Gifter_GiftNotCreated=1416002,kError_Gifter_GiftNotUpdated=1416003,kError_Gifter_DesignerNotAdded=1416004,kError_Gifter_GiftsNotLoaded=1416005,kError_Megaphone_InvalidHideData=1419001,kError_Megaphone_StoryNotFound=1419002,kError_Megaphone_InternalError=1419003,kError_Megaphone_HandleHideFailed=1419004,kError_Screenname_LimiteExceeded=1423001,kError_Screenname_AllocationError=1423002,kError_OpenId_RegistrationGeneralError=1428001,kError_OpenId_SignatureError=1428002,kError_OpenId_MissingRequiredInformation=1428003,kError_OpenId_ProtocolError=1428004,kError_OpenId_ProtocolErrorWithMessage=1428005,kError_OpenId_EmailAlreadyTaken=1428006,kError_ProfileConnect_AlreadyConnected=1431001,kError_Inbox_ThreadsUnavailable=1415002,kError_OpenId_CancelResponse=1428010,kError_OpenId_SetupNeededResponse=1428011,kError_Payment_CreditCardError=1353008,kError_FBPayments_InvalidOperation=1383004,kError_FBPayments_PermissionDenied=1383005,kError_FBPayments_DatabaseError=1383006,kError_FBPayments_InvalidApp=1383007,kError_FBPayments_AppNoResponse=1383008,kError_FBPayments_AppErrorResponse=1383009,kError_FBPayments_UserCanceled=1383010,kError_FBPayments_Disabled=1383011,kError_Wall_RateLimitExceeded=1367004,kError_Async_Roadblocked=1357011,kError_Gigaboxx_InvalidFolder=1441008,kError_Gifts_GiftsWithCreditsGlobalLimitExceeded=1391027,kError_Login_LsdFailed=1348035,kError_Payment_CaptchaFailed=1353010,kError_Payment_SecurityRestriction=1353011,kError_OpenId_EmailAlreadyTakenLinkAccounts=1428016,kError_UIErrorForm_HasErrors=1460001,kError_CreditCardForm_InvalidCardType=1463001,kError_CreditCardForm_InvalidExpDate=1463002,kError_CreditCardForm_InvalidNumber=1463003,kError_CreditCardForm_InvalidZip=1463004,kError_CreditCardForm_InvalidState=1463005,kError_CreditCardForm_InvalidStreet=1463006,kError_CreditCardForm_InvalidCity=1463007,kError_CreditCardForm_NonNumericCard=1463008,kError_CreditCardForm_InvalidFirstName=1463009,kError_CreditCardForm_InvalidLastName=1463010,kError_CreditCardForm_InvalidCSC=1463011,kError_CreditCardForm_NonNumericCSC=1463012,kError_CreditCardForm_FailedAuth=1463013,kError_CreditCardForm_InvalidAddress=1463014,kError_CreditCardForm_FailedRegistration=1463015,kError_CreditCardForm_FailedRetrieval=1463016,kError_CreditCardForm_FailedRemove=1463017,kError_Mentions_UntaggingMentionFailed=1462003,kError_Async_PopUpCaptchaRequired=1357013,kError_Verification_ConfirmEmail=1442002,kError_FBPayments_DisputeFlow=1383014,kError_Login_WantsNotification=1348040,kError_Bughouse_UnknownBadge=1480001,kError_Privacy_ReBlockTimeoutFail=1409006,kError_Privacy_BlockFail=1409007,kError_Privacy_CannotSelfBlock=1409008;
function collect_data_attrib(_L0,_L1){var _L2={};var _L3='data-'+_L1;while(_L0&&!DOM.isNode(_L0,'body')){var _L4=_L0.getAttribute(_L3);if(_L4){var _L5=JSON.decode(_L4);for(var i in _L5)if(_L2[i]==undefined)_L2[i]=_L5[i];}_L0=_L0.parentNode;}return _L2;}function replace_collected_data_attrib(_L0,_L1,_L2,_L3){var _L4='data-'+_L1;for(;_L0&&!DOM.isNode(_L0,'body');_L0=_L0.parentNode){var _L5=_L0.getAttribute(_L4);if(_L5){var _L6=JSON.decode(_L5);if(_L6[_L2]!==undefined){_L6[_L2]=_L3;_L0.setAttribute(_L4,JSON.encode(_L6));return true;}}}return false;}
copy_properties(ft,{NF_SOURCE_MINIFEED:9,NF_SOURCE_STREAM:10,NF_SOURCE_HIGHLIGHTS:11,NF_EVENT_IMPRESSION:2,NF_EVENT_SEE_MORE:28,NF_EVENT_PILL_CLICK:37,NF_PAGE_AUTOREFRESH:38,FT_COM_EXPANSION:'c_exp',STREAM_SOURCES:{9:true,10:true,11:true}});function ft(_L0){var _L1=new AsyncSignal('/ajax/f.php',{'meta':_L0}).send();return true;}ft.get_see_more_params=function(_L0){return {evt:ft.NF_EVENT_SEE_MORE,type:_L0};};ft.f3=function(_L0){ft.logElem(_L0);};ft.enableFeedTracking=function(_L0){ft.feedTrackingIsEnabled=_L0;onunloadRegister(function(){ft.feedTrackingIsEnabled=false;});};ft.logElem=function(_L0,_L1){if(!ft.feedTrackingIsEnabled)return;var _L2=collect_data_attrib(_L0,'ft');if(count(_L2)){if(ft.feedTrackingIsEnabled==1&&ft.STREAM_SOURCES[parseInt(_L2.src,10)])return;_L2.dest=_L0.href;ft.logData(_L2,_L1);}};ft.logData=function(_L0,_L1){var _L2={};copy_properties(_L2,_L0);if(_L1)copy_properties(_L2,_L1);new AsyncSignal('/ajax/f2.php',{link_data:JSON.encode(_L2)}).send();};onloadRegister(function(){LinkController.registerFallbackHandler(function(_L0){ft.logElem(_L0);},LinkController.ALL,true);});
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();}});
function CounterDisplay(_L0,_L1,_L2,_L3,_L4){copy_properties(this,{_name:_L0,_valueNode:$(_L1),_wrapperNode:$(_L2)||null,_statusClass:_L4,_rm:new RenderManager(this),_arbiterSubscription:null,_count:0});var _L5=this._valueNode.firstChild;if(_L5){var _L6=parseInt(_L5.nodeValue,10);if(!isNaN(_L6))this._count=_L6;}this._statusNode=_L3?$(_L3):null;this._subscribeAll();CounterDisplay.instances.push(this);onunloadRegister(this._destroy.bind(this),true);}copy_properties(CounterDisplay,{EVENT_TYPE_ADJUST:'CounterDisplay/adjust',EVENT_TYPE_UPDATE:'CounterDisplay/update',instances:[],adjustCount:function(_L0,_L1){Arbiter.inform(CounterDisplay.EVENT_TYPE_ADJUST+'/'+_L0,_L1);},setCount:function(_L0,_L1){Arbiter.inform(CounterDisplay.EVENT_TYPE_UPDATE+'/'+_L0,_L1);}});CounterDisplay.mixin({_destroy:function(){delete this._valueNode;delete this._wrapperNode;if(this._arbiterSubscription){Arbiter.unsubscribe(this._arbiterSubscription);delete this._arbiterSubscription;}CounterDisplay.instances.remove(this);},adjustCount:function(_L0){this._count=Math.max(0,this._count+_L0);this._rm.dirty();return this;},setCount:function(_L0){this._count=Math.max(0,_L0);this._rm.dirty();return this;},paint:function(){DOM.setText(this._valueNode,this._count);if(this._wrapperNode)if(this._count<=0){hide(this._wrapperNode);if(this._statusClass&&this._statusNode)CSS.removeClass(this._statusNode,this._statusClass);}else{show(this._wrapperNode);if(this._statusClass&&this._statusNode)CSS.addClass(this._statusNode,this._statusClass);}},_subscribeAll:function(){var _L0=[CounterDisplay.EVENT_TYPE_ADJUST+'/'+this._name,CounterDisplay.EVENT_TYPE_UPDATE+'/'+this._name];this._arbiterSubscription=Arbiter.subscribe(_L0,this._onInform.bind(this),Arbiter.SUBSCRIBE_NEW);},_onInform:function(_L0,_L1){_L1=parseInt(_L1);if(isNaN(_L1)){Util.warn("Passed invalid counter value: '%s'",_L1);return;}if(_L0.indexOf(CounterDisplay.EVENT_TYPE_ADJUST)!=-1){this.adjustCount(_L1);}else if(_L0.indexOf(CounterDisplay.EVENT_TYPE_UPDATE)!=-1){this.setCount(_L1);}else{Util.warn("Invalid event type in CounterDisplay handler: '%s'",_L0);return;}return;}});
function setCookie(_L0,_L1,_L2,_L3){if(_L2){var _L4=new Date();var _L5=new Date();_L5.setTime(_L4.getTime()+_L2);}document.cookie=_L0+"="+encodeURIComponent(_L1)+"; "+(_L2?"expires="+_L5.toGMTString()+"; ":"")+"path="+(_L3||'/')+"; domain=."+window.location.hostname.replace(/^.*(facebook\..*)$/i,'$1');}function clearCookie(_L0){document.cookie=_L0+"=; expires=Mon, 26 Jul 1997 05:00:00 GMT; "+"path=/; domain=."+window.location.hostname.replace(/^.*(facebook\..*)$/i,'$1');}function getCookie(_L0){var _L1=_L0+"=";var ca=document.cookie.split(';');for(i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(_L1)==0)return decodeURIComponent(c.substring(_L1.length,c.length));}return null;}function transferCookieToComTld(_L0,_L1){_L1=_L1||bagofholding;var _L2;if(_L0 instanceof Array){_L2=_L0;}else _L2=[_L0];var _L3={};for(var i=0;i<_L2.length;i++){var _L5=getCookie(_L2[i]);if(_L5)_L3[_L2[i]]=_L5;}var _L6=window.location.hostname.replace(/facebook.*/,'facebook.com');var uri='http://'+_L6+'/common/cookie_transfer.php';new AsyncSignal(uri,_L3).setHandler(_L1).send();}
function adjustImage(obj){var _L1=obj.parentNode;while(CSS.getStyle(_L1,'display')!='block'&&_L1.parentNode)_L1=_L1.parentNode;var _L2=_L1.offsetWidth;if(obj.offsetWidth>_L2)try{if(ua.ie()<8){var _L3=document.createElement('div');_L3.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+obj.src.replace('"','%22')+'", sizingMethod="scale")';_L3.style.width=_L2+'px';_L3.style.height=Math.floor(((_L2/obj.offsetWidth)*obj.offsetHeight))+'px';if(obj.parentNode.tagName=='A')_L3.style.cursor='pointer';obj.parentNode.insertBefore(_L3,obj);obj.parentNode.removeChild(obj);}else throw 1;}catch(e){obj.style.width=_L2+'px';}CSS.removeClass(obj,'img_loading');}function imageConstrainSize(src,_L1,_L2,_L3){var _L4=new Image();_L4.onload=function(){if(_L4.width>0&&_L4.height>0){var _L5=_L4.width;var _L6=_L4.height;if(_L5>_L1||_L6>_L2){var _L7=_L2/_L1;var _L8=_L6/_L5;if(_L8>_L7){_L5=_L5*(_L2/_L6);_L6=_L2;}else{_L6=_L6*(_L1/_L5);_L5=_L1;}}var _L9=ge(_L3);if(_L9){var _La=document.createElement('img');_La.src=src;_La.width=_L5;_La.height=_L6;_L9.parentNode.insertBefore(_La,_L9);_L9.parentNode.removeChild(_L9);}}};_L4.src=src;}function image_has_loaded(img){if(img.naturalWidth!==undefined){return img.complete&&img.width!=0;}else if(img.height==20&&img.width==20&&img.complete){return false;}else if(img.complete===undefined&&ua.safari()<500){var _L1=new Image();_L1.src=img.src;return _L1.complete;}return img.complete;}function image_has_failed(obj){if((obj.complete==null&&obj.width==20&&obj.height==20)||(obj.mimeType!=null&&obj.complete&&obj.mimeType=='')||(obj.naturalHeight!=null&&obj.complete&&obj.naturalHeight==0))return true;}
function animation(obj){if(obj==undefined){Util.error("Creating animation on non-existant object");return;}if(this==window){return new animation(obj);}else{this.obj=obj;this._reset_state();this.queue=[];this.last_attr=null;}}animation.resolution=20;animation.offset=0;animation.prototype._reset_state=function(){this.state={attrs:{},duration:500};};animation.prototype.stop=function(){this._reset_state();this.queue=[];return this;};animation.prototype._build_container=function(){if(this.container_div){this._refresh_container();return;}if(this.obj.firstChild&&this.obj.firstChild.__animation_refs){this.container_div=this.obj.firstChild;this.container_div.__animation_refs++;this._refresh_container();return;}var _L0=document.createElement('div');_L0.style.padding='0px';_L0.style.margin='0px';_L0.style.border='0px';_L0.__animation_refs=1;var _L1=this.obj.childNodes;while(_L1.length)_L0.appendChild(_L1[0]);this.obj.appendChild(_L0);this.obj.style.overflow='hidden';this.container_div=_L0;this._refresh_container();};animation.prototype._refresh_container=function(){this.container_div.style.height='auto';this.container_div.style.width='auto';this.container_div.style.height=this.container_div.offsetHeight+'px';this.container_div.style.width=this.container_div.offsetWidth+'px';};animation.prototype._destroy_container=function(){if(!this.container_div)return;if(!--this.container_div.__animation_refs){var _L0=this.container_div.childNodes;while(_L0.length)this.obj.appendChild(_L0[0]);this.obj.removeChild(this.container_div);}this.container_div=null;};animation.ATTR_TO=1;animation.ATTR_BY=2;animation.ATTR_FROM=3;animation.prototype._attr=function(_L0,_L1,_L2){_L0=_L0.replace(/-[a-z]/gi,function(l){return l.substring(1).toUpperCase();});var _L3=false;switch(_L0){case 'background':this._attr('backgroundColor',_L1,_L2);return this;case 'margin':_L1=animation.parse_group(_L1);this._attr('marginBottom',_L1[0],_L2);this._attr('marginLeft',_L1[1],_L2);this._attr('marginRight',_L1[2],_L2);this._attr('marginTop',_L1[3],_L2);return this;case 'padding':_L1=animation.parse_group(_L1);this._attr('paddingBottom',_L1[0],_L2);this._attr('paddingLeft',_L1[1],_L2);this._attr('paddingRight',_L1[2],_L2);this._attr('paddingTop',_L1[3],_L2);return this;case 'backgroundColor':case 'borderColor':case 'color':_L1=animation.parse_color(_L1);break;case 'opacity':_L1=parseFloat(_L1,10);break;case 'height':case 'width':if(_L1=='auto'){_L3=true;}else _L1=parseInt(_L1,10);break;case 'borderWidth':case 'lineHeight':case 'fontSize':case 'marginBottom':case 'marginLeft':case 'marginRight':case 'marginTop':case 'paddingBottom':case 'paddingLeft':case 'paddingRight':case 'paddingTop':case 'bottom':case 'left':case 'right':case 'top':case 'scrollTop':case 'scrollLeft':_L1=parseInt(_L1,10);break;default:throw new Error(_L0+' is not a supported attribute!');}if(this.state.attrs[_L0]===undefined)this.state.attrs[_L0]={};if(_L3)this.state.attrs[_L0].auto=true;switch(_L2){case animation.ATTR_FROM:this.state.attrs[_L0].start=_L1;break;case animation.ATTR_BY:this.state.attrs[_L0].by=true;case animation.ATTR_TO:this.state.attrs[_L0].value=_L1;break;}};animation.prototype.to=function(_L0,_L1){if(_L1===undefined){this._attr(this.last_attr,_L0,animation.ATTR_TO);}else{this._attr(_L0,_L1,animation.ATTR_TO);this.last_attr=_L0;}return this;};animation.prototype.by=function(_L0,_L1){if(_L1===undefined){this._attr(this.last_attr,_L0,animation.ATTR_BY);}else{this._attr(_L0,_L1,animation.ATTR_BY);this.last_attr=_L0;}return this;};animation.prototype.from=function(_L0,_L1){if(_L1===undefined){this._attr(this.last_attr,_L0,animation.ATTR_FROM);}else{this._attr(_L0,_L1,animation.ATTR_FROM);this.last_attr=_L0;}return this;};animation.prototype.duration=function(_L0){this.state.duration=_L0?_L0:0;return this;};animation.prototype.checkpoint=function(_L0,_L1){if(_L0===undefined)_L0=1;this.state.checkpoint=_L0;this.queue.push(this.state);this._reset_state();this.state.checkpointcb=_L1;return this;};animation.prototype.blind=function(){this.state.blind=true;return this;};animation.prototype.hide=function(){this.state.hide=true;return this;};animation.prototype.show=function(){this.state.show=true;return this;};animation.prototype.ease=function(_L0){this.state.ease=_L0;return this;};animation.prototype.go=function(){var _L0=(new Date()).getTime();this.queue.push(this.state);for(var i=0;i<this.queue.length;i++){this.queue[i].start=_L0-animation.offset;if(this.queue[i].checkpoint)_L0+=this.queue[i].checkpoint*this.queue[i].duration;}animation.push(this);return this;};animation.prototype._frame=function(_L0){var _L1=true;var _L2=false;var _L3=false;for(var i=0;i<this.queue.length;i++){var cur=this.queue[i];if(cur.start>_L0){_L1=false;continue;}if(cur.checkpointcb){this._callback(cur.checkpointcb,_L0-cur.start);cur.checkpointcb=null;}if(cur.started===undefined){if(cur.show)this.obj.style.display='block';for(var a in cur.attrs){if(cur.attrs[a].start!==undefined)continue;switch(a){case 'backgroundColor':case 'borderColor':case 'color':var val=animation.parse_color(CSS.getStyle(this.obj,a=='borderColor'?'borderLeftColor':a));if(cur.attrs[a].by){cur.attrs[a].value[0]=Math.min(255,Math.max(0,cur.attrs[a].value[0]+val[0]));cur.attrs[a].value[1]=Math.min(255,Math.max(0,cur.attrs[a].value[1]+val[1]));cur.attrs[a].value[2]=Math.min(255,Math.max(0,cur.attrs[a].value[2]+val[2]));}break;case 'opacity':var val=CSS.getOpacity(this.obj);if(cur.attrs[a].by)cur.attrs[a].value=Math.min(1,Math.max(0,cur.attrs[a].value+val));break;case 'height':var val=DOM.getBoxHeight(this.obj);if(cur.attrs[a].by)cur.attrs[a].value+=val;break;case 'width':var val=DOM.getBoxWidth(this.obj);if(cur.attrs[a].by)cur.attrs[a].value+=val;break;case 'scrollLeft':case 'scrollTop':var val=(this.obj==document.body)?(document.documentElement[a]||document.body[a]):this.obj[a];if(cur.attrs[a].by)cur.attrs[a].value+=val;cur['last'+a]=val;break;default:var val=parseInt(CSS.getStyle(this.obj,a),10)||0;if(cur.attrs[a].by)cur.attrs[a].value+=val;break;}cur.attrs[a].start=val;}if((cur.attrs.height&&cur.attrs.height.auto)||(cur.attrs.width&&cur.attrs.width.auto)){if(ua.firefox()<3)_L3=true;this._destroy_container();for(var a in {height:1,width:1,fontSize:1,borderLeftWidth:1,borderRightWidth:1,borderTopWidth:1,borderBottomWidth:1,paddingLeft:1,paddingRight:1,paddingTop:1,paddingBottom:1})if(cur.attrs[a])this.obj.style[a]=cur.attrs[a].value+(typeof cur.attrs[a].value=='number'?'px':'');if(cur.attrs.height&&cur.attrs.height.auto)cur.attrs.height.value=DOM.getBoxHeight(this.obj);if(cur.attrs.width&&cur.attrs.width.auto)cur.attrs.width.value=DOM.getBoxWidth(this.obj);}cur.started=true;if(cur.blind)this._build_container();}var p=(_L0-cur.start)/cur.duration;if(p>=1){p=1;if(cur.hide)this.obj.style.display='none';}else _L1=false;var pc=cur.ease?cur.ease(p):p;if(!_L2&&p!=1&&cur.blind)_L2=true;if(_L3&&this.obj.parentNode){var _La=this.obj.parentNode;var _Lb=this.obj.nextSibling;_La.removeChild(this.obj);}for(var a in cur.attrs)switch(a){case 'backgroundColor':case 'borderColor':case 'color':this.obj.style[a]='rgb('+animation.calc_tween(pc,cur.attrs[a].start[0],cur.attrs[a].value[0],true)+','+animation.calc_tween(pc,cur.attrs[a].start[1],cur.attrs[a].value[1],true)+','+animation.calc_tween(pc,cur.attrs[a].start[2],cur.attrs[a].value[2],true)+')';break;case 'opacity':CSS.setOpacity(this.obj,animation.calc_tween(pc,cur.attrs[a].start,cur.attrs[a].value));break;case 'height':case 'width':this.obj.style[a]=pc==1&&cur.attrs[a].auto?'auto':animation.calc_tween(pc,cur.attrs[a].start,cur.attrs[a].value,true)+'px';break;case 'scrollLeft':case 'scrollTop':var _Lc=this.obj==document.body;var val=(_Lc)?(document.documentElement[a]||document.body[a]):this.obj[a];if(cur['last'+a]!=val){delete cur.attrs[a];}else{var _Ld=animation.calc_tween(pc,cur.attrs[a].start,cur.attrs[a].value,true)-val;if(DOMScroll.usingScrollWrapper()||!_Lc){this.obj[a]=_Ld+val;}else if(a=='scrollLeft'){window.scrollBy(_Ld,0);}else window.scrollBy(0,_Ld);cur['last'+a]=_Ld+val;}break;default:this.obj.style[a]=animation.calc_tween(pc,cur.attrs[a].start,cur.attrs[a].value,true)+'px';break;}if(p==1){this.queue.splice(i--,1);this._callback(cur.ondone,_L0-cur.start-cur.duration);}}if(_L3)_La[_Lb?'insertBefore':'appendChild'](this.obj,_Lb);if(!_L2&&this.container_div)this._destroy_container();return !_L1;};animation.prototype.ondone=function(fn){this.state.ondone=fn;return this;};animation.prototype._callback=function(_L0,_L1){if(_L0){animation.offset=_L1;_L0.call(this);animation.offset=0;}};animation.calc_tween=function(p,v1,v2,_L3){return (_L3?parseInt:parseFloat)((v2-v1)*p+v1,10);};animation.parse_color=function(_L0){var hex=/^#([a-f0-9]{1,2})([a-f0-9]{1,2})([a-f0-9]{1,2})$/i.exec(_L0);if(hex){return [parseInt(hex[1].length==1?hex[1]+hex[1]:hex[1],16),parseInt(hex[2].length==1?hex[2]+hex[2]:hex[2],16),parseInt(hex[3].length==1?hex[3]+hex[3]:hex[3],16)];}else{var rgb=/^rgba? *\(([0-9]+), *([0-9]+), *([0-9]+)(?:, *([0-9]+))?\)$/.exec(_L0);if(rgb){if(rgb[4]==='0'){return [255,255,255];}else return [parseInt(rgb[1],10),parseInt(rgb[2],10),parseInt(rgb[3],10)];}else if(_L0=='transparent'){return [255,255,255];}else throw 'Named color attributes are not supported.';}};animation.parse_group=function(_L0){var _L0=trim(_L0).split(/ +/);if(_L0.length==4){return _L0;}else if(_L0.length==3){return [_L0[0],_L0[1],_L0[2],_L0[1]];}else if(_L0.length==2){return [_L0[0],_L0[1],_L0[0],_L0[1]];}else return [_L0[0],_L0[0],_L0[0],_L0[0]];};animation.push=function(_L0){if(!animation.active)animation.active=[];animation.active.push(_L0);if(!animation.timeout)animation.timeout=setInterval(animation.animate.bind(animation),animation.resolution,false);animation.animate(true);};animation.animate=function(_L0){var _L1=(new Date()).getTime();for(var i=_L0===true?animation.active.length-1:0;i<animation.active.length;i++)try{if(!animation.active[i]._frame(_L1))animation.active.splice(i--,1);}catch(e){animation.active.splice(i--,1);}if(animation.active.length==0){clearInterval(animation.timeout);animation.timeout=null;}};animation.ease={};animation.ease.begin=function(p){return Math.sin(Math.PI/2*(p-1))+1;};animation.ease.end=function(p){return Math.sin(.5*Math.PI*p);};animation.ease.both=function(p){return .5*Math.sin(Math.PI*(p-.5))+.5;};
function URI(uri){if(uri===window){Util.error('what the hell are you doing');return;}if(this===window)return new URI(uri||window.location.href);this.parse(uri||'');}copy_properties(URI,{getRequestURI:function(_L0,_L1){_L0=_L0===undefined||_L0;if(_L0&&window.PageTransitions&&PageTransitions.isInitialized()){return PageTransitions.getCurrentURI(!!_L1).getQualifiedURI();}else return new URI(window.location.href);},getMostRecentURI:function(){if(window.PageTransitions&&PageTransitions.isInitialized()){return PageTransitions.getMostRecentURI().getQualifiedURI();}else return new URI(window.location.href);},expression:/(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/,arrayQueryExpression:/^(\w+)((?:\[\w*\])+)=?(.*)/,explodeQuery:function(q){if(!q)return {};var _L1={};q=q.replace(/%5B/ig,'[').replace(/%5D/ig,']');q=q.split('&');for(var ii=0,_L3=q.length;ii<_L3;ii++){var _L4=q[ii].match(URI.arrayQueryExpression);if(!_L4){var _L5=q[ii].split('=');_L1[URI.decodeComponent(_L5[0])]=_L5[1]===undefined?null:URI.decodeComponent(_L5[1]);}else{var _L6=_L4[2].split(/\]\[|\[|\]/).slice(0,-1);var _L7=_L4[1];var _L8=URI.decodeComponent(_L4[3]||'');_L6[0]=_L7;var _L9=_L1;for(var i=0;i<_L6.length-1;i++)if(_L6[i]){if(_L9[_L6[i]]===undefined)if(_L6[i+1]&&!_L6[i+1].match(/\d+$/)){_L9[_L6[i]]={};}else _L9[_L6[i]]=[];_L9=_L9[_L6[i]];}else{if(_L6[i+1]&&!_L6[i+1].match(/\d+$/)){_L9.push({});}else _L9.push([]);_L9=_L9[_L9.length-1];}if(_L9 instanceof Array&&_L6[_L6.length-1]==''){_L9.push(_L8);}else _L9[_L6[_L6.length-1]]=_L8;}}return _L1;},implodeQuery:function(obj,_L1,_L2){_L1=_L1||'';if(_L2===undefined)_L2=true;var r=[];if(obj===null||obj===undefined){r.push(_L2?URI.encodeComponent(_L1):_L1);}else if(obj instanceof Array){for(var ii=0;ii<obj.length;++ii)try{if(obj[ii]!==undefined)r.push(URI.implodeQuery(obj[ii],_L1?(_L1+'['+ii+']'):ii));}catch(ignored){}}else if(typeof(obj)=='object'){if(DOM.isNode(obj)){r.push('{node}');}else for(var k in obj)try{if(obj[k]!==undefined)r.push(URI.implodeQuery(obj[k],_L1?(_L1+'['+k+']'):k));}catch(ignored){}}else if(_L2){r.push(URI.encodeComponent(_L1)+'='+URI.encodeComponent(obj));}else r.push(_L1+'='+obj);return r.join('&');},encodeComponent:function(raw){var _L1=String(raw).split(/([\[\]])/);for(var i=0,_L3=_L1.length;i<_L3;i+=2)_L1[i]=window.encodeURIComponent(_L1[i]);return _L1.join('');},decodeComponent:function(_L0){return window.decodeURIComponent(_L0.replace(/\+/g,' '));}});copy_properties(URI.prototype,{parse:function(uri){var m=uri.toString().match(URI.expression);copy_properties(this,{protocol:m[3]||'',domain:m[4]||'',port:m[6]||'',path:m[7]||'',query_s:m[9]||'',fragment:m[11]||''});return this;},setProtocol:function(p){this.protocol=p;return this;},getProtocol:function(){return this.protocol;},setQueryData:function(o){this.query_s=URI.implodeQuery(o);return this;},addQueryData:function(o){return this.setQueryData(copy_properties(this.getQueryData(),o));},removeQueryData:function(_L0){if(!(_L0 instanceof Array))_L0=[_L0];var _L1=this.getQueryData();for(var i=0,_L3=_L0.length;i<_L3;++i)delete _L1[_L0[i]];return this.setQueryData(_L1);},getQueryData:function(){return URI.explodeQuery(this.query_s);},setFragment:function(f){this.fragment=f;return this;},getFragment:function(){return this.fragment;},setDomain:function(d){this.domain=d;return this;},getDomain:function(){return this.domain;},setPort:function(p){this.port=p;return this;},getPort:function(){return this.port;},setPath:function(p){this.path=p;return this;},getPath:function(){return this.path.replace(/^\/+/,'/');},toString:function(){var r='';this.protocol&&(r+=this.protocol+'://');this.domain&&(r+=this.domain);this.port&&(r+=':'+this.port);if(this.domain&&!this.path)r+='/';this.path&&(r+=this.path);this.query_s&&(r+='?'+this.query_s);this.fragment&&(r+='#'+this.fragment);return r;},valueOf:function(){return this.toString();},isFacebookURI:function(){if(!URI._facebookURIRegex)URI._facebookURIRegex=new RegExp('(^|\.)facebook\.('+env_get('tlds').join('|')+')([^.]*)$','i');return !this.domain||URI._facebookURIRegex.test(this.domain);},isQuicklingEnabled:function(){return window.Quickling&&Quickling.isActive()&&Quickling.isPageActive(this);},getRegisteredDomain:function(){if(!this.domain)return '';if(!this.isFacebookURI())return null;var _L0=this.domain.split('.');var _L1=_L0.indexOf('facebook');return _L0.slice(_L1).join('.');},getTld:function(_L0){if(!this.domain)return '';var _L1=this.domain.split('.');var tld=_L1[_L1.length-1];if(_L0)return tld;var _L3=env_get('tlds');if(_L3.indexOf(tld)==-1)for(var i=0;i<_L3.length;++i){var _L5=_L3[i];if(new RegExp(_L5+'$').test(this.domain)){tld=_L5;break;}}return tld;},getUnqualifiedURI:function(){return new URI(this).setProtocol(null).setDomain(null).setPort(null);},getQualifiedURI:function(){var uri=new URI(this);if(!uri.getDomain()){var _L1=URI();uri.setProtocol(_L1.getProtocol()).setDomain(_L1.getDomain()).setPort(_L1.getPort());}return uri;},isSameOrigin:function(_L0){var uri=_L0||window.location.href;if(!(uri instanceof URI))uri=new URI(uri.toString());if(this.getProtocol()&&this.getProtocol()!=uri.getProtocol())return false;if(this.getDomain()&&this.getDomain()!=uri.getDomain())return false;return true;},coerceToSameOrigin:function(_L0){var uri=_L0||window.location.href;if(!(uri instanceof URI))uri=new URI(uri.toString());if(this.isSameOrigin(uri))return true;if(this.getProtocol()!=uri.getProtocol())return false;var dst=uri.getDomain().split('.');var src=this.getDomain().split('.');var _L4;if(uri.isFacebookURI())while((_L4=dst.pop())&&_L4==src.pop())if(_L4=='facebook'){this.setDomain(uri.getDomain());return true;}return false;},go:function(){goURI(this);},setSubdomain:function(_L0){var uri=new URI(this).getQualifiedURI();var _L2=uri.getDomain().split('.');if(_L2.length<=2){_L2.unshift(_L0);}else _L2[0]=_L0;return uri.setDomain(_L2.join('.'));},getSubdomain:function(){if(!this.getDomain())return '';var _L0=this.getDomain().split('.');if(_L0.length<=2){return '';}else return _L0[0];}});
function intl_set_xmode(_L0){(new AsyncRequest()).setURI('/ajax/intl/save_xmode.php').setData({xmode:_L0}).setHandler(function(){document.location.reload();}).send();}function intl_set_cmode(_L0){(new AsyncRequest()).setURI('/ajax/intl/save_xmode.php').setData({cmode:_L0}).setHandler(function(){document.location.reload();}).send();}function intl_set_vmode(_L0){(new AsyncRequest()).setURI('/ajax/intl/save_xmode.php').setData({vmode:_L0}).setHandler(function(){document.location.reload();}).send();}function intl_set_amode(_L0){(new AsyncRequest()).setURI('/ajax/intl/save_xmode.php').setData({amode:_L0,app:false}).setHandler(function(){document.location.reload();}).send();}function intl_set_pmode(_L0){CSS.toggleClass($('translations_nub'),'pnub');if(_L0==0){CSS.addClass($('progress_check'),'progress_hidden');CSS.removeClass($('progress_check'),'progress_shown');}else{CSS.addClass($('progress_check'),'progress_shown');CSS.removeClass($('progress_check'),'progress_hidden');}(new AsyncRequest()).setURI('/ajax/intl/save_xmode.php').setData({pmode:_L0}).setHandler(function(){}).send();}function intl_set_locale(obj,_L1,_L2){if(!_L2)var _L2=obj.options[obj.selectedIndex].value;intl_save_locale(_L2,true,null,_L1);}function intl_save_locale(_L0,_L1,_L2,_L3){new AsyncRequest().setURI('/ajax/intl/save_locale.php').setData({locale:_L0,source:_L3}).setHandler(function(_L4){if(_L1){document.location.reload();}else goURI(_L2);}).send();}function intl_toggle_beta_locale_install(obj){if(obj.checked){show($('beta_locale_install'));}else hide($('beta_locale_install'));}function intl_set_cookie_locale(_L0,uri,_L2){var _L3=getCookie('locale');new AsyncRequest().setURI('/ajax/intl/save_locale_cookie_logging.php').setData({'new_locale':_L0,'old_locale':_L3,'source':_L2}).setReadOnly(true).send();setCookie('locale',_L0,7*24*3600000);if(URI.getRequestURI().getTld()!='com'){transferCookieToComTld('locale',function(_L4){if(_L4)clearCookie('locale');goURI(uri);});}else goURI(uri);}function intl_disable_rooster_save(obj){var _L1=document.getElementById('install_translation_app');_L1.disabled=!obj.checked;var _L2=document.getElementById('install_container');if(obj.checked){_L2.style.display='block';}else _L2.style.display='none';}function intl_confirm_rooster_and_install_app(uid,_L1){goURI('/add.php?api_key=efa7a7045708fcadede8d705e39b1642');}function intl_locale_is_rtl(){return ('rtl'==CSS.getStyle(document.body,'direction'));}function intl_is_left_click(e){if(e.which==null){if(e.button<2&&!e.ctrlKey)return true;}else if(e.which<2&&!e.ctrlKey)return true;return false;}function intl_left_click_cancelBubble(e){if(intl_is_left_click(e))e.cancelBubble=true;}
function getRadioFormValue(obj){for(i=0;i<obj.length;i++)if(obj[i].checked)return obj[i].value;return null;}function get_all_form_inputs(_L0){_L0=_L0||document;return [].concat($A(DOM.scry(_L0,'input')),$A(DOM.scry(_L0,'select')),$A(DOM.scry(_L0,'textarea')),$A(DOM.scry(_L0,'button')));}function get_form_select_value(_L0){return _L0.options[_L0.selectedIndex].value;}function set_form_select_value(_L0,_L1){for(var i=0;i<_L0.options.length;++i)if(_L0.options[i].value==_L1){_L0.selectedIndex=i;break;}}function get_form_attr(_L0,_L1){var val=_L0[_L1];if(typeof val=='object'&&val.tagName=='INPUT'){var pn=val.parentNode,ns=val.nextSibling,_L5=val;pn.removeChild(_L5);val=_L0[_L1];ns?pn.insertBefore(_L5,ns):pn.appendChild(_L5);}return val;}function serialize_form_helper(_L0,_L1,_L2){var _L3=/([^\]]+)\[([^\]]*)\](.*)/.exec(_L1);if(_L3){_L0[_L3[1]]=_L0[_L3[1]]||{};if(_L3[2]==''){var i=0;while(_L0[_L3[1]][i]!=undefined)i++;}else i=_L3[2];if(_L3[3]==''){_L0[_L3[1]][i]=_L2;}else serialize_form_helper(_L0[_L3[1]],i.concat(_L3[3]),_L2);}else _L0[_L1]=_L2;}function serialize_form_fix(_L0){var _L1=[];for(var i in _L0){if(_L0 instanceof Object)_L0[i]=serialize_form_fix(_L0[i]);_L1.push(i);}var j=0,_L4=true;_L1.sort().each(function(i){if(i!=j++)_L4=false;});if(_L4){var ret={};_L1.each(function(i){ret[i]=_L0[i];});return ret;}else return _L0;}function serialize_form(obj,_L1){var _L2={};var _L3=obj.tagName=='FORM'?obj.elements:get_all_form_inputs(obj);for(var i=_L3.length-1;i>=0;i--)if(_L3[i].name&&!_L3[i].disabled)if(!_L3[i].type||((_L3[i].type=='radio'||_L3[i].type=='checkbox')&&_L3[i].checked)||_L3[i].type=='text'||_L3[i].type=='password'||_L3[i].type=='hidden'||_L3[i].tagName=='TEXTAREA'||_L3[i].tagName=='BUTTON'||_L3[i].tagName=='SELECT')serialize_form_helper(_L2,_L3[i].name,_L3[i].value);if(_L1&&'submit'==_L1.type&&DOM.contains(obj,_L1)&&_L1.isNode(['input','button']))serialize_form_helper(_L2,_L1.name,_L1.value);return serialize_form_fix(_L2);}function do_post(uri){var _L1=/(^([^?])+)\??(.*)$/.exec(uri.toString());var _L2=document.createElement('form');_L2.action=_L1[1];_L2.method='post';_L2.style.display='none';var _L3=/([\w]+)(?:=([^&]+)|&|$)/g;var _L4=null;if(ge('post_form_id'))_L1[3]+='&post_form_id='+$('post_form_id').value;while(_L4=_L3.exec(_L1[3])){var _L5=document.createElement('input');_L5.type='hidden';_L5.name=decodeURIComponent(_L4[1]);_L5.value=decodeURIComponent(_L4[2]);_L2.appendChild(_L5);}DOM.getRootElement().appendChild(_L2);_L2.submit();return false;}function dynamic_post(uri,_L1,_L2){var _L3=document.createElement('form');_L3.action=uri.toString();_L3.method='POST';_L3.style.display='none';if(_L2)_L3.target=_L2;if(ge('post_form_id'))_L1['post_form_id']=$('post_form_id').value;_L1['post_form_id_source']='dynamic_post';_L1['next']=htmlspecialchars(document.location.href);create_hidden_inputs(_L1,_L3);DOM.getRootElement().appendChild(_L3);_L3.submit();return false;}function create_hidden_inputs(_L0,_L1,_L2,_L3){_L2=_L2||{};var _L4;var _L5=URI.implodeQuery(_L0,'',false);var _L6=_L5.split('&');for(var i=0;i<_L6.length;i++)if(_L6[i]){var _L8=_L6[i].split('=');var n=_L8[0];var v=_L8[1];if(n===undefined||v===undefined)continue;v=URI.decodeComponent(v);if(_L2[n]&&_L3){_L2[n].value=v;}else{_L4=$N('input',{type:'hidden',name:n,value:v});_L2[n]=_L4;_L1.appendChild(_L4);}}return _L2;}
function KeyEventController(){copy_properties(this,{handlers:{}});document.onkeyup=this.onkeyevent.bind(this,'onkeyup');document.onkeydown=this.onkeyevent.bind(this,'onkeydown');document.onkeypress=this.onkeyevent.bind(this,'onkeypress');}copy_properties(KeyEventController,{instance:null,getInstance:function(){return KeyEventController.instance||(KeyEventController.instance=new KeyEventController());},defaultFilter:function(_L0,_L1){_L0=$E(_L0);return KeyEventController.filterEventTypes(_L0,_L1)&&KeyEventController.filterEventTargets(_L0,_L1)&&KeyEventController.filterEventModifiers(_L0,_L1);},filterEventTypes:function(_L0,_L1){if(_L1==='onkeydown')return true;return false;},filterEventTargets:function(_L0,_L1){var _L2=$E(_L0).getTarget();if(DOM.isNode(_L2,['input','select','textarea','object','embed']))if(_L2.type!='checkbox'&&_L2.type!='radio')return false;return true;},filterEventModifiers:function(_L0,_L1){if(_L0.ctrlKey||_L0.altKey||_L0.metaKey||_L0.repeat)return false;return true;},registerKey:function(key,_L1,_L2){if(_L2===undefined)_L2=KeyEventController.defaultFilter;var ctl=KeyEventController.getInstance();var eqv=ctl.mapKey(key);if(is_empty(ctl.handlers))onunloadRegister(ctl.resetHandlers.bind(ctl));for(var ii=0;ii<eqv.length;ii++){key=eqv[ii];if(!ctl.handlers[key])ctl.handlers[key]=[];ctl.handlers[key].push({callback:_L1,filter:_L2});}},keyCodeMap:{'[':[219],']':[221],'`':[192],'LEFT':[KEYS.LEFT,63234],'RIGHT':[KEYS.RIGHT,63235],'RETURN':[KEYS.RETURN],'TAB':[KEYS.TAB],'DOWN':[KEYS.DOWN,63233],'UP':[KEYS.UP,63232],'ESCAPE':[KEYS.ESC]}});copy_properties(KeyEventController.prototype,{mapKey:function(k){if(typeof(k)=='number')return [k];if(KeyEventController.keyCodeMap[k.toUpperCase()])return KeyEventController.keyCodeMap[k.toUpperCase()];var l=k.charCodeAt(0);var u=k.toUpperCase().charCodeAt(0);if(l!=u)return [l,u];return [l];},onkeyevent:function(_L0,e){e=$E(e);var evt=null;var _L3=this.handlers[e.keyCode];var _L4,_L5,_L6;if(_L3)for(var ii=0;ii<_L3.length;ii++){_L4=_L3[ii].callback;_L5=_L3[ii].filter;try{if(!_L5||_L5(e,_L0)){_L6=_L4(e,_L0);if(_L6===false)return Event.kill(e);}}catch(exception){Util.error('Uncaught exception in key handler: %x',exception);}}return true;},resetHandlers:function(){this.handlers={};}});
function Rect(t,r,b,l,_L4){if(this===window){if(t instanceof Rect)return t;if(t instanceof Vector2)return new Rect(t.y,t.x,t.y,t.x,t.domain);return Rect.getElementBounds($(t));}copy_properties(this,{t:t,r:r,b:b,l:l,domain:_L4||'pure'});}copy_properties(Rect.prototype,{w:function(){return this.r-this.l;},h:function(){return this.b-this.t;},area:function(){return this.w()*this.h();},toString:function(){return '(('+this.l+', '+this.t+'), ('+this.r+', '+this.b+'))';},intersects:function(v){v=Rect(v).convertTo(this.domain);var u=this;if(u.l>v.r||v.l>u.r||u.t>v.b||v.t>u.b)return false;return true;},clipTo:function(_L0){_L0=_L0.convertTo(this.domain);if(!this.intersects(_L0))return null;return new Rect(Math.max(this.t,_L0.t),Math.min(this.r,_L0.r),Math.min(this.b,_L0.b),Math.max(this.l,_L0.l),this.domain);},contains:function(v){v=Rect(v).convertTo(this.domain);var u=this;if(v instanceof Vector2){return (u.l<=v.x&&u.r>=v.x&&u.t<=v.y&&u.b>=v.y);}else return (u.l<=v.l&&u.r>=u.r&&u.t<=v.t&&u.b>=v.b);},canContain:function(v){v=Rect(v).convertTo(this.domain);return (v.h()<=this.h())&&(v.w()<=this.w());},forceBelow:function(v,min){min=min||0;v=Rect(v).convertTo(this.domain);if(v.b>this.t)return this.add(0,(v.b-this.t)+min);return this;},add:function(vx,vy){if(arguments.length==1){if(vx.domain!='pure')vx=vx.convertTo(this.domain);return this.add(vx.x,vx.y);}var dx=parseFloat(vx);var dy=parseFloat(vy);return new Rect(this.t+dy,this.r+dx,this.b+dy,this.l+dx,this.domain);},sub:function(vx,vy){if(arguments.length==1){return this.add(vx.mul(-1));}else return this.add(-vx,-vy);},expand:function(x,y){return new Rect(this.t,this.r+x,this.b+y,this.l,this.domain);},scale:function(x,y){y=y||x;return new Rect(this.t,this.l+(this.w()*x),this.t+(this.h()*y),this.l,this.domain);},setDimensions:function(x,y){return new Rect(this.t,this.l+x,this.t+y,this.l,this.domain);},setPosition:function(x,y){return new Rect(x,this.w(),this.h(),y,this.domain);},boundWithin:function(v){var x=0,y=0;if(this.l<v.l){x=v.l-this.l;}else if(this.r>v.r)x=v.r-this.r;if(this.t<v.t){y=v.t-this.t;}else if(this.b>v.b)y=v.b-this.b;return this.add(x,y);},setElementBounds:function(el){this.getPositionVector().setElementPosition(el);this.getDimensionVector().setElementDimensions(el);return this;},getPositionVector:function(){return new Vector2(this.l,this.t,this.domain);},getDimensionVector:function(){return new Vector2(this.w(),this.h(),'pure');},convertTo:function(_L0){if(this.domain==_L0)return this;if(_L0=='pure')return new Rect(this.t,this.r,this.b,this.l,'pure');if(this.domain=='pure'){Util.error('Unable to convert a pure rect to %q coordinates.',_L0);return new Rect(0,0,0,0);}var p=new Vector2(this.l,this.t,this.domain).convertTo(_L0);return new Rect(p.y,p.x+this.w(),p.y+this.h(),p.x,_L0);},constrict:function(x,y){if(typeof(y)=='undefined')y=x;x=x||0;return new Rect(this.t+y,this.r-x,this.b-y,this.l+x,this.domain);},expandX:function(){return new Rect(this.t,Number.POSITIVE_INFINITY,this.b,Number.NEGATIVE_INFINITY);},expandY:function(){return new Rect(number.NEGATIVE_INFINITY,this.r,Number.POSITIVE_INFINITY,this.l);},drawBox:function(_L0){var d=$N('div',{style:{position:'absolute',border:'2px solid '+(_L0||'red'),zIndex:'10000'}});this.setElementBounds(d);document.body.appendChild(d);}});copy_properties(Rect,{newFromVectors:function(pos,dim){return new Rect(pos.y,pos.x+dim.x,pos.y+dim.y,pos.x,pos.domain);},getElementBounds:function(el){return Rect.newFromVectors(Vector2.getElementPosition(el),Vector2.getElementDimensions(el));},getViewportBounds:function(){return Rect.newFromVectors(Vector2.getScrollPosition(),Vector2.getViewportDimensions());},getDocumentBounds:function(){return Rect.newFromVectors(new Vector2(0,0,'document'),Vector2.getDocumentDimensions());}});
function Dialog(_L0){Dialog._setup();this._show_loading=true;this._loading_text=null;this._auto_focus=true;this._fade_enabled=true;this._onload_handlers=[];this._top=125;this._content=null;this._obj=null;this._popup=null;this._overlay=null;this._iframe=null;this._hidden_objects=[];if(_L0)this._setFromModel(_L0);}copy_properties(Dialog,{OK:{name:'ok',label:_tx("OK")},CANCEL:{name:'cancel',label:_tx("Avbryt"),className:'inputaux'},CLOSE:{name:'close',label:_tx("Lat att")},NEXT:{name:'next',label:_tx("Neste")},SAVE:{name:'save',label:_tx("Lagre")},SUBMIT:{name:'submit',label:_tx("Send")},CONFIRM:{name:'confirm',label:_tx("Stadfest")},DELETE:{name:'delete',label:_tx("Slett")}});copy_properties(Dialog,{OK_AND_CANCEL:[Dialog.OK,Dialog.CANCEL],_STANDARD_BUTTONS:[Dialog.OK,Dialog.CANCEL,Dialog.CLOSE,Dialog.SAVE,Dialog.SUBMIT,Dialog.CONFIRM,Dialog.DELETE],SHOULD_HIDE_OBJECTS:!ua.windows(),MODALITY:{DARK:'dark',WHITE:'white'},SHOULD_USE_IFRAME:ua.ie()<7||(ua.osx()&&ua.firefox()),dialogStack:null,newButton:function(_L0,_L1,_L2,_L3){var _L4={name:_L0,label:_L1};if(_L2)_L4.className=_L2;if(_L3)_L4.handler=_L3;return _L4;},getCurrent:function(){var _L0=Dialog.dialogStack;if(!_L0||!_L0.length)return null;return _L0[_L0.length-1];},createConfirmationDialog:function(_L0,_L1,_L2,_L3){_L2=_L2||Dialog.CONFIRM;return new Dialog().setClassName('confirm_dialog').setTitle(_L1||_tx("Confirmation Required")).setBody(_L0||_tx("Are you sure you want to perform this action?")).setButtons([_L2,Dialog.CANCEL]).setCancelHandler(_L3||bagofholding).setModal();},bootstrap:function(uri,_L1,_L2,_L3,_L4){_L1=_L1||{};copy_properties(_L1,new URI(uri).getQueryData());_L3=_L3||(_L2?'GET':'POST');var _L5=new Dialog(_L4).setAsync(new AsyncRequest().setURI(uri).setData(_L1).setReadOnly(!!_L2).setMethod(_L3));_L5.show();return false;},showFormAjax:function(_L0,uri,_L2,_L3){var _L4='dialog_ajax_form__'+gen_unique();var _L5=new Dialog().setTitle(_L0).setShowLoading(true).show();var _L6=function(_Lb){if(_Lb.getError()!=true){_L5.hide();ErrorDialog.showAsyncError(_Lb);}else _L5.setBody(_Lb.getPayload()).setButtons(Dialog.OK).clearHandler().show();};var _L7=function(_Lb){var _Lc='<form id="'+_L4+'" onsubmit="return false;">'+_Lb.getPayload()+'</form>';var _Ld=[Dialog.newButton(_L2.toLowerCase(),_L2),Dialog.CANCEL];_L5.setBody(_Lc).setButtons(_Ld).setHandler(_L8).show();};var _L8=function(){new AsyncRequest().setURI(uri).setData(serialize_form(ge(_L4))).setHandler(_L9).setErrorHandler(_La).send();};var _L9=function(_Lb){_L5.setBody(_Lb.getPayload()).setButtons([Dialog.OK]).show();if(_L3){window.location.reload();}else _L5.setAutohide(750);};var _La=function(_Lb){if(_Lb.getError()==kError_Global_ValidationError){_L7(_Lb);}else if(_Lb.getError()!=true){ErrorDialog.showAsyncError(_Lb);}else _L6(_Lb);};new AsyncRequest().setURI(uri).setReadOnly(true).setHandler(_L7).setErrorHandler(_L6).send();},_basicMutator:function(_L0){return function(_L1){this[_L0]=_L1;this._dirty();return this;};},_findButton:function(_L0,_L1){for(var i=0;i<_L0.length;++i)if(_L0[i].name==_L1)return _L0[i];return null;},_setup:function(){if(Dialog._is_set_up)return;Dialog._is_set_up=true;var _L0=function(_L1,_L2){return _L2=='onkeyup'&&KeyEventController.filterEventModifiers(_L1,_L2);};KeyEventController.registerKey('ESCAPE',Dialog._handleEscapeKey,_L0);},_hideAll:function(){if(Dialog.dialogStack!==null&&Dialog.dialogStack.length){var _L0=Dialog.dialogStack.clone();Dialog.dialogStack=null;for(var i=_L0.length-1;i>=0;i--)_L0[i].hide();}},_handleEscapeKey:function(_L0,_L1){var _L2=Dialog.getCurrent();if(!_L2)return true;var _L3=_L2._semi_modal;var _L4=_L2._buttons;if(!_L4&&!_L3)return true;if(_L3&&!_L4){_L2.hide();return true;}var _L5=Dialog._findButton(_L4,'cancel');if(_L5){var _L6=_L5;}else if(_L4.length==1){var _L6=_L4[0];}else return true;_L2._handleButton(_L6);return false;},call_or_eval:function(obj,func,args){if(!func)return undefined;args=args||{};if(typeof(func)=='string'){var params=keys(args).join(', ');func=eval('({f: function('+params+') { '+func+'}})').f;}return func.apply(obj,values(args));}});copy_properties(Dialog.prototype,{show:function(_L0){this._showing=true;if(_L0){if(this._overlay)this._overlay.style.display='';if(this._iframe)this._iframe.style.display='';this._obj.style.display='';}else this._dirty();return this;},showLoading:function(){this._renderDialog($N('div',{className:'dialog_loading'},this._loading_text||_tx("Lastar inn...")));return this;},hide:function(_L0){if(!this._showing)return this;this._showing=false;if(this._autohide_timeout){clearTimeout(this._autohide_timeout);this._autohide_timeout=null;}if(this._fade_enabled&&(!Dialog.dialogStack||Dialog.dialogStack.length<=1)){this._fadeOut(_L0);}else this._hide(_L0);return this;},fade_out:function(_L0){this.setAutohide(_L0);return this;},getRoot:function(){return this._obj;},getButtonElement:function(_L0){if(typeof _L0=='string')_L0=Dialog._findButton(this._buttons,_L0);if(!_L0||!_L0.name)return null;var _L1=DOM.scry(this._popup,'input');var _L2=function(_L3){return _L3.name==_L0.name;};return _L1.filter(_L2)[0]||null;},getFormData:function(){var _L0=DOM.scry(this._content,'div.dialog_content');if(_L0.length!=1)Util.error(_L0.length+" dialog_content divs in this dialog?  Weird.");return serialize_form(_L0[0]);},setShowing:function(){this.show();return this;},setHiding:function(){this.hide();return this;},setTitle:Dialog._basicMutator('_title'),setBody:Dialog._basicMutator('_body'),setExtraData:Dialog._basicMutator('_extra_data'),setShowLoading:Dialog._basicMutator('_show_loading'),setLoadingText:Dialog._basicMutator('_loading_text'),setFullBleed:Dialog._basicMutator('_full_bleed'),setImmediateRendering:Dialog._basicMutator('_immediate_rendering'),setUserData:Dialog._basicMutator('_user_data'),getUserData:function(){return this._user_data;},setAutohide:function(_L0){if(_L0){if(this._showing){this._autohide_timeout=setTimeout(this.hide.shield(this),_L0);}else this._autohide=_L0;}else{this._autohide=null;if(this._autohide_timeout){clearTimeout(this._autohide_timeout);this._autohide_timeout=null;}}return this;},setSummary:Dialog._basicMutator('_summary'),setButtons:function(b){var _L1;if(!(b instanceof Array)){_L1=arrayize(arguments);}else _L1=b;if(this._buttons&&!this._is_dirty&&are_equal(_L1,this._buttons))return this;for(var i=0;i<_L1.length;++i)if(typeof _L1[i]=='string'){var _L3=Dialog._findButton(Dialog._STANDARD_BUTTONS,_L1[i]);if(!_L3)Util.error('Unknown button: '+_L1[i]);_L1[i]=_L3;}this._buttons=_L1;this._dirtyButtons();return this;},setButtonsMessage:Dialog._basicMutator('_buttons_message'),setStackable:function(_L0,_L1){this._is_stackable=_L0;this._shown_while_stacked=_L0&&_L1;return this;},setHandler:function(_L0){this._handler=_L0;return this;},setCancelHandler:function(_L0){this._cancelHandler=_L0;return this;},setCloseHandler:function(_L0){this._close_handler=Dialog.call_or_eval.bind(null,this,_L0);return this;},clearHandler:function(){return this.setHandler(null);},setPostURI:function(_L0,_L1){if(_L1===undefined)_L1=true;if(_L1){this.setHandler(this._submitForm.bind(this,'POST',_L0));}else this.setHandler(function(){dynamic_post(_L0,this.getFormData());this.hide();}.bind(this));return this;},setGetURI:function(_L0){this.setHandler(this._submitForm.bind(this,'GET',_L0));return this;},setModal:function(_L0,_L1){if(_L0===undefined)_L0=true;if(this._showing&&this._modal&&!_L0)Util.error("At the moment we don't support un-modal-ing a modal dialog");if(_L0&&_L1)switch(_L1){case Dialog.MODALITY.DARK:this._modal_class='dark_dialog_overlay';break;case Dialog.MODALITY.WHITE:this._modal_class='light_dialog_overlay';break;}this._modal=_L0;return this;},setSemiModal:function(_L0){if(_L0===undefined)_L0=true;if(_L0)this.setModal(true,Dialog.MODALITY.DARK);this._semi_modal=_L0;return this;},setContentWidth:Dialog._basicMutator('_content_width'),setTitleLoading:function(_L0){if(_L0===undefined)_L0=true;var _L1=DOM.find(this._popup,'h2.dialog_title');if(_L1)CSS.conditionClass(_L1,'loading',_L0);return this;},setClassName:Dialog._basicMutator('_class_name'),setFading:Dialog._basicMutator('_fade_enabled'),setFooter:Dialog._basicMutator('_footer'),setAutoFocus:Dialog._basicMutator('_auto_focus'),setTop:Dialog._basicMutator('_top'),onloadRegister:function(_L0){arrayize(_L0).forEach(function(i){if(typeof i=='string')i=new Function(i);this._onload_handlers.push(i.bind(this));}.bind(this));return this;},setAsyncURL:function(url){return this.setAsync(new AsyncRequest(url));},setAsync:function(_L0){var _L1=function(_L4){if(this._async_request!=_L0)return;this._async_request=null;var _L5=_L4.getPayload();if(typeof _L5=='string'){this.setBody(_L5);}else this._setFromModel(_L5);this._update(true);}.bind(this);var _L2=_L0.getData();_L2.__d=1;_L0.setData(_L2);var _L3=bind(this,'hide');_L0.setHandler(chain(_L0.getHandler(),_L1)).setErrorHandler(chain(_L3,_L0.getErrorHandler())).setTransportErrorHandler(chain(_L3,_L0.getTransportErrorHandler())).send();this._async_request=_L0;this._dirty();return this;},_dirty:function(){if(!this._is_dirty){this._is_dirty=true;if(this._immediate_rendering){this._update();}else bind(this,'_update').defer();}},_dirtyButtons:function(){if(this._immediate_rendering){this._updateButtons();}else bind(this,'_updateButtons').defer();},_format:function(_L0){if(typeof _L0=='string')return HTML(_L0).setDeferred(true);return _L0;},_update:function(_L0){if(!this._is_dirty&&_L0!==true)return;this._is_dirty=false;if(!this._showing)return;if(this._autohide&&!this._async_request&&!this._autohide_timeout)this._autohide_timeout=setTimeout(bind(this,'hide'),this._autohide);if(!this._async_request||!this._show_loading){var _L1=[];if(this._summary)_L1.push($N('div',{className:'dialog_summary'},this._format(this._summary)));_L1.push($N('div',{className:'dialog_body'},this._format(this._body)));var _L2=this._getButtonContent();if(_L2.length)_L1.push($N('div',{className:'dialog_buttons'},_L2));if(this._footer)_L1.push($N('div',{className:'dialog_footer'},this._format(this._footer)));_L1=$N('div',{className:'dialog_content'},_L1);if(this._title){var _L3=$N('h2',{className:'dialog_title'},$N('span',this._format(this._title)));_L1=[_L3,_L1];}else _L1=[_L1];this._renderDialog(_L1);for(var i=0;i<this._onload_handlers.length;++i)try{this._onload_handlers[i]();}catch(ex){Util.error('Uncaught exception in dialog onload hook: %x',ex);}this._onload_handlers=[];}else this.showLoading();if(this._content_width)this._popup.style.width=(this._content_width+42)+'px';if(this._modal&&!this._overlay)this._buildOverlay();},_updateButtons:function(){if(!this._showing)return;var _L0=this._getButtonContent();var _L1=$N('div',{className:'dialog_buttons'},_L0);var _L2=DOM.scry(this._content,'div.dialog_buttons')[0]||null;if(!_L2){var _L3=DOM.scry(this._content,'div.dialog_body')[0]||null;if(_L3)DOM.insertAfter(_L3,_L1);return;}DOM.replace(_L2,_L1);},_getButtonContent:function(){var _L0=[];if((this._buttons&&this._buttons.length>0)||this._buttons_message){var _L0=[];if(this._buttons_message)_L0.push($N('div',{className:'dialog_buttons_msg'},this._format(this._buttons_message)));if(this._buttons)for(var i=0;i<this._buttons.length;i++){var _L2=this._buttons[i];var _L3=$N('input',{className:'inputsubmit',type:'button',name:_L2.name||'',value:_L2.label});CSS.addClass(_L3,_L2.className);_L3.listen('click',this._handleButton.bind(this,_L2.name));_L0.push(_L3);}}return _L0;},_shouldUseIframe:function(){return Dialog.SHOULD_USE_IFRAME||(this._modal&&ua.ie()==7);},_renderDialog:function(_L0){if(Dialog.dialogStack===null)onunloadRegister(Dialog._hideAll,true);if(!this._obj)this._buildDialog();if(this._class_name)CSS.addClass(this._obj,this._class_name);CSS.conditionClass(this._obj,'full_bleed',this._full_bleed);if(typeof _L0=='string')_L0=HTML(_L0).setDeferred(this._immediate_rendering!==true);DOM.setContent(this._content,_L0);var _L1=this._content.getElementsByTagName('img');for(var i=0;i<_L1.length;i++)_L1[i].onload=chain(_L1[i].onload,this._hideObjects.bind(this));this._showDialog();if(this._auto_focus)this._focusFirstTextboxOrButton.bind(this).defer();return this;},_buildDialog:function(){this._obj=$N('div',{className:'generic_dialog'});this._obj.style.display='none';if(this._immediate_rendering){DOM.getRootElement().appendChild(this._obj);}else onloadRegister(function(){DOM.getRootElement().appendChild(this._obj);}.bind(this));if(this._shouldUseIframe())this._buildIframe();if(!this._popup)this._popup=$N('div',{className:'generic_dialog_popup'});this._popup.style.left=this._popup.style.top='';this._obj.appendChild(this._popup);if(this._modal)this._buildOverlay();this._buildDialogContent();},_showDialog:function(){if(this._obj&&this._obj.style.display){this._obj.style.visibility='hidden';this._obj.style.display='';this._resetDialog();this._obj.style.visibility='';this._obj.dialog=this;}else this._resetDialog();this._hideObjects();clearInterval(this.active_hiding);this.active_hiding=setInterval(this._activeResize.bind(this),500);if(!Dialog.dialogStack)Dialog.dialogStack=[];var _L0=Dialog.dialogStack;if(_L0.length){var _L1=_L0[_L0.length-1];if(_L1!=this&&!_L1._is_stackable)_L1._hide();for(var i=_L0.length-1;i>=0;i--)if(_L0[i]==this){_L0.splice(i,1);}else if(!_L0[i]._shown_while_stacked)_L0[i]._hide(true);}_L0.push(this);return this;},_activeResize:function(){if(this.last_offset_height!=this._content.offsetHeight){this._hideObjects();this.last_offset_height=this._content.offsetHeight;}},_hideObjects:function(){var _L0=[],_L1=[];var _L2=Rect.getElementBounds(this._content);var _L3=[].concat($A(DOM.scry(document.body,'embed')),$A(DOM.scry(document.body,'object')));for(var i=0;i<_L3.length;i++)if(Dialog.SHOULD_HIDE_OBJECTS||(_L3[i].getAttribute('wmode')||'').toLowerCase()!='transparent')_L1.push(_L3[i]);for(var i=0;i<_L1.length;i++){var _L5=_L1[i].offsetHeight?_L1[i]:_L1[i].parentNode;var _L6=Rect.getElementBounds(_L5);if(!DOM.contains(this._content,_L1[i])&&_L2.intersects(_L6)&&this._hidden_objects.indexOf(_L5)==-1)_L0.push(_L5);}for(var i=0;i<_L0.length;i++){this._hidden_objects.push(_L0[i]);_L0[i].style.visibility='hidden';}},_buildDialogContent:function(){CSS.addClass(this._obj,'pop_dialog');if(intl_locale_is_rtl())CSS.addClass(this._obj,'pop_dialog_rtl');var _L0;if(ua.ie()<=6){_L0='<div class="pop_squarecontainer">'+'<div class="pop_squareborder pop_borderopacity"></div>'+'<div class="pop_content pop_content_old" id="pop_content"></div>'+'</div>';}else if(ua.firefox()>=3||ua.safari()>=3){_L0='<div class="pop_container_advanced">'+'<div class="pop_content" id="pop_content"></div>'+'</div>';}else _L0='<div class="pop_container">'+'<div class="pop_verticalslab"></div>'+'<div class="pop_horizontalslab"></div>'+'<div class="pop_topleft"></div>'+'<div class="pop_topright"></div>'+'<div class="pop_bottomright"></div>'+'<div class="pop_bottomleft"></div>'+'<div class="pop_content pop_content_old" id="pop_content"></div>'+'</div>';set_inner_html(this._popup,_L0);this._frame=DOM.find(this._popup,'div.pop_content');this._content=this._frame;},_buildIframe:function(){if(!this._iframe&&!(this._iframe=ge('generic_dialog_iframe')))this._iframe=$N('iframe',{id:'generic_dialog_iframe',src:'/common/blank.html'});this._iframe.frameBorder='0';onloadRegister(function(){DOM.getRootElement().appendChild(this._iframe);}.bind(this));},_buildOverlay:function(){this._overlay=$N('div',{id:'generic_dialog_overlay'});if(this._modal_class)CSS.addClass(this._overlay,this._modal_class);if(this._semi_modal)Event.listen(this._overlay,'click',this.hide.bind(this));if(ua.ie()<7)this._overlay.style.height=Vector2.getDocumentDimensions().y+'px';onloadRegister(function(){DOMScroll.getScrollRoot().appendChild(this._overlay);}.bind(this));},_focusFirstTextboxOrButton:function(){var _L0=['input[type="text"]','textarea','input[type="password"]','input[type="button"]','input[type="submit"]'];var _L1=[];for(var ii=0;ii<_L0.length&&_L1.length==0;ii++)_L1=DOM.scry(this._content,_L0[ii]);if(_L1.length>0){var _L3=_L1[0];try{if(elementY(_L3)>0&&elementX(_L3)>0)_L3.focus();}catch(e){}}return true;},_resetDialog:function(){if(!this._popup)return;onloadRegister(function(){this._resetDialogObj();this._resetIframe();}.bind(this));},_resetIframe:function(){if(!this._shouldUseIframe())return;if(this.modal){this._iframe.style.left='0px';this._iframe.style.top='0px';this._iframe.style.width='100%';var _L0=Math.max(10000,Vector2.getDocumentDimensions().y);this._iframe.style.height=_L0+'px';}else{Vector2.getElementDimensions(this._frame).setElementDimensions(this._iframe);Vector2.getElementPosition(this._frame).setElementPosition(this._iframe);}this._iframe.style.display='';},_resetDialogObj:function(){var _L0=this._popup.find('div.pop_content');var _L1=Vector2.getScrollPosition().y;var _L2=Vector2.getViewportDimensions().y;var top=_L1+this._top+'px';if(_L2<=400){this._popup.style.top='20px';return;}if(this._top+_L0.clientHeight>_L2){var _L4=Math.max(_L2-_L0.clientHeight,0);top=((_L4/2)+_L1)+'px';}this._popup.style.top=top;},_fadeOut:function(_L0){if(!this._popup)return;try{animation(this._obj).duration(0).checkpoint().to('opacity',0).hide().duration(250).ondone(this._hide.bind(this,_L0)).go();}catch(e){this._hide(_L0);}},_hide:function(_L0){if(this._obj)this._obj.style.display='none';if(this._overlay)this._overlay.style.display='none';if(this._iframe)this._iframe.style.display='none';if(this.timeout){clearTimeout(this.timeout);this.timeout=null;}if(this._hidden_objects.length){for(var i=0,il=this._hidden_objects.length;i<il;i++)this._hidden_objects[i].style.visibility='';this._hidden_objects=[];}clearInterval(this.active_hiding);if(_L0)return;this.destroy();},destroy:function(){if(Dialog.dialogStack&&Dialog.dialogStack.length){var _L0=Dialog.dialogStack;for(var i=_L0.length-1;i>=0;i--)if(_L0[i]==this)_L0.splice(i,1);if(_L0.length)_L0[_L0.length-1]._showDialog();}if(this._obj){DOM.remove(this._obj);this._obj=null;}if(this._close_handler)this._close_handler();},_handleButton:function(_L0){if(typeof _L0=='string')_L0=Dialog._findButton(this._buttons,_L0);if(!_L0){Util.error('Huh?  How did this button get here?');return;}var _L1=Dialog.call_or_eval(_L0,_L0.handler);if(_L1===false)return;if(_L0==Dialog.CANCEL){Dialog.call_or_eval(this,this._cancelHandler);}else if(Dialog.call_or_eval(this,this._handler,{button:_L0})===false)return;this.hide();},_submitForm:function(_L0,uri,_L2){var _L3=this.getFormData();_L3[_L2.name]=_L2.label;if(this._extra_data)copy_properties(_L3,this._extra_data);var _L4=new AsyncRequest().setURI(uri).setData(_L3).setMethod(_L0).setReadOnly(_L0=='GET');this.setAsync(_L4);return false;},_setFromModel:function(_L0){for(var _L1 in _L0){if(_L1=='onloadRegister'){this.onloadRegister(_L0[_L1]);continue;}var _L2=this['set'+_L1.substr(0,1).toUpperCase()+_L1.substr(1)];if(!_L2){Util.error("Unknown Dialog property: "+_L1);}else _L2.apply(this,arrayize(_L0[_L1]));}}});function ContextualDialog(_L0){this.parent.construct(this);}ContextualDialog.extend('Dialog');copy_properties(ContextualDialog,{ARROW_PADDING_X:5,ARROW_PADDING_Y:10,ARROW_WIDTH:13,_bottoms:[0],max_bottom:0,_updateMaxBottom:function(){ContextualDialog.max_bottom=Math.max.apply(Math,ContextualDialog._bottoms);}});ContextualDialog.prototype={setContext:Dialog._basicMutator('_context'),_buildDialogContent:function(){CSS.addClass(this._obj,'contextual_dialog');set_inner_html(this._popup,'<div class="contextual_arrow"><span>^_^keke1</span></div><div class="contextual_dialog_content"></div>');this._arrow=DOM.find(this._popup,'div.contextual_arrow');this._content=this._frame=DOM.find(this._popup,'div.contextual_dialog_content');},_resetDialogObj:function(){if(!this._context)return;var _L0=Vector2.getElementPosition(this._context);var _L1=DOMScroll.getScrollRoot().offsetWidth;var _L2=(_L1-this._popup.offsetWidth)/2;var _L3,_L4;if(_L0.x<_L1/2){this._arrow.className='contextual_arrow_rev';_L3=Math.min(_L2,_L0.x+this._context.offsetWidth-ContextualDialog.ARROW_PADDING_X);_L4=_L0.x-_L3+this._context.offsetWidth+ContextualDialog.ARROW_PADDING_X;}else{this._arrow.className='contextual_arrow';_L3=Math.max(_L2,_L0.x-this._popup.offsetWidth+ContextualDialog.ARROW_PADDING_X);_L4=_L0.x-_L3-ContextualDialog.ARROW_PADDING_X-ContextualDialog.ARROW_WIDTH;}_L3=_L3||0;_L4=_L4||0;new Vector2(_L3,_L0.y+this._context.offsetHeight-this._arrow.offsetHeight+ContextualDialog.ARROW_PADDING_Y,'document').setElementPosition(this._popup);this._arrow.style.backgroundPosition=_L4+'px';},_renderDialog:function(_L0){if(window!=top)this._auto_focus=false;this.parent._renderDialog(_L0);var _L1=Vector2.getElementDimensions(this._content).y+Vector2.getElementPosition(this._content).y;ContextualDialog._bottoms.push(_L1);this._bottom=_L1;ContextualDialog._updateMaxBottom();},_hide:function(){this.parent._hide();if(this._bottom){var bs=ContextualDialog._bottoms;bs.splice(bs.indexOf(this._bottom),1);ContextualDialog._updateMaxBottom();}}};function ErrorDialog(){this.parent.construct(this);this.setClassName('errorDialog').setModal(true);this.setStackable(true);return this;}ErrorDialog.extend('Dialog');copy_properties(ErrorDialog,{showAsyncError:function(_L0){if(window.send_error_signal){var vip=env_get('vip');if(vip===undefined)vip='-';send_error_signal('async_error',_L0.getError()+":"+vip);}try{return (new ErrorDialog()).showError(_L0.getErrorSummary(),_L0.getErrorDescription());}catch(ex){aiert(_L0);}}});copy_properties(ErrorDialog.prototype,{showError:function(_L0,_L1){return this.setTitle(_L0).setBody(_L1).setButtons([Dialog.OK]).show();}});var DialogBootstrapEndpoints={LIST_EDITOR:'/friends/ajax/edit_list.php',EDIT_APPS_DIALOG:'/ajax/editapp_dialog.php'};function BorderlessDialog(_L0){this.parent.construct(this);this._auto_focus=false;}BorderlessDialog.extend('Dialog');BorderlessDialog.prototype={setContext:Dialog._basicMutator('_context'),_buildDialogContent:function(){CSS.addClass(this._obj,'borderless_dialog');set_inner_html(this._popup,'<div class="borderless_dialog_content"></div>');this._content=this._frame=DOM.find(this._popup,'div.borderless_dialog_content');},_resetDialogObj:function(){if(!this._context)return;var _L0=Vector2.getElementPosition(this._context);var _L1=DOMScroll.getScrollRoot().offsetWidth;var _L2=(_L1-this._popup.offsetWidth)/2;var _L3;if(_L0.x<_L1/2){_L3=Math.min(_L2,_L0.x+this._context.offsetWidth);}else _L3=Math.max(_L2,_L0.x-this._popup.offsetWidth);_L3=_L3||0;new Vector2(_L3,_L0.y+this._context.offsetHeight,'document').setElementPosition(this._popup);}};
function escapeURI(u){if(encodeURIComponent)return encodeURIComponent(u);if(escape)return escape(u);}function htmlspecialchars(_L0){if(typeof(_L0)=='undefined'||_L0===null||!_L0.toString)return '';if(_L0===false){return '0';}else if(_L0===true)return '1';return _L0.toString().replace(/&/g,'&amp;').replace(/"/g,'&quot;').replace(/'/g,'&#039;').replace(/</g,'&lt;').replace(/>/g,'&gt;');}function htmlize(_L0){return htmlspecialchars(_L0).replace(/\n/g,'<br />');}function escape_js_quotes(_L0){if(typeof(_L0)=='undefined'||!_L0.toString)return '';return _L0.toString().replace(/\\/g,'\\\\').replace(/\n/g,'\\n').replace(/\r/g,'\\r').replace(/"/g,'\\x22').replace(/'/g,'\\\'').replace(/</g,'\\x3c').replace(/>/g,'\\x3e').replace(/&/g,'\\x26');}
function sprintf(){if(arguments.length==0){Util.warn('sprintf() was called with no arguments; it should be called with at '+'least one argument.');return '';}var _L0=['This is an argument vector.'];for(var ii=arguments.length-1;ii>0;ii--)if(typeof(arguments[ii])=="undefined"){Util.log('You passed an undefined argument (argument '+ii+') to sprintf(). '+'Pattern was: `'+(arguments[0])+'\'.','error');_L0.push('');}else if(arguments[ii]===null){_L0.push('');}else if(arguments[ii]===true){_L0.push('true');}else if(arguments[ii]===false){_L0.push('false');}else{if(!arguments[ii].toString){Util.log('Argument '+(ii+1)+' to sprintf() does not have a toString() '+'method. The pattern was: `'+(arguments[0])+'\'.','error');return '';}_L0.push(arguments[ii]);}var _L2=arguments[0];_L2=_L2.toString().split('%');var _L3=_L2.length;var _L4=_L2[0];for(var ii=1;ii<_L3;ii++){if(_L0.length==0){Util.log('Not enough arguments were provide to sprintf(). The pattern was: '+'`'+(arguments[0])+'\'.','error');return '';}if(!_L2[ii].length){_L4+="%";continue;}var p=0;var m=0;var r='';var _L8=' ';var _L9=null;var _La=null;var _Lb='';var pos=0;if(m=_L2[ii].match(/^('.)?(?:(-?\d+\.)?(-?\d+)?)/)){if(m[2]!==undefined&&m[2].length)_L9=parseInt(_Lb=m[2]);if(m[3]!==undefined&&m[3].length)if(_L9!==null){_La=parseInt(m[3]);}else _L9=parseInt(_Lb=m[3]);pos=m[0].length;if(m[1]!==undefined&&m[1].length){_L8=m[1].charAt(1);}else if(_Lb.charAt(0)==0)_L8='0';}switch(_L2[ii].charAt(pos)){case 's':case '#':raw=htmlspecialchars(_L0.pop().toString());break;case 'h':raw=_L0.pop().toString();break;case 'd':raw=parseInt(_L0.pop()).toString();break;case 'f':raw=parseFloat(_L0.pop()).toString();break;case 'q':raw="`"+htmlspecialchars(_L0.pop().toString())+"'";break;case 'e':raw="'"+escape_js_quotes(_L0.pop().toString())+"'";break;case 'L':var _Ld=_L0.pop();for(var ii=0;ii<_Ld.length;ii++)_Ld[ii]="`"+htmlspecialchars(_L0.pop().toString())+"'";if(_Ld.length>1)_Ld[_Ld.length-1]='and '+_Ld[_Ld.length-1];raw=_Ld.join(', ');break;case 'x':var x=_L0.pop();var _Lf=null;var src=null;try{if(typeof(x['line'])!='undefined'){_Lf=x.line;}else if(typeof(x['lineNumber'])!='undefined')_Lf=x.lineNumber;if(typeof(x['sourceURL'])!='undefined'){src=x['sourceURL'];}else if(typeof(x['fileName'])!='undefined')src=x['fileName'];}catch(exception){}var s='[An Exception]';try{s=x.message||x.toString();}catch(exception){}raw=s+' [at '+Stack.frameSrcToString(src,_Lf)+']';break;default:raw="%"+_L2[ii].charAt(pos+1);break;}if(_L9!==null)if(raw.length<Math.abs(_L9)){var _L12='';var _L13=(Math.abs(_L9)-raw.length);for(var ll=0;ll<_L13;ll++)_L12+=_L8;if(_L9<0){raw+=_L12;}else raw=_L12+raw;}if(_La!==null)if(raw.length>_La)raw=raw.substr(0,_La);_L4+=raw+_L2[ii].substring(pos+1);}if(_L0.length>1)Util.log('Too many arguments ('+(_L0.length-1)+' extras) were passed to '+'sprintf(). Pattern was: `'+(arguments[0])+'\'.','error');return _L4;}
function AsyncRequest(uri){var dispatchResponse=bind(this,function(_L0){if(_L0.instrument){this.cavalrylogger=CavalryLogger.getInstance(_L0.instrument);if(_L0.tti_event)this.cavalrylogger.setTTIEvent(_L0.tti_event);this.cavalrylogger.setTimeStamp('t_js');if(this.t_start)this.cavalrylogger.setValue('t_start',this.t_start);}if(!this._asyncResponse)this._asyncResponse=_L0;try{this.clearStatusIndicator();if(this.initialHandler(_L0)!==false){if(this.handler)try{this.handler(_L0);}catch(exception){this.finallyHandler(_L0);throw exception;}this.finallyHandler(_L0);if(_L0.instrument){this.cavalrylogger.setTimeStamp('t_html');this.cavalrylogger.setTimeStamp('t_domcontent');}var _L1=_L0.onload;if(_L1)for(var ii=0;ii<_L1.length;ii++)try{(new Function(_L1[ii]))();}catch(exception){Util.error('An onload hook in response to a request to to URI %q threw an '+'exception: %x. (This is not a problem with AsyncRequest, it is '+'a problem with the registered hook.)',this.getURI(),exception);}if(_L0.instrument){this.cavalrylogger.setTimeStamp('t_hooks');this.cavalrylogger.setTimeStamp('t_layout');this.cavalrylogger.setTimeStamp('t_onload');}var _L3=_L0.onafterload;if(_L3)for(var ii=0;ii<_L3.length;ii++)try{(new Function(_L3[ii]))();}catch(exception){Util.error('An onafterload hook in response to a request to to URI %q threw an '+'exception: %x. (This is not a problem with AsyncRequest, it is '+'a problem with the registered hook.)',this.getURI(),exception);}var _L4=_L0.invalidate_cache;if(_L4&&_L4.length)Arbiter.inform(Arbiter.PAGECACHE_INVALIDATE,_L4);}if(_L0.cacheObservation&&typeof(TabConsoleCacheobserver)!='undefined'&&TabConsoleCacheobserver.instance)TabConsoleCacheobserver.getInstance().addAsyncObservation(_L0.cacheObservation);}catch(exception){Util.error('The user supplied handler function for an AsyncRequest to URI %q '+'threw an exception: %x. (This is not a problem with AsyncRequest, it '+'is a problem with the callback, which failed to catch the exception.)',this.getURI(),exception);}});var replayResponse=bind(this,function(){if(!this._asyncResponse){Util.warn('Unable to replay AsyncResponse for an AsyncRequest to '+this.getURI());return;}else if(this._asyncResponse.dontReplay)return;Util.log('replaying the response for '+this.getURI());this._asyncResponse.setReplay(true);dispatchResponse(this._asyncResponse);});var dispatchErrorResponse=bind(this,function(_L0,_L1){try{this.clearStatusIndicator();var _L2=_L0.getError();if(_L2==kError_Async_ConfirmationRequired||_L2==kError_Async_InternalCaptchaRequired||_L2==kError_Verification_ConfirmEmail){var _L3=false;if(_L2==kError_Async_ConfirmationRequired||_L2==kError_Async_InternalCaptchaRequired)_L3=true;var _L4=_L0.getPayload();this._displayServerDialog(_L4.__dialog,_L3);}else if(this.initialHandler(_L0)!==false){try{if(_L1){this.transportErrorHandler(_L0);}else this.errorHandler(_L0);}catch(exception){this.finallyHandler(_L0);throw exception;}this.finallyHandler(_L0);}}catch(exception){Util.error('Async error handler threw an exception for URI %q, when processing a '+'%d error: %x.',this.getURI(),_L0.getError(),exception);}});var _interpretTransportResponse=bind(this,function(){if(this.getOption('suppressEvaluation')){var r=new AsyncResponse();r.payload=this.transport;return {asyncResponse:r};}var shield="for (;;);";var shieldlen=shield.length;if(this.transport.responseText.length<=shieldlen){var kind=this.transport.responseText.length?('a '+this.transport.responseText.length+' byte'):'an empty';return {transportError:sprintf('An error occurred when making an AsyncRequest to %q. '+'The server returned '+kind+' response.',this.getURI())};}var text=this.transport.responseText;var offset=0;while(text.charAt(offset)==" "||text.charAt(offset)=="\n")offset++;if(offset&&text.substring(offset,offset+shieldlen)==shield)Util.error('Response for request to endpoint %q seems to be valid, but was '+'preceeded by whitespace. (This probably means that someone '+'committed whitespace in a header file.)',this.getURI());var safeResponse=text.substring(offset+shieldlen);try{var response=eval('('+safeResponse+')');}catch(exception){return {transportError:sprintf('Evaluation failed for <a href="javascript:aiert(%e);">'+'response from %q</a>: %x.',this.transport.responseText,this.getURI(),exception)};}return interpretResponse(response);});var interpretResponse=bind(this,function(_L0){if(_L0.redirect)return {redirect:_L0.redirect};var r=new AsyncResponse();if(typeof(_L0.payload)=='undefined'||typeof(_L0.error)=='undefined'||typeof(_L0.errorDescription)=='undefined'||typeof(_L0.errorSummary)=='undefined'||typeof(_L0.errorIsWarning)=='undefined'){Util.warn('AsyncRequest to endpoint %q returned a JSON response, but it '+'is not properly formatted. The endpoint needs to provide a '+'response including both error and payload information; use '+'the AsyncResponse PHP class to do this easily.',this.getURI());r.payload=_L0;}else copy_properties(r,_L0);return {asyncResponse:r};});var invokeResponseHandler=bind(this,function(_L0){if(typeof(_L0.redirect)!='undefined'){(function(){this.setURI(_L0.redirect).send();}).bind(this).defer();return;}if(this.handler||this.errorHandler||this.transportErrorHandler){var r=_L0.asyncResponse;if(r.instrument&&(r.is_first===undefined||r.is_first))this.t_start=(new Date()).getTime();if(r.getError()&&!r.getErrorIsWarning()){var fn=dispatchErrorResponse;}else var fn=dispatchResponse;if(r.bootloadable)Bootloader.enableBootload(r.bootloadable);fn=fn.shield(null,r);fn=fn.defer.bind(fn);var _L3=false;if(this.preBootloadHandler)_L3=this.preBootloadHandler(r);if(r.bootload){Bootloader.loadResources(r.bootload,fn,_L3);}else fn();}});var invokeErrorHandler=bind(this,function(_L0){try{if(!window.loaded)return;}catch(ex){return;}var r=new AsyncResponse();var err;try{err=_L0||this.transport.status||1001;}catch(ex){err=1001;}try{if(this.responseText=='')err=1002;}catch(ignore){}if(this.transportErrorHandler){var _L3,_L4;if(Util.isDevelopmentEnvironment()){_L3=sprintf('Transport error (#%d) while retrieving data from endpoint %q: %s',err,this.getURI(),AsyncRequest.getHTTPErrorDescription(err));_L4=AsyncRequest.getHTTPErrorSummary(err);}else{_L3=_tx("Noko gjekk gale. Vi arbeider med \u00e5 f\u00e5 det fiksa s\u00e5 fort som mogleg. Du kan pr\u00f8ve ein gong til.");_L4=_tx("Ops");}if(!this.getOption('suppressErrorAlerts'))Util.error(_L3);copy_properties(r,{error:err,errorSummary:_L4,errorDescription:_L3});dispatchErrorResponse(r,true);}else Util.error('Async request to %q failed with a %d error, but there was no error '+'handler available to deal with it.',this.getURI(),err);});var handleResponse=function(_L0){var _L1=this.interpretResponse(_L0);this.invokeResponseHandler(_L1);};var onStateChange=function(){try{if(this.transport.readyState==4){if(this.transport.status>=200&&this.transport.status<300){invokeResponseHandler(_interpretTransportResponse());}else if(ua.safari()&&(typeof(this.transport.status)=='undefined')){invokeErrorHandler(1002);}else invokeErrorHandler();if(this.getOption('asynchronous')!==false)delete this.transport;}}catch(exception){try{if(!window.loaded)return;}catch(ex){return;}delete this.transport;if(this.remainingRetries){--this.remainingRetries;this.send(true);}else{if(!this.getOption('suppressErrorAlerts'))Util.error('AsyncRequest exception when attempting to handle a state change: %x.',exception);invokeErrorHandler(1001);}}};copy_properties(this,{onstatechange:onStateChange,replayResponse:replayResponse,invokeResponseHandler:invokeResponseHandler,interpretResponse:interpretResponse,handleResponse:handleResponse,transport:null,method:'POST',uri:'',initialHandler:bagofholding,handler:null,errorHandler:null,transportErrorHandler:null,finallyHandler:bagofholding,statusElement:null,data:{},context:{},readOnly:false,writeRequiredParams:['post_form_id'],remainingRetries:0,option:{asynchronous:true,suppressErrorHandlerWarning:false,suppressEvaluation:false,suppressErrorAlerts:false,retries:1,jsonp:false,bundle:false,useIframeTransport:false,tfbEndpoint:true},_replayable:undefined,_replayKey:''});if(typeof ErrorDialog!="undefined"){this.errorHandler=ErrorDialog.showAsyncError;this.transportErrorHandler=ErrorDialog.showAsyncError;}if(uri!=undefined)this.setURI(uri);return this;}copy_properties(AsyncRequest,{getHTTPErrorSummary:function(_L0){return AsyncRequest._getHTTPError(_L0).summary;},getHTTPErrorDescription:function(_L0){return AsyncRequest._getHTTPError(_L0).description;},pingURI:function(uri,_L1,_L2){_L1=_L1||{};return new AsyncRequest().setURI(uri).setData(_L1).setOption('asynchronous',!_L2).setOption('suppressErrorHandlerWarning',true).setErrorHandler(bagofholding).setTransportErrorHandler(bagofholding).send();},receiveJSONPResponse:function(_L0,_L1,_L2){if(this._JSONPReceivers[_L0]){var _L3=(this._JSONPReceivers[_L0].is_first===undefined);this._JSONPReceivers[_L0].is_first=_L3;for(var ii=0;ii<this._JSONPReceivers[_L0].length;ii++){var _L5=this._JSONPReceivers[_L0][ii];if(_L5.transportIframe&&!_L2)(function(x){DOMScroll.getScrollRoot().removeChild(x);}).bind(null,_L5.transportIframe).defer();var r=_L5.interpretResponse(_L1);r.asyncResponse.is_first=_L3;r.asyncResponse.is_last=!_L2;_L5.invokeResponseHandler(r);}if(!_L2)delete this._JSONPReceivers[_L0];}},_hasBundledRequest:function(){return !is_empty(AsyncRequest._allBundledRequests);},stashBundledRequest:function(){var ret=AsyncRequest._allBundledRequests;AsyncRequest._allBundledRequests={};return ret;},setBundledRequestProperties:function(_L0){if(_L0.stashedRequests)copy_properties(AsyncRequest._allBundledRequests,_L0.stashedRequests);if(!AsyncRequest._hasBundledRequest()){var _L1=_L0.callback;_L1&&_L1();}else{copy_properties(AsyncRequest._bundledRequestProperties,_L0);if(_L0.start_immediately)AsyncRequest._sendBundledRequests();}},_bundleRequest:function(_L0){if(_L0.getOption('jsonp')||_L0.getOption('useIframeTransport')){Util.error('You cannot bundle AsyncRequest that uses jsonp or iframe transport.');_L0.setOption('bundle',false);return false;}else if(!_L0.uri.isFacebookURI()){Util.error('You can not bundle AsyncRequest sent to non-facebook URIs');_L0.setOption('bundle',false);return false;}else if(!_L0.getOption('asynchronous')){Util.error('We cannot bundle synchronous AsyncRequests');_L0.setOption('bundle',false);return false;}var _L1=_L0.uri.getPath();if(_L1 in AsyncRequest._allBundledRequests){Util.warn('Bundling multiple AsyncRequests to the same endpoint is not '+'supported. They will still be sent seqentially. Only the last '+'AsyncRequest to a unique endpoint is included in the bundle.');var _L2=AsyncRequest._allBundledRequests[_L1];_L2.setOption('bundle',false).send();}if(is_empty(AsyncRequest._allBundledRequests))AsyncRequest._bundleTimer=setTimeout(function(){AsyncRequest._sendBundledRequests();},0);AsyncRequest._allBundledRequests[_L1]=_L0;return true;},_sendBundledRequests:function(){clearTimeout(AsyncRequest._bundleTimer);AsyncRequest._bundleTimer=null;var _L0=AsyncRequest._allBundledRequests;AsyncRequest._allBundledRequests={};var _L1={};copy_properties(_L1,AsyncRequest._bundledRequestProperties);AsyncRequest._bundledRequestProperties={};if(is_empty(_L1)&&count(_L0)==1){for(var _L2 in _L0)_L0[_L2].setOption('bundle',false).send();return;}var _L3=function(){_L1.callback&&_L1.callback();};if(is_empty(_L0)){_L3();return;}var _L4={};for(var _L2 in _L0){var _L5=_L0[_L2];_L4[_L2]=URI.implodeQuery(_L5.data);}var _L6={data:_L4};if(_L1.extra_data)copy_properties(_L6,_L1.extra_data);new AsyncRequest().setURI('/ajax/proxy.php').setData(_L6).setMethod('POST').setInitialHandler(_L1.onInitialResponse||truth).setHandler(function(r){var _L8=r.getPayload();var _L9=_L8.responses;for(var _L2 in _L0){var _L5=_L0[_L2];if(_L2 in _L9){var _La=_L5.interpretResponse(_L9[_L2]);_L5.invokeResponseHandler(_La);}else{var _Lb={transportError:sprintf('An error occurred when making an AsyncRequest to %q '+' in a bundled request.',_L2)};_L5.invokeResponseHandler(_Lb);}}}).setTransportErrorHandler(function(_L7){var _L8=[];var _L9={transportError:_L7.errorDescription};for(var _L2 in _L0){_L8.push(_L2);var _L5=_L0[_L2];_L5.invokeResponseHandler(_L9);}Util.error('Transport error occured for bundled requests to '+_L8.join(', '));}).setFinallyHandler(function(r){_L3();}).send();},responseOpsHandler:function(_L0,_L1){if(_L1.dom_ops)_L1.dom_ops.forEach(function(i){var _L3=_L0.find(i.where);if(_L3){var _L4=i.raw?i.what:HTML(i.what);DOM[i.how](_L3,_L4);}});invoke_callbacks.call(_L0,_L1.relative_ops);},bootstrap:function(_L0,_L1){var _L2='GET';var _L3=true;var _L4={};if(_L1.rel=='async-post'){_L2='POST';_L3=false;_L4=URI(_L0).getQueryData();}new AsyncRequest(_L0).setReadOnly(_L3).setMethod(_L2).setData(_L4).setStatusElement(_L1).setHandler(AsyncRequest.responseOpsHandler.bind(null,_L1)).send();return false;},_getHTTPError:function(_L0){var e=AsyncRequest._HTTPErrors[_L0]||AsyncRequest._HTTPErrors[_L0-(_L0%100)]||{summary:'HTTP Error',description:'Unknown HTTP error #'+_L0};return e;},_HTTPErrors:{400:{summary:'Bad Request',description:'Bad HTTP request.'},401:{summary:'Unauthorized',description:'Not authorized.'},403:{summary:'Forbidden',description:'Access forbidden.'},404:{summary:'Not Found',description:'Web address does not exist.'},1000:{summary:'Bad Response',description:'Invalid response.'},1001:{summary:'No Network',description:'A network error occurred. Check that you are connected to the '+'internet.'},1002:{summary:'No Data',description:'The server did not return a response.'},1003:{summary:'Eval Error',description:'Exception thrown during JSON evaluation.'}},_JSONPReceivers:{},_allBundledRequests:{},_bundledRequestProperties:{},_bundleTimer:null});copy_properties(AsyncRequest.prototype,{setMethod:function(m){this.method=m.toString().toUpperCase();return this;},getMethod:function(){return this.method;},setData:function(obj){this.data=obj;return this;},getData:function(){return this.data;},setContextData:function(key,_L1,_L2){_L2=_L2===undefined?true:_L2;if(_L2)this.context['_log_'+key]=_L1;return this;},setURI:function(uri){var _L1=URI(uri);if(this.getOption('useIframeTransport')&&!_L1.isFacebookURI()){Util.error('IframeTransport requests should only be used when going between '+'different Facebook subdomains.  This probably won\'t do what you want '+'if you\'re going to a non-Facebook URI.  Check out JSONP for that, '+'but that\'s also a bad idea to use.');return this;}if(!this.getOption('jsonp')&&!this.getOption('useIframeTransport')&&!_L1.isSameOrigin()){Util.error('Asynchronous requests must specify relative URIs (like %q); this '+'ensures they conform to the Same Origin Policy (see %q). The '+'provided absolute URI (%q) is invalid, use a relative URI instead. '+'If you need to dispatch cross-domain requests, you can use JSONP, '+'but consider this decision carefully because there are tradeoffs and '+'JSONP is completely insecure.','/path/to/endpoint.php','http://www.mozilla.org/projects/security/components/same-origin.html',_L1.toString());return this;}this.uri=_L1;return this;},getURI:function(){return this.uri.toString();},setInitialHandler:function(fn){this.initialHandler=fn;return this;},setHandler:function(fn){if(typeof(fn)!='function'){Util.error('AsyncRequest response handlers must be functions. Pass a function, '+'or use bind() to build one.');}else this.handler=fn;return this;},getHandler:function(){return this.handler;},setErrorHandler:function(fn){if(typeof(fn)!='function'){Util.error('AsyncRequest error handlers must be functions. Pass a function, or '+'use bind() to build one.');}else this.errorHandler=fn;return this;},setTransportErrorHandler:function(fn){this.transportErrorHandler=fn;return this;},getErrorHandler:function(){return this.errorHandler;},getTransportErrorHandler:function(){return this.transportErrorHandler;},setFinallyHandler:function(fn){this.finallyHandler=fn;return this;},setPreBootloadHandler:function(fn){this.preBootloadHandler=fn;return this;},setReadOnly:function(_L0){if(typeof(_L0)!='boolean'){Util.error('AsyncRequest readOnly value must be a boolean.');}else this.readOnly=_L0;return this;},setFBMLForm:function(){this.writeRequiredParams=["fb_sig"];return this;},getReadOnly:function(){return this.readOnly;},setStatusElement:function(_L0){this.statusElement=_L0;return this;},getStatusElement:function(){return this.statusElement;},clearStatusIndicator:function(){if(this.getStatusElement())CSS.removeClass($(this.getStatusElement()),'async_saving');},addStatusIndicator:function(){if(this.getStatusElement())CSS.addClass($(this.getStatusElement()),'async_saving');},specifiesWriteRequiredParams:function(){return this.writeRequiredParams.every(function(_L0){this.data[_L0]=this.data[_L0]||Env[_L0]||(ge(_L0)||{}).value;if(this.data[_L0]!==undefined)return true;},this);},setReplayable:function(_L0,key){this._replayable=_L0;this._replayKey=key||'';return this;},setOption:function(opt,v){if(typeof(this.option[opt])!='undefined'){this.option[opt]=v;}else Util.warn('AsyncRequest option %q does not exist; request to set it was ignored.',opt);return this;},getOption:function(opt){if(typeof(this.option[opt])=='undefined')Util.warn('AsyncRequest option %q does not exist, get request failed.',opt);return this.option[opt];},abort:function(){if(this.transport){var _L0=this.getTransportErrorHandler();this.setOption('suppressErrorAlerts',true);this.setTransportErrorHandler(bagofholding);this.transport.abort();this.setTransportErrorHandler(_L0);}},setNectarActionData:function(_L0){if(this.data.nctr===undefined)this.data.nctr={};this.data.nctr._ia=1;if(_L0){if(this.data.nctr._as===undefined)this.data.nctr._as={};copy_properties(this.data.nctr._as,_L0);}return this;},setNectarData:function(_L0){if(_L0){if(this.data.nctr===undefined)this.data.nctr={};copy_properties(this.data.nctr,_L0);}return this;},send:function(_L0){_L0=_L0||false;if(!this.uri){Util.error('Attempt to dispatch an AsyncRequest without an endpoint URI! This is '+'all sorts of silly and impossible, so the request failed.');return false;}if(!this.errorHandler&&!this.getOption('suppressErrorHandlerWarning'))Util.warn('Dispatching an AsyncRequest that does not have an error handler. '+'You SHOULD supply one, or use AsyncRequest.pingURI(). If this '+'omission is intentional and well-considered, set the %q option to '+'suppress this warning.','suppressErrorHandlerWarning');if(this.getOption('jsonp')&&this.method!='GET')this.setMethod('GET');if(this.getOption('useIframeTransport')&&this.method!='GET'){Util.warn('Iframe transport currently works only with GET.');this.setMethod('GET');}if(!this.getReadOnly()){if(!this.specifiesWriteRequiredParams()){Util.error('You are making a POST request to %s without one or more of the '+'required parameters: %s. Requests which modify data and do not '+'verify the request origin through parameter validation are '+'vulnerable to CSRF attacks. You should either specify values for '+'these parameters explicitly by using setData(), put them in the '+'page as inputs, or mark this request as safe and idempotent by '+'using setReadOnly(). Consult the setReadOnly() documentation for '+'more information.',this.uri.toString(),this.writeRequiredParams.join(','));return false;}if(this.method!='POST'){Util.error('You are making a GET request which modifies data; this violates '+'the HTTP spec and is generally a bad idea. Either change this '+'request to use POST or use setReadOnly() to mark the request as '+'idempotent and appropriate for HTTP GET. Consult the setReadOnly() '+'documentation for more information.');return false;}}if(this.method=='POST'&&this.getOption('tfbEndpoint'))this.data.fb_dtsg=Env.fb_dtsg;if((!this.getReadOnly()&&this._replayable!==false)||this._replayable)Arbiter.inform(Arbiter.REPLAYABLE_AJAX,this);if(!is_empty(this.context)&&this.getOption('tfbEndpoint')){copy_properties(this.data,this.context);this.data['ajax_log']=1;}if(!this.getReadOnly()&&this.getOption('tfbEndpoint')&&this.method=='POST'&&this.data['post_form_id_source']===undefined)this.data['post_form_id_source']='AsyncRequest';if(this.getOption('tfbEndpoint')){this.data['__a']=1;if(Env.nectar_ct)this.setNectarData({'_ct':new Date().getTime()});}if(this.getOption('bundle')&&AsyncRequest._bundleRequest(this))return true;var _L1,_L2;if(this.method=='GET'){_L1=this.uri.addQueryData(this.data).toString();_L2='';}else{_L1=this.uri.toString();_L2=URI.implodeQuery(this.data);}if(this.getOption('jsonp')||this.getOption('useIframeTransport')){var _L3=this.uri.getPath();if(!AsyncRequest._JSONPReceivers[_L3])AsyncRequest._JSONPReceivers[_L3]=[];AsyncRequest._JSONPReceivers[_L3].push(this);if(this.getOption('jsonp')){(function(){DOMScroll.getScrollRoot().appendChild($N('script',{src:_L1,type:"text/javascript"}));}).bind(this).defer();}else{var _L4={position:'absolute',top:'-1000px',left:'-1000px',width:'80px',height:'80px'};_L1=this.uri.addQueryData({'_fb_iframe_path':_L3});this.transportIframe=$N('iframe',{src:_L1,style:_L4});DOMScroll.getScrollRoot().appendChild(this.transportIframe);}return true;}if(this.transport){Util.error('You must wait for an AsyncRequest to complete before sending another '+'request with the same object. To send two simultaneous requests, '+'create a second AsyncRequest object.');return false;}var _L5=null;try{_L5=new XMLHttpRequest();}catch(ignored){}if(!_L5)try{_L5=new ActiveXObject("Msxml2.XMLHTTP");}catch(ignored){}if(!_L5)try{_L5=new ActiveXObject("Microsoft.XMLHTTP");}catch(ignored){}if(!_L5){Util.error('Unable to build XMLHTTPRequest transport.');return false;}_L5.onreadystatechange=bind(this,'onstatechange');if(!_L0){this.remainingRetries=0;if(this.getReadOnly())this.remainingRetries=this.getOption('retries');}this.transport=_L5;try{this.transport.open(this.method,_L1,this.getOption('asynchronous'));}catch(ex){Util.error('Exception when opening Async transport to %q: %x',_L1,ex);return false;}var _L6=env_get('svn_rev');if(_L6)this.transport.setRequestHeader('X-SVN-Rev',String(_L6));if(this.method=='POST')this.transport.setRequestHeader('Content-Type','application/x-www-form-urlencoded');this.addStatusIndicator();this.transport.send(_L2);return true;},_displayServerDialog:function(_L0,_L1){var _L2=new Dialog(_L0);if(_L1)_L2.setHandler(this._displayConfirmationHandler.bind(this,_L2));_L2.setCloseHandler(this.finallyHandler.bind(this)).show();},_displayConfirmationHandler:function(_L0){this.data.confirmed=1;copy_properties(this.data,_L0.getFormData());this.send();}});function AsyncResponse(_L0){copy_properties(this,{error:0,errorSummary:null,errorDescription:null,onload:null,replay:false,dom_ops:[],payload:_L0||null});return this;}copy_properties(AsyncResponse.prototype,{getPayload:function(){return this.payload;},getError:function(){return this.error;},getErrorSummary:function(){return this.errorSummary;},getErrorDescription:function(){return this.errorDescription;},getErrorIsWarning:function(){return this.errorIsWarning;},setReplay:function(_L0){_L0=(_L0===undefined?true:_L0);this.replay=!!_L0;return this;},isReplay:function(){return this.replay;}});
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 TextAreaControl(_L0){copy_properties(this,{autogrow:false,clearHeightOnBlur:false,shadow:null,originalHeight:null,metricsValue:null});this.parent.construct(this,_L0);}TextAreaControl.extend('TextInputControl');copy_properties(TextAreaControl.prototype,{setAutogrow:function(_L0,_L1){this.autogrow=_L0;this.clearHeightOnBlur=_L1;this.refreshShadow();CSS.addClass(this.getRoot(),'DOMControl_autogrow');return this;},setFocused:function(_L0){if(this.autogrow&&!_L0&&this.isEmpty()&&this.clearHeightOnBlur)this.getRoot().style.height='';return this.parent.setFocused(_L0);},setOriginalHeight:function(_L0){this.originalHeight=_L0;return this;},onupdate:function(){this.parent.onupdate();var r=this.getRoot();if(this.autogrow&&r.value!=this.metricsValue){this.metricsValue=r.value;if(CSS.getStyle(r,'fontSize')=="")return false;copy_properties(this.shadow.style,{fontSize:parseInt(CSS.getStyle(r,'fontSize'),10)+'px',fontFamily:CSS.getStyle(r,'fontFamily'),width:Math.max(Vector2.getElementDimensions(r).x-8,0)+'px'});DOM.setContent(this.shadow,HTML(htmlize(r.value)));if(this.isEmpty()&&this.originalHeight){r.style.height=this.originalHeight+'px';}else r.style.height=Math.max(this.originalHeight,Vector2.getElementDimensions(this.shadow).y+15)+'px';}},refreshShadow:function(){if(this.autogrow){this.shadow=$N('div',{className:'DOMControl_shadow'});DOM.getRootElement().appendChild(this.shadow);var r=this.getRoot();if(!this.originalHeight)this.originalHeight=parseInt(CSS.getStyle(r,'height'),10)||Vector2.getElementDimensions(this.getRoot()).y;}else{if(this.shadow)DOM.remove(this.shadow);this.shadow=null;}}});function autogrow_textarea(_L0){_L0=$(_L0);if(!_L0._hascontrol){_L0._hascontrol=true;new TextAreaControl(_L0).setAutogrow(true);}}
window.__UIControllerRegistry=window.__UIControllerRegistry||{};
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',Event.kill);_L2.listen('mouseup',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 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("Lastar inn...");};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();};
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);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;},_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;},transitionComplete:function(){_BusyUIManager.stopLookingBusy();PageTransitions._current_uri=PageTransitions._most_recent_uri=PageTransitions._next_uri;PageTransitions.restoreScrollPosition();},_warnBeforeLeaving:function(_L0,_L1){new Dialog().setTitle(_tx("Are you sure you want to navigate away from this page?")).setSummary(_tx("Trykk {ok} for \u00e5 fortsetta, eller {cancel} for \u00e5 bli verande p\u00e5 denne sida.",{ok:_tx("OK"),cancel:_tx("Avbryt")})).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';}}};
PresenceMessage={STARTED:'presence/started',SHUTDOWN:'presence/shutdown',RESTARTED:'presence/restarted',WINDOW_RESIZED:'presence/window-resized',TAB_CLOSED:'presence/tab-closed',TAB_OPENED:'presence/tab-opened',PRESENCE_UPDATER_READY:'presence/updater-ready',getAppMessageType:function(_L0,_L1){return 'presence/app_message:'+_L0+':'+_L1;},getArbiterMessageType:function(_L0){return 'presence/message:'+_L0;}};
PYMK={addOthers:function(_L0){var ids=$$('input[name="pymk_replace"]').pull('value').join(',');var _L2=$N('input',{name:'unwanted',type:'hidden',value:ids});$(_L0).appendContent(_L2);}};
if(!this.JSON)this.JSON=function(){function f(n){return n<10?'0'+n:n;}Date.prototype.toJSON=function(){return this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z';};var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};function stringify(_L0,_L1){var a,i,k,l,v;switch(typeof _L0){case 'string':return (new RegExp('[\x00-\x1f\\\\"]')).test(_L0)?'"'+_L0.replace(/[\x00-\x1f\\"]/g,function(a){var c=m[a];if(c)return c;c=a.charCodeAt();return '\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"':'"'+_L0+'"';case 'number':return isFinite(_L0)?String(_L0):'null';case 'boolean':return String(_L0);case 'null':return 'null';case 'object':if(DOM.isNode(_L0))return null;if(!_L0)return 'null';if(typeof _L0.toJSON==='function')return stringify(_L0.toJSON());a=[];if(typeof _L0.length==='number'&&!(propertyIsEnumerable(_L0,'length'))){l=_L0.length;for(i=0;i<l;i+=1)a.push(stringify(_L0[i],_L1)||'null');return '['+a.join(',')+']';}if(_L1){l=_L1.length;for(i=0;i<l;i+=1){k=_L1[i];if(typeof k==='string'){v=stringify(_L0[k],_L1);if(v)a.push(stringify(k)+':'+v);}}}else for(k in _L0)if(typeof k==='string'){v=stringify(_L0[k],_L1);if(v)a.push(stringify(k)+':'+v);}return '{'+a.join(',')+'}';}}return {stringify:stringify,parse:function(text,filter){var j;function walk(k,v){var i,n;if(v&&typeof v==='object')for(i in v)if(Object.prototype.hasOwnProperty.apply(v,[i])){n=walk(i,v[i]);if(n!==undefined)v[i]=n;}return filter(k,v);}if(text&&/^[\],:{}\s]*$/.test(text.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof filter==='function'?walk('',j):j;}throw new SyntaxError('decodeJSON');}};}();this.JSON.encode=this.JSON.stringify;this.JSON.decode=this.JSON.parse;function propertyIsEnumerable(o,p){if(o.propertyIsEnumerable)return o.propertyIsEnumerable(p);for(var _L2 in o)if(_L2==p)return true;return false;}

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