/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  December 11th 2009 9:50:15 AM PST                            */
/*      Machine:  10.16.139.101                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/b1fvjbswpts0o8o4.pkg.js h:8zc8cpo8                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/b1fvjbswpts0o8o4.pkg.js                                   */

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

var BetaPrefs={changeStatus:function(_L0){var _L1={beta_enabled:_L0};new AsyncRequest('/ajax/beta_prefs/beta_prefs.php').setMethod('POST').setData(_L1).setHandler(function(_L2){window.location.reload();return;}).send();}};
function send_error_signal(_L0,_L1){if(window.Env&&window.Env.error_uri)new AsyncSignal(window.Env.error_uri,{c:_L0,m:_L1}).send();}
function UITypeaheadFilter(_L0,map,_L2){copy_properties(this,{searchId:_L0,searchEl:null,map:map,callback:_L2||UITypeaheadFilter.callbacks.hide});this._setup();}copy_properties(UITypeaheadFilter,{callbacks:{hide:function(_L0,_L1){for(var key in _L0)if(key in _L1){show($(key));}else hide($(key));}}});copy_properties(UITypeaheadFilter.prototype,{_setup:function(){this.searchEl=ge(this.searchId);if(!this.searchEl){Util.warn('UITypeaheadFilter got an invalid search id!');return;}this.searchEl.listen('keyup',this._keyupListener.bind(this));},_keyupListener:function(e){var _L1=this.searchEl.value;var _L2=this._getFilteredMap(_L1);this.callback(this.map,_L2);},_getFilteredMap:function(_L0){var _L1={};if(!_L0||_L0.length==0){copy_properties(_L1,this.map);return _L1;}var ftl=_L0.toLowerCase();for(var key in this.map)if((this.map[key]+'').toLowerCase().indexOf(ftl)!=-1)_L1[key]=this.map[key];return _L1;}});
function Stack(){this.stack=[];try{var _L0=[];try{({}).llama();}catch(e){if(e.stack){var _L1=/^[^@]*?@(.+?):([0-9]+)$/mg;for(line=_L1.exec(e.stack);line;line=_L1.exec())_L0.push([line[1],line[2]]);}}var _L2=arguments.callee,_L3=[];for(var _L2=arguments.callee,i=0;_L2;_L2=_L2.caller,++i){i&&this.stack.push({func:_L2,args:_L2.arguments,file:_L0[i]?_L0[i][0]:null,line:_L0[i]?_L0[i][1]:null,toString:Stack.frameToString});if(_L3.indexOf(_L2)>=0)break;_L3.push(_L2);}}catch(e){}}Stack.prototype.shift=function(n){this.stack.splice(0,n);return this;};Stack.recursion={toString:bind(Stack,'frameToString')};Stack.functionGetName=function(fn,_L1){return (fn&&fn.name)||(/^function *([^(]*)\(/.exec(fn)||[]).pop()||(_L1===undefined?'(no name)':_L1);};Stack.frameSrcToString=function(_L0,_L1){if(!_L0){return '?';}else if(_L0.indexOf('TabConsole.getInstance().onresult')>0){return 'IceSpider';}else if(_L0.indexOf('with (__scope__.vars)')>0){return 'FireBug';}else return _L0+(_L1?':'+_L1:'');};Stack.frameToString=function(){if(this==Stack.recursion)return '* * recursion * *';var str=Stack.argToString(this.func)+'(';for(var i=0;i<this.args.length;i++)str+=(i?', ':'')+Stack.argToString(this.args[i]);return str+') @ '+Stack.frameSrcToString(this.file,this.line);};Stack.argToString=function(arg){if(arg instanceof Function)return Stack.functionGetName(arg);if(arg instanceof Array){return 'Array';}else if(arg instanceof Object){return 'Object';}else if(typeof arg=='string'){return '"'+arg.replace(/("|\\)/g,'\\$1')+'"';}else return arg+'';};Stack.prototype.toString=function(){if(!this.stack.length)return 'No stack trace available.';var str='';for(var i=0;i<this.stack.length;i++)str+=(i?'\n':'')+'#'+i+' '+this.stack[i];return str;};
function TabConsole(_L0){if(!ge('con_javascript_console'))return;copy_properties(this,{console:$('con_javascript_console'),jsinput:$('con_javascript_input'),seltab:$(getCookie('tconpref_seltab')||'con_tab_errors'),prefs:{tdata:$('tpreference_tdata'),cacheobserver:$('tpreference_cacheobserver'),icespider:$('tpreference_icespider'),correctness:$('tpreference_correctness'),traces:$('tpreference_traces')},history:_L0,hpos:_L0.length,tabgroup:TabGroup.find('con_tabs')});for(var k in this.prefs){if(v=getCookie('tconpref_'+k))this.prefs[k].value=v;this.prefs[k].onchange=bind(this.prefs[k],function(k){setCookie('tconpref_'+k,this.value,365*24*3600000);},k);}this.jsinput.onkeydown=bind(this,function(_L3){var key=$E(_L3).keyCode;switch(key){case KEYS.UP:if(this.hpos)this.jsinput.value=this.history[--this.hpos];return Event.kill(_L3);case KEYS.DOWN:if(this.hpos<this.history.length-1){this.jsinput.value=this.history[++this.hpos];}else if(this.hpos==this.history.length-1){++this.hpos;this.jsinput.value='';}return Event.kill(_L3);}});this.jsinput.form.onsubmit=bind(this,function(_L3){var jsi=this.jsinput;if(jsi.value.length)if(jsi.value=="clear"){jsi.value="";DOM.empty(this.console);}else{var _L5;this.log(HTML('&raquo; '+htmlspecialchars(jsi.value)),'userinput');this.js_exec=jsi.value;eval_global('try { '+'TabConsole.getInstance().js_start = new Date().getTime();'+'TabConsole.getInstance().onresult(eval(TabConsole.getInstance().js_exec));'+'} catch (e) {'+'TabConsole.getInstance().onexception(e);'+'};');}(function(){jsi.select();}).defer();return Event.kill(_L3);});this.tabgroup.setDelegate(this);KeyEventController.registerKey('[',bind(this,'previousTab'));KeyEventController.registerKey(']',bind(this,'nextTab'));KeyEventController.registerKey('`',bind(this,'focusJavascriptConsole'));TabConsole.instance=this;show(this.seltab);var _L2=(function(_L3){var _L4;if(_L3.rawLog){_L4=_L3;}else{function _L5(msg,ty,_L9){if(_L3[ty]&&_L3[ty].apply)_L3[ty].apply(_L3,_L9);(TabConsole.getInstance()||{log:bagofholding}).log(typeof msg=='string'?HTML(msg):IceSpiderInspectable.factory(msg).dom(),ty);}_L4={rawLog:function(){_L3.log.apply(_L3,arguments);},log:function(_L7){_L5(_L7,'log',arguments);},error:function(_L7){_L5(_L7,'error',arguments);},warn:function(_L7){_L5(_L7,'warn',arguments);},trace:function(){_L5((new Stack()).shift(1),'trace',[]);}};try{for(var i in _L3)if(!(i in _L4))_L4[i]=(typeof _L3[i]=='function')?bind(_L3,i):_L3[i];}catch(e){}}return _L4;})(window.console||{});try{window.console=_L2;}catch(e){}if(window.console!==_L2&&window.__defineGetter__)window.__defineGetter__('console',function(){return this;}.bind(_L2));window.onerror=chain(function(msg,_L4,_L5){console.error('Exception: "'+msg+'" in '+_L4+': '+_L5+'\n'+Util.stack());return false;},window.onerror);}copy_properties(TabConsole.prototype,{log:function(_L0,_L1){var div=document.createElement('div');if(DOM.isNode(_L0)){div.appendChild(_L0);}else div.innerHTML=_L0;CSS.setClass(div,'javascript_log '+_L1);if(this.prefs.icespider.value!='noswitch')this.tabgroup&&this.tabgroup.select('javascript');this.console.appendChild(div);this.console.scrollTop=this.console.scrollHeight;this.console.hasMessages=true;this.redraw();},redraw:function(){return;var _L0=ge('pagefooter');if(!_L0)return;var _L1=CSS.getStyle(_L0,'marginTop');var _L2=_L1-$('tabconsole').offsetHeight;_L0.style.marginTop=_L2+'px';},previousTab:function(){this.tabgroup.prevTab();DOMScroll.scrollTo(this.tabgroup.getBaseElement());return this;},nextTab:function(){this.tabgroup.nextTab();DOMScroll.scrollTo(this.tabgroup.getBaseElement());this.redraw();return this;},select:function(tab){hide(this.seltab);this.seltab=$('con_tab_'+tab);setCookie('tconpref_seltab','con_tab_'+tab,365*24*3600000);show(this.seltab);this.redraw();return false;},onselect:function(tab){if(tab===null&&this.console.hasMessages){this.tabgroup.select('javascript');}else this.select(tab);return false;},onexception:function(e){if(e.name=='SyntaxError'){this.log('Syntax Error!','exception');}else this.log(sprintf('Exception: %x',e),'exception');},onresult:function(_L0){var _L1=new Date().getTime();if(_L0!==undefined)this.log($N('div',{},[IceSpiderInspectable.factory(_L0).dom(),$N('span',{className:'timing'},'('+(_L1-this.js_start)+' ms)')]),'output');this.history.push(this.jsinput.value);(new AsyncSignal('/intern/ajax/icespider.php',{command:this.jsinput.value})).send();this.hpos=this.history.length;this.jsinput.value='';},focusJavascriptConsole:function(){this.tabgroup.select('javascript');setTimeout(function(){this.jsinput.focus();}.bind(this),0);}});copy_properties(TabConsole,{instance:null,getInstance:function(){return TabConsole.instance;}});function TabConsoleCacheobserver(tab,id){this.tabGroup=TabGroup.find(id);this.baseId=id+'_';this.currentTab='main';this.onselect=this.onselect.bind(this);this.asyncCall=0;this.tabGroup.setDelegate(this);this.parentTab=tab;TabConsoleCacheobserver.instance=this;}TabConsoleCacheobserver.getInstance=function(){return TabConsoleCacheobserver.instance;};TabConsoleCacheobserver.prototype.onselect=function(key){hide($(this.baseId+this.currentTab));show($(this.baseId+(this.currentTab=key)));};TabConsoleCacheobserver.prototype.addAsyncObservation=function(_L0){this.tabGroup.addJSTab(++this.asyncCall,'Async '+this.asyncCall);var div=document.createElement('div');div.id=this.baseId+this.asyncCall;div.style.display='none';set_inner_html(div,_L0);this.parentTab.appendChild(div);};function TabGroup(key){copy_properties(this,{name:key,base:$('tabgroup_'+key),tabs:{},tabNames:[],selected:null,delegate:null});}copy_properties(TabGroup.prototype,{onclick:function(key){this.select(key);return false;},getBaseElement:function(){return this.base;},setDelegate:function(_L0){this.delegate=_L0;if(this.selected)this.delegate.onselect&&this.delegate.onselect(this.selected);return this;},selectDefault:function(key){if(!this.selected)this.select(key);return this;},select:function(key){if(!this.tabs[key]||this.selected==key)return;if(this.selected)CSS.removeClass(this.tabs[this.selected],'selected');CSS.addClass(this.tabs[key],'selected');this.selected=key;if(this.delegate)this.delegate.onselect&&this.delegate.onselect(key);return this;},setTabs:function(_L0){var _L1=this.base.getElementsByTagName('div');var kk=0;for(var ii=0;ii<_L1.length;ii++)if(CSS.hasClass(_L1[ii],'tab')){this.tabs[_L0[kk]]=_L1[ii];this.tabs[_L0[kk]].firstChild.onclick=bind(this,'onclick',_L0[kk]);kk++;}this.tabNames=_L0;if(this.selected)this.select(this.selected);return this;},prevTab:function(){return this.cycleSelectedTab(-1);},nextTab:function(){return this.cycleSelectedTab(1);},cycleSelectedTab:function(_L0){var ii=0;var ll=this.tabNames.length;_L0=_L0%ll;for(var k in this.tabs){if(k==this.selected){this.select(this.tabNames[(ii+_L0+ll)%ll]);return this;}++ii;}},addJSTab:function(key,_L1){var _L2=this.base.lastChild;var cap=document.createElement('div');CSS.setClass(cap,'cap');this.base.insertBefore(cap,_L2);var tab=document.createElement('div');CSS.setClass(tab,'tab');var _L5=document.createElement('a');_L5.href='#';_L5.appendChild(document.createTextNode(_L1));_L5.onclick=this.onclick.bind(this,key);tab.appendChild(_L5);this.base.insertBefore(tab,_L2);this.tabNames.push(key);this.tabs[key]=tab;}});copy_properties(TabGroup,{groups:{},find:function(key){if(!TabGroup.groups[key]){TabGroup.groups[key]=new TabGroup(key);onunloadRegister(function(){delete TabGroup.groups[key];},true);}return TabGroup.groups[key];}});function TabConsoleCacheobserver(tab,id){this.tabGroup=TabGroup.find(id);this.baseId=id+'_';this.currentTab='main';this.onselect=this.onselect.bind(this);this.asyncCall=0;this.tabGroup.setDelegate(this);this.parentTab=tab;TabConsoleCacheobserver.instance=this;}TabConsoleCacheobserver.getInstance=function(){return TabConsoleCacheobserver.instance;};TabConsoleCacheobserver.prototype.onselect=function(key){hide($(this.baseId+this.currentTab));show($(this.baseId+(this.currentTab=key)));};TabConsoleCacheobserver.prototype.addAsyncObservation=function(_L0){this.tabGroup.addJSTab(++this.asyncCall,'Async '+this.asyncCall);var div=document.createElement('div');div.id=this.baseId+this.asyncCall;div.style.display='none';set_inner_html(div,_L0);this.parentTab.appendChild(div);};function IceSpiderInspectable(){}IceSpiderInspectable.refIndex=[];IceSpiderInspectable.refCount=[];IceSpiderInspectable.maxDepth=4;IceSpiderInspectable.factory=function(ref){var _L1=null;if(typeof ref=='number'){_L1=IceSpiderInspectableNumber;}else if(typeof ref=='string'){_L1=IceSpiderInspectableString;}else if(DOM.isNode(ref)){_L1=IceSpiderInspectableDOM;}else if(typeof ref=='function'){_L1=IceSpiderInspectableFunction;}else if(ref instanceof Array||((ref instanceof Object||ref+''=='[object]')&&ref.length!==undefined)){_L1=IceSpiderInspectableArray;}else if(ref instanceof Stack){_L1=IceSpiderInspectableStack;}else if(ref instanceof Object){_L1=IceSpiderInspectableObject;}else _L1=IceSpiderInspectableNotReally;var _L2=new _L1(ref);return _L2;};IceSpiderInspectable.modifyMaxDepth=function(_L0){return Math.max(IceSpiderInspectable.maxDepth+=_L0,0);};function IceSpiderInspectableNotReally(ref){this.ref=ref;}IceSpiderInspectableNotReally.prototype.dom=function(){return $N('span',{className:'lol'},this.ref+'');};function IceSpiderInspectableRecursion(ref){}IceSpiderInspectableRecursion.prototype.dom=function(){return $N('span',{className:'lol'},'* * recursion * * '+this.ref+'');};function IceSpiderInspectableNumber(ref){this.ref=ref;}IceSpiderInspectableNumber.prototype.dom=function(){return $N('span',{className:'number'},this.ref);};function IceSpiderInspectableString(ref){this.ref=ref;}IceSpiderInspectableString.prototype.dom=function(){return $N('span',{className:'string'},'"'+this.ref.replace(/("|\\)/g,'\\$1').replace(/\n/g,'\\n')+'"');};function IceSpiderInspectableDOM(ref){this.ref=ref;}IceSpiderInspectableDOM.prototype.dom=function(){var dom=$N('a',{className:'string',href:'#'},(this.ref.tagName?'<'+this.ref.tagName.toLowerCase()+' />':(new IceSpiderInspectableString(this.ref.nodeValue)).dom()));dom.onclick=this.locate.bind(this,dom);return dom;};IceSpiderInspectableDOM.prototype.locate=function(_L0){if(DOM.contains(document.body,this.ref)){if(!this.ref.offsetWidth||!this.ref.offsetHeight){Util.warn('Tried to locate a DOM element that is currently collapsed into singularity!');}else{var box=$N('div',{className:'ice_spider_dom_box'},[$N('span',{className:'width'},this.ref.offsetWidth+'px'),$N('span',{className:'height'},this.ref.offsetHeight+'px'),$N('div',{className:'color'})]),_L2=$N('div',{className:'ice_spider_dom_border'}),_L3;Vector2.getElementPosition(this.ref).setElementPosition(box).setElementPosition(_L2);Vector2.getElementDimensions(this.ref).setElementDimensions(box.lastChild).setElementDimensions(_L2);_L3=_L2.cloneNode(false);_L2.style.left=_L3.style.top='-2px';var doc=Vector2.getDocumentDimensions();_L2.style.width=doc.x+'px';_L3.style.height=doc.y+'px';document.body.appendChild(box);document.body.appendChild(_L2);document.body.appendChild(_L3);var i=0;var evt=function(_L7){if($E(_L7).getTarget()==_L0)return;removeEventBase(document.body,'click',evt);box.parentNode.removeChild(box);_L2.parentNode.removeChild(_L2);_L3.parentNode.removeChild(_L3);return Event.kill(_L7);}.bind(this);addEventBase(document.body,'click',evt);}}else Util.warn('Tried to locate a DOM element that isn\'t actually in the DOM!');return false;};function IceSpiderInspectableArray(ref){this.ref=ref;}IceSpiderInspectableArray.domWithCommas=function(ref,i,e){var _L3=[];for(var k=i;k<e;k++){_L3.push(IceSpiderInspectable.factory(ref[k]).dom());if(k+1<e)_L3.push($N('span',{className:'comma'},', '));}return _L3;};IceSpiderInspectableArray.prototype.dom=function(){var dom=$N('span',{className:'array'});dom.appendChild($N('span',{className:'bracket'},'['));var _L1=IceSpiderInspectable.modifyMaxDepth(-1);IceSpiderInspectableArray.domWithCommas(this.ref,0,Math.min(this.ref.length,_L1)).each(function(val){dom.appendChild(val);});if(_L1<this.ref.length){var _L2=$N('a',{className:'more',href:'#'},this.ref.length-_L1+' more...');_L2.onclick=this.more.bind(this,_L2,_L1);if(_L1)dom.appendChild($N('span',{className:'comma'},', '));dom.appendChild(_L2);}IceSpiderInspectable.modifyMaxDepth(1);dom.appendChild($N('span',{className:'bracket'},']'));return dom;};IceSpiderInspectableArray.prototype.more=function(_L0,_L1){var dom=$N('span'),_L3=IceSpiderInspectable.modifyMaxDepth(0),_L1=IceSpiderInspectable.modifyMaxDepth(-_L3);IceSpiderInspectableArray.domWithCommas(this.ref,_L1,this.ref.length).each(function(val){dom.appendChild(val);});IceSpiderInspectable.modifyMaxDepth(_L3);_L0.parentNode.insertBefore(dom,_L0);_L0.parentNode.removeChild(_L0);return false;};function IceSpiderInspectableObject(ref){this.ref=ref;this.length=0;for(var i in ref)++this.length;}IceSpiderInspectableObject.domWithCommas=function(ref,i,e){var _L3=[],c=0;for(var k in ref)if(ref.hasOwnProperty(k)&&k!='__instance'&&k!='__parents'&&k!='parent'){if(c>=i)if(c==e){break;}else{_L3.push($N('span',{className:'key'},k));_L3.push($N('span',{className:'color'},': '));_L3.push(IceSpiderInspectable.factory(ref[k]).dom());if(c+1<e)_L3.push($N('span',{className:'comma'},', '));}++c;}return _L3;};IceSpiderInspectableObject.prototype.dom=function(){var _L0='';if(typeof this.ref.constructor=='function'&&this.ref.constructor!=Object)_L0=Stack.functionGetName(this.ref.constructor)+' ';var dom=$N('span',{className:'object'});dom.appendChild($N('span',{className:'name'},_L0));dom.appendChild($N('span',{className:'bracket'},'{'));var _L2=IceSpiderInspectable.modifyMaxDepth(-1);IceSpiderInspectableObject.domWithCommas(this.ref,0,Math.min(this.length,_L2)).each(function(val){dom.appendChild(val);});if(_L2<this.length){var _L3=$N('a',{className:'more',href:'#'},this.length-_L2+' more...');_L3.onclick=this.more.bind(this,_L3,_L2);if(_L2)dom.appendChild($N('span',{className:'comma'},', '));dom.appendChild(_L3);}IceSpiderInspectable.modifyMaxDepth(1);dom.appendChild($N('span',{className:'bracket'},'}'));return dom;};IceSpiderInspectableObject.prototype.more=function(_L0,_L1){var dom=$N('span'),_L3=IceSpiderInspectable.modifyMaxDepth(0),_L1=IceSpiderInspectable.modifyMaxDepth(-_L3);IceSpiderInspectableObject.domWithCommas(this.ref,_L1,this.length).each(function(val){dom.appendChild(val);});IceSpiderInspectable.modifyMaxDepth(_L3);_L0.parentNode.insertBefore(dom,_L0);_L0.parentNode.removeChild(_L0);return false;};function IceSpiderInspectableFunction(ref){this.ref=ref;}IceSpiderInspectableFunction.prototype.dom=function(){var _L0=Stack.functionGetName(this.ref),dom=$N('span',{className:'function'});dom.appendChild($N('a',{href:'#',onclick:this.more.bind(this,dom)},trim((/^(function[^{]+)/.exec(this.ref.toString())||['function()']).pop())));return dom;};IceSpiderInspectableFunction.prototype.more=function(dom){DOM.setContent(dom,$N('pre',{className:'src'},HTML(htmlspecialchars(this.ref.toString()).replace('\n','<br />'))));dom.onclick=null;return false;};function IceSpiderInspectableStack(ref){this.ref=ref;}IceSpiderInspectableStack.prototype.dom=function(){var dom=$N('div',{className:'stack'});for(var i=0;i<this.ref.stack.length;i++){var _L2=this.ref.stack[i],_L3=$N('div',{className:'frame'});_L3.appendChild($N('span',{className:'depth'},'#'+i+' '));_L3.appendChild((new IceSpiderInspectableFunction(_L2.func)).dom());var _L4=$N('span',{className:'args'},$N('span',{className:'paren'},'('));for(var j=0;j<_L2.args.length;j++){_L4.appendChild(IceSpiderInspectable.factory(_L2.args[j]).dom());if(j+1<_L2.args.length)_L4.appendChild($N('span',{className:'comma'},', '));}_L4.appendChild($N('span',{className:'paren'},')'));_L3.appendChild(_L4);_L3.appendChild($N('span',{className:'at'},' @ '));_L3.appendChild($N('span',{className:'line'},Stack.frameSrcToString(_L2.file&&_L2.file.replace(document.location.protocol+'//'+document.location.host,''),_L2.line)));dom.appendChild(_L3);}return dom;};

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