/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 9th 2010 9:16:08 PM PST                             */
/*      Machine:  10.16.139.110                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/diounk121a800ko8.pkg.js h:7lnth056                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/diounk121a800ko8.pkg.js                                   */

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

function ComposerAttachment(){this._container=null;}copy_properties(ComposerAttachment,{newFromURL:function(url,_L1){if(!/(?:https?:\/\/)?\w+\.\w+/.test(url))return false;var _L2=new ComposerAttachment();_L2.url=url;new AsyncRequest().setURI('/ajax/inbox/ajax.php').setData({action:'attachment',url:url}).setHandler(_L2._asyncCallback.bind(_L2)).setErrorHandler(_L1).send();return _L2;},setupThumbnails:function(_L0,obj){var _L2=new ImageSandbox();_L2.onfinish=function(){_L0=_L2.getImages();for(var i=_L0.length-1;i>=0;i--)if(_L0[i].width&&(_L0[i].height<50||_L0[i].width<50||_L0[i].height/_L0[i].width>3||_L0[i].width/_L0[i].height>3))_L0.splice(i,1);if(!_L0.length){CSS.removeClass(obj,'loading');CSS.removeClass(obj.parentNode,'has_image');var _L4=obj;while(_L4.parentNode&&_L4.tagName.toLowerCase()!='form')_L4=_L4.parentNode;_L4=_L4.getElementsByTagName('input');for(var i=0;i<_L4.length;i++)if(_L4[i].name.indexOf('[params][images]')!=-1)_L4[i].parentNode.removeChild(_L4[i]);return;}for(var si=0;si<_L0.length-1;si++)for(var sj=_L0.length-1;sj>=si;sj--)if(_L0[si].width*_L0[si].height<_L0[sj].width*_L0[sj].height){temp=_L0[si];_L0[si]=_L0[sj];_L0[sj]=temp;}var _L4=obj;while(_L4.parentNode&&_L4.tagName.toLowerCase()!='form')_L4=_L4.parentNode;_L4=_L4.getElementsByTagName('input');for(var i=0;i<_L4.length;i++)if(_L4[i].name.indexOf('[params][images]')!=-1){_L4=_L4[i];break;}CSS.removeClass(obj,'loading');new ThumbnailSelector(obj,_L4,_L0);}.bind(this);_L2.loadImages(_L0);}});copy_properties(ComposerAttachment.prototype,{containerReady:function(obj,_L1){this._container=obj;var _L2=obj.getElementsByTagName('input');var _L3=[''];for(var i=0;i<_L2.length;i++)if(_L2[i].type=='text'||_L2[i].type=='hidden')_L3.push('<input type="hidden" name="'+htmlspecialchars(_L2[i].name)+'" value="'+htmlspecialchars(_L2[i].value)+'" />');if(_L1){_L3.push('&nbsp;');obj.innerHTML=_L3.join('');CSS.addClass(obj,'share_attachment_loading');}else obj.innerHTML+=_L3.join('');},_renderInputsRecursive:function(_L0,_L1){if(_L1===null)return '';var _L2=[];if(typeof(_L1)=='object'){for(var i in _L1)_L2.push(this._renderInputsRecursive(_L0+'['+i+']',_L1[i]));}else if(typeof(_L1)!='function')_L2.push('<input type="hidden" name="',_L0,'" value="',htmlspecialchars(_L1),'" />');return _L2.join('');},_asyncCallback:function(_L0){var _L1=_L0.getPayload();var _L2=[_L1.html];_L2.push(this._renderInputsRecursive('attachment[params]',_L1.params));_L2.push('<input type="hidden" name="attachment[type]" value="',_L1.type,'" />');CSS.removeClass(this._container,'share_attachment_loading');set_inner_html(this._container,_L2.join(''));}});function ThumbnailSelector(obj,_L1,_L2){var _L3=['<div class="thumbnail_stage"><h4>'+_tx("Dewisiwch M\u00e2n-lun")+'</h4><div class="selector clearfix"><div class="arrows clearfix">','<span class="left"><a href="#" class="arrow disabled">&nbsp;</a></span>','<span class="right"><a href="#" class="arrow ',_L2.length>1?'enabled':'disabled','">&nbsp;</a></span>','</div><div class="counter"><span>1 of ',_L2.length,'</span></div></div>'];for(var k=0;k<_L2.length;k++)_L3.push('<div class="thumbnail',k==0?' thumbnail_selected':' thumbnail_unselected','">','<img class="img_loading" src="',_L2[k].src,'" onload="adjustImage(this);" />','</div>');_L3.push('<label style="white-space:nowrap"><input name="no_picture" type="checkbox" onclick="this.parentNode.parentNode.parentNode.thumbnail.use_thumbnail(this.checked)" />'+_tx("No Picture")+'</label></div>');obj.innerHTML=_L3.join('');this.images=_L2;this.input=_L1;_L1.value=this.images[0].src;this.obj=obj;this.obj.thumbnail=this;this.label=obj.getElementsByTagName('span')[2];this.index=0;var _L5=obj.getElementsByTagName('a');this.left=_L5[0];this.right=_L5[1];this.left.onclick=this.left_arrow_press.bind(this);this.right.onclick=this.right_arrow_press.bind(this);this.left.onselectstart=this.right.onselectstart=function(){return false;};this.left.onmousedown=this.right.onmousedown=this._onmousedown;this.left.onmouseout=this.right.onmouseout=this._onmouseout;}copy_properties(ThumbnailSelector.prototype,{use_thumbnail:function(_L0){if(!_L0){this.move_selection(0);CSS.removeClass(this.obj,'thumbnail_dont_use');}else{this.input.value='';CSS.addClass(this.obj,'thumbnail_dont_use');}},_onmousedown:function(){CSS.addClass(this,'active');return false;},_onmouseout:function(){CSS.removeClass(this,'active');},left_arrow_press:function(){CSS.addClass(this.left,'active');this.move_selection(-1);return false;},right_arrow_press:function(){CSS.removeClass(this.right,'active');this.move_selection(1);return false;},move_selection:function(_L0){var _L1=this.index+_L0;if(_L1>=0&&_L1<this.images.length){var _L2=this.obj.getElementsByTagName('div');var j=0;this.index=_L1;for(var i=0;i<_L2.length;i++){var _L5=_L2[i].className;if(!CSS.hasClass(_L2[i],'thumbnail '))continue;var _L6=j==_L1;if(_L5.indexOf(_L6?'_unselected':'_selected')!=-1)CSS.setClass(_L2[i],_L5.replace(/thumbnail_(?:un)?selected/,_L6?'thumbnail_selected':'thumbnail_unselected'));j++;}this.label.innerHTML=_tx("{selected} o {total}",{selected:(_L1+1),total:j});CSS.setClass(this.left,this.left.className.replace(/[^ ]+abled/,_L1==0?'disabled':'enabled'));CSS.setClass(this.right,this.right.className.replace(/[^ ]+abled/,_L1==this.images.length-1?'disabled':'enabled'));this.input.value=this.images[_L1].src;}}});function ImageSandbox(){this.obj=document.createElement('div');this.obj.style.left=this.obj.style.top='-100px';this.obj.style.width=this.obj.style.height='1px';this.obj.style.overflow='hidden';this.images=0;this.done=0;DOM.getRootElement().appendChild(this.obj);}copy_properties(ImageSandbox.prototype,{loadImages:function(_L0){this.images=_L0.length;for(var i=0;i<_L0.length;i++)new ImageSandboxLoader(this,_L0[i]);},onImageLoaded:function(_L0){this.done++;this._stateChange();},onImageFailed:function(_L0){_L0.destroy();this.images--;this._stateChange();},getImages:function(){var _L0=new Array();var _L1=this.obj.getElementsByTagName('img');for(var i=0;i<_L1.length;i++)_L0.push(_L1[i]);return _L0;},_stateChange:function(){if(this.done==this.images)if(this.onfinish)this.onfinish();}});function ImageSandboxLoader(_L0,img){this._timeout=4000;this._start=new Date().getTime();this._sandbox=_L0;if(typeof img!='object')img={src:img};this._obj=document.createElement('img');this._obj.onload=function(){if(this._pollImage)this._pollImage(1);}.bind(this);this._obj.onerror=function(){if(this._pollImage)this._pollImage(2);}.bind(this);copy_properties(this._obj,img);this._sandbox.obj.appendChild(this._obj);if(this._pollImage!==null)this._pollImage();}copy_properties(ImageSandboxLoader.prototype,{_pollImage:function(_L0){if(_L0==1){this._pollImage=null;this._sandbox.onImageLoaded(this);}else if(_L0==2){this._pollImage=null;this._sandbox.onImageFailed(this);}else if(image_has_failed(this._obj)){this._pollImage(2);}else if(image_has_loaded(this._obj)){this._pollImage(1);}else if((this._start+this._timeout)<new Date().getTime()){this._pollImage(2);}else setTimeout(function(){if(this._pollImage)this._pollImage();}.bind(this),20);},destroy:function(){DOM.remove(this._obj);this._obj=null;}});
function UrlDetector(_L0){this.element=_L0;this.lastCharCount=0;this.lastScrapedURL=null;this.detectionInterval=null;this.suppressDetection=bagofholding;Event.listen(_L0,'focus',this.startDetectionInterval.bind(this));Event.listen(_L0,'blur',this.stopDetectionInterval.bind(this));var _L1=DOM.isNode(this.element,['input','textarea']);copy_properties(this,{getText:_L1?function(){return this.element.value;}:function(){return DOM.getText(this.element);},setText:_L1?function(_L2){this.element.value=_L2;}:function(_L2){DOM.setText(this.element,_L2);}});}UrlDetector.mixin('Arbiter',{getText:bagofholding,setText:bagofholding,setSuppressDetectionCheck:function(fn){this.suppressDetection=fn;},startDetectionInterval:function(){if(this.detectionInterval||this.suppressDetection())return;this.detectionInterval=setInterval(this.detectionIntervalFire.bind(this),250);},stopDetectionInterval:function(){this.detectionInterval=clearInterval(this.detectionInterval);},detectionIntervalFire:function(){if(this.suppressDetection())return;var _L0=this.getText().length;if((_L0-this.lastCharCount)>5||(this.lastCharCount==0&&_L0>1))var _L1=true;this.lastCharCount=_L0;var url=this.detectUrl(_L1);if(url)this.inform('urlDetected',url);},detectUrl:function(_L0){var url='',_L2=this.getText(),_L3=endPos=-1;if(_L0){url=_L2.match(/www\.\S*/i);if(url){_L3=_L2.indexOf(url[0]);endPos=_L3+url[0].length;url="http://"+url[0];}else{var _L4=_L2.match(/(http|fb):\/\/\S*/i);if(_L4){url=_L4[0];_L3=_L2.indexOf(_L4[0]);endPos=_L3+_L4[0].length;}}}else{url=_L2.match(/www\.\S*[\s|\)|\!]/i);if(url){_L3=_L2.indexOf(url[0]);endPos=_L3+url[0].length;url="http://"+url[0];}else{var _L4=_L2.match(/(http|fb):\/\/\S*[\s|\)|\!]/i);if(_L4){url=_L4[0];_L3=_L2.indexOf(_L4[0]);endPos=_L3+_L4[0].length;}}}if(url){url=url.replace(/[\s|\)|\!]/g,'');var _L5=url.charAt(url.length-1);if(_L5.match(/[,|.]/))url=url.substr(0,url.length-1);if(url!=this.lastScrapedURL){this.lastScrapedURL=url;if(url.search('fb:')==0)this.setText(_L2.substr(0,_L3)+_L2.substr(endPos));}else url='';}return url;}});
function fix_attachment_more_menu_alignment(_L0){var _L1=ge('attachment_buttons_list');var _L2=_L1.offsetWidth;if(_L0){var _L3=Vector2.getElementPosition(_L0).x;var _L4=Vector2.getElementPosition(_L1).x;var _L5=_L3-_L4;var _L6=_L0.offsetWidth;var _L7=_L2-_L5;if(_L7>=_L6&&_L7<126){var _L8=ge('wall_more_menu');var _L9=0;_L8.style.left='auto';_L8.style.right=_L9+'px';}}}function wall_video_thumb_adjust(_L0,_L1){if(ua.ie()>=6&&ua.ie()<7){_L0.style.marginTop=(-1*_L1.height-3)+'px';_L0.style.paddingTop=(_L1.height-19)+'px';}_L0.style.display='block';}function attachments(_L0){this.attachment_added=false;this.attachment_oid=null;this.attachment_app_id=null;this.is_share=false;this.attached_share=false;this.scrape_last_count=0;this.dialog=null;this.wall_attachments={};this.last_url_scraped=null;this.context=_L0;this.edit_container_id='attachment_edit_container_'+_L0;this.edit_loading_id='attachment_edit_loading_'+_L0;this.edit_id='attachment_edit_'+_L0;this.view_container_id='attachment_view_container_'+_L0;this.view_wrapper_id='attachment_view_wrapper_'+_L0;this.view_id='attachment_view_'+_L0;this.remove_id='attachment_remove_'+_L0;this.view_loading_id='attachment_view_loading_'+_L0;this.is_active=false;}attachments.prototype.show_edit_loading=function(){show(this.edit_loading_id);};attachments.prototype.hide_edit_loading=function(){hide(this.edit_loading_id);};attachments.prototype.show_attachment_edit=function(_L0,_L1,_L2,_L3){this.is_active=true;if(this.dialog)return;var _L4=(_L2==14);this.is_share=(_L2==100);var _L5='<div id="'+this.edit_container_id+'">'+'<div id="'+this.edit_loading_id+'">&nbsp;</div>'+'</div>';this.dialog=new Dialog().setImmediateRendering(true).setClassName('attachment_dialog').setTitle(_L0).setBody(_L5).setStackable(true).setButtons([Dialog.newButton('attach',_tx("Atodi"),'',function(){if(this.is_share){this._share_attach();}else this._attach(_L4,_L3,true);this.dialog.hide();this.dialog=null;this.is_active=false;}.bind(this)),Dialog.newButton('cancel',_tx("Canslo"),'inputaux',function(){this.dialog.hide();this.remove_attachment_view();this.dialog=null;this.is_active=false;}.bind(this))]).show();var _L6=ge(this.edit_container_id);var div=document.createElement('div');div.className='share_stage';CSS.addClass(div,'attachment_edit');div.id=this.edit_id;div.is_app=_L4;_L6.appendChild(div);set_inner_html(div,_L1);if(this.is_share){placeholderSetup('share_link');if(ua.ie()<7)$('share_link').focus();}return div;};attachments.prototype._show_attachment_view=function(_L0,_L1){var _L2=ge(this.view_container_id);var div=document.createElement('div');div.className='share_stage';CSS.addClass(div,'attachment_view');div.id=this.view_id;div.is_app=_L1;_L2.appendChild(div);set_inner_html(div,_L0);hide('attachment_buttons_list');var _L4=ge(this.view_wrapper_id);_L4.style.display='block';this.attachment_added=true;return div;};attachments.prototype.remove_attachment_view=function(){var _L0=ge(this.view_container_id);var _L1=ge(this.view_id);if(this.attachment_added&&_L1){this.removed=true;_L0.removeChild(_L1);hide(this.view_wrapper_id);if(ge('attachment_buttons_list'))show('attachment_buttons_list');var _L2=ge(this.remove_id);CSS.setClass(_L2,_L2.className.replace(' edit',''));}this.attachment_added=false;this.attachment_oid=null;this.attachment_app_id=null;this.is_share=false;this.attached_share=false;};attachments.prototype.get_all_form_elements=function(_L0){var _L1=[];if(_L0){var _L2=_L0.getElementsByTagName('input');for(var i=0;i<_L2.length;i++)_L1.push(_L2[i]);var _L4=_L0.getElementsByTagName('select');for(var i=0;i<_L4.length;i++)_L1.push(_L4[i]);var _L5=_L0.getElementsByTagName('textarea');for(var i=0;i<_L5.length;i++)_L1.push(_L5[i]);}return _L1;};attachments.prototype._add_attachment_input_data=function(_L0,_L1){if(!_L1)return false;var _L2=this.get_all_form_elements(_L1);if(_L1.is_app){_L0['attachment']={'app':{},'type':14};for(var i=0;i<_L2.length;i++)if(!(_L2[i].type=="radio"||_L2[i].type=="checkbox")||_L2[i].checked)_L0['attachment']['app'][_L2[i].name]=_L2[i].value;}else{var _L4=false;for(var i=0;i<_L2.length;i++){if(_L2[i].name=='attachment[type]')_L4=true;if(_L2[i].name=='attachment[params][url]')if(!_L2[i].value||_L2[i].value=='http://')return false;_L0[_L2[i].name]=_L2[i].value;}if(!_L4)return false;}_L0['context']=this.context;return true;};attachments.prototype._attach=function(_L0,_L1,_L2){var _L3={};if(_L2){var _L4=ge(this.edit_id);var _L5=this._add_attachment_input_data(_L3,_L4);if(!_L5)return;}if(_L1)for(var _L6 in _L1)_L3[_L6]=_L1[_L6];var _L7=ge(this.view_loading_id);_L7.style.display='block';var _L8=this._show_attachment_view('',_L0);var _L9=function(_La){var _Lb=_La.getPayload();if(!_L8.removed){hide(this.view_loading_id);set_inner_html(_L8,_Lb['html']);this.attachment_oid=_Lb['oid'];this.attachment_app_id=_Lb['app_id'];}}.bind(this);new AsyncRequest().setHandler(_L9).setURI('/ajax/attachments.php').setErrorHandler(this.remove_attachment_view).setTransportErrorHandler(this.remove_attachment_view).setData(_L3).send();};attachments.prototype.add_post_data=function(_L0){if(this.attachment_added)if(this.attached_share){this._add_attachment_input_data(_L0,ge(this.view_id));}else _L0['attachment']={'oid':this.attachment_oid,'app_id':this.attachment_app_id};};attachments.prototype.prepare_wall_post=function(){var _L0=ge(this.view_id);if(_L0){var _L1=this.get_all_form_elements(_L0);for(var i=0;i<_L1.length;i++)_L1[i].disabled=true;}};attachments.prototype.show_full_attachment=function(_L0){if(typeof this.wall_attachments[_L0]!='string')return;hide('attachment_compact_'+_L0);hide('attached_item_info_'+_L0);hide('attachment_compact_td_'+_L0);attachment_div=ge('wall_attachment_'+_L0);set_inner_html(attachment_div,this.wall_attachments[_L0]);};attachments.prototype.fix_app_inputs_on_send=function(){var _L0=ge(this.view_id);if(!this.attachment_added||!_L0)return;if(!this.attached_share){new_inputs=[];new_inputs.push(create_hidden_input('attachment[oid]',this.attachment_oid));new_inputs.push(create_hidden_input('attachment[app_id]',this.attachment_app_id));if(_L0.is_app){new_inputs.push(create_hidden_input('attachment[type]',14));new_inputs.push(create_hidden_input('attachment[app][message_sent]',true));}for(var i=0,il=new_inputs.length;i<il;i++)_L0.appendChild(new_inputs[i]);}};attachments.prototype.share_attach_from_dialog=function(){this._share_attach();Dialog.getCurrent().hide();this.dialog=null;};attachments.prototype._share_attach=function(){var _L0=ge('share_link');var url=_L0.value;if(url&&url!='http://')this._share_submit_url(url);};attachments.prototype._share_submit_url=function(url){this._show_attachment_view(this.share_html_block,false);var _L1=ge(this.view_container_id);var _L2=_L1.childNodes[0].childNodes[0].childNodes[0];this._attach_link_url(_L2,url,true);var _L3=ge(this.remove_id);_L3.className+=' edit';this.attached_share=true;};attachments.prototype._attach_link_url=function(obj,url,_L2){var _L3=function(_L5){this.remove_attachment_view();}.bind(this);var _L4=ComposerAttachment.newFromURL(url,_L3);_L4.containerReady(obj,_L2);};attachments.prototype._is_fb_code_url=function(url){return url.search('fb:')==0;};attachments.prototype._auto_attach_link=function(_L0,url){if(this._is_fb_code_url(url)){var _L2={'code':url,'context':this.context};this._attach(true,_L2,false);}else this._share_submit_url(url);};attachments.prototype.register_url_detection=function(_L0){var _L1=new UrlDetector($(_L0));_L1.subscribe('urlDetected',this._auto_attach_link.bind(this));_L1.setSuppressDetectionCheck(function(){return this.attachment_added;}.bind(this));};
function FeedFormBase(){this._storyType=63;this._feedData=null;this._uri='/fbml/ajax/prompt_feed.php';this._buttonCallback=null;this._isNile=false;this._supportsUserMessage=false;this._userMessagePrompt='';this._userMessage={value:''};this._currentSize=0;this._connectLocation=0;this._postId=null;this._hasTargets=false;this._profileType=0;}FeedFormBase.SIZES={"small":1,"medium":2};FeedFormBase.AUTO_PUBLISH_OPTIONS={"never":2,"small":4,"medium":5};FeedFormBase.PROFILE_TYPE={"user":101,"page":102,"group":103};FeedFormBase.shouldShowLoadingToSelf=false;FeedFormBase.shouldShowLoadingToOthers=false;FeedFormBase.prototype.setStoryType=function(_L0){this._storyType=_L0;return this;};FeedFormBase.prototype.setProfileType=function(val){this._profileType=val;return this;};FeedFormBase.prototype.setForm=function(id){if(this._elements){Util.error('Cannot use both setForm and setElements.  Pick one or the other.');return null;}this._form=$(id);return this;};FeedFormBase.prototype.setElements=function(_L0){if(this._form){Util.error('Cannot use both setForm and setElements.  Pick one or the other.');return null;}this._elements=_L0;return this;};FeedFormBase.prototype.setFeedData=function(_L0){this._feedData=_L0;return this;};FeedFormBase.prototype.setAppId=function(_L0){this._appid=_L0;return this;};FeedFormBase.prototype.setConnectLocation=function(_L0){this._connectLocation=_L0;return this;};FeedFormBase.prototype.setUserMessagePrompt=function(_L0){this._userMessagePrompt=_L0;return this;};FeedFormBase.prototype.setUserMessage=function(_L0){if(_L0)if(typeof _L0=='string'){this._userMessage={value:_L0};}else this._userMessage=_L0;return this;};FeedFormBase.prototype.setURI=function(uri){this._uri=uri;return this;};FeedFormBase.prototype.setContinuation=function(_L0){this._continuation=_L0;return this;};FeedFormBase.prototype.setButtonCallback=function(_L0){this._buttonCallback=_L0;return this;};FeedFormBase.prototype._selectSize=function(_L0){var _L1=_L0['size'];if(_L1!=this._currentSize){CSS.removeClass(this._selectedSize,'Tabset_selected');animation($('preview_'+this._currentSize)).to('opacity',0).hide().duration(150).go();animation($('preview_'+_L1)).duration(150).checkpoint().show().from('opacity',0).to('opacity',1).duration(150).go();this._selectedSize=_L0;this._currentSize=_L1;CSS.addClass(this._selectedSize,'Tabset_selected');}return false;};FeedFormBase.prototype.attachHandlers=function(_L0){if(!this._isNile)this._attachSizeHandlers(_L0);var _L1=$('preview_container').scry('a');_L1.forEach(function(_L2){_L2.listen('click',function(e){e.kill();});});if(this._supportsUserMessage)$('feedform_user_message').focus();return this;};FeedFormBase.prototype._attachSizeHandlers=function(_L0){var _L1=this._selectorOptions;var _L2=this._feedformFilter;for(var i=0;i<_L1.length;i++){var _L4=$(_L2+'_'+_L1[i]['size']);var _L5=$(_L2+'_'+_L1[i]['size']+'_anchor');var _L6=_L1[i]['size'];_L1[i]['node']=_L4;if(CSS.hasClass(_L4,'Tabset_selected')){this._selectedSize=_L1[i];this._currentSize=_L6;}addEventBase(_L5,'click',this._selectSize.bind(this,_L1[i]),_L6);}return true;};FeedFormBase.prototype._finish=function(){this._enableSubmitButtons();if(this._dialog)this._dialog.hide();if(this._continuation)this._continuation(this._postId,null,{user_message:this._userMessage.value});};FeedFormBase.prototype.shouldShowLoading=function(){return false;};FeedFormBase.prototype.showDialog=function(_L0){this._dialog=new Dialog().setContentWidth(580).setClassName('interaction_form').setAsync(_L0).setHandler(this.handleButton.bind(this)).onloadRegister(this.attachHandlers.bind(this));if(this.shouldShowLoading())this._dialog.show();return this;};FeedFormBase.prototype._confirm=function(_L0){if(this._isNile&&this._supportsUserMessage){user_message=$('feedform_user_message').value;this._userMessage.value=_L0.user_message=user_message;}var _L1=new AsyncRequest().setURI(this._uri).setData(_L0).setNectarActionData().setHandler(this.showConfirmed.bind(this));new Dialog().setAsync(_L1);};FeedFormBase.prototype.handleButton=function(_L0){if(this._buttonCallback)this._buttonCallback(_L0);if(_L0.name=="publish"){var _L1=this._dialog?this._dialog.getButtonElement(_L0.name):_L0;if(_L1)_L1.disabled=true;this.confirmFeed();return false;}else if(_L0.name=="cancel")this.cancelFeed();};FeedFormBase.prototype.cancelFeed=function(){this._finish();};FeedFormBase.prototype.attachProperties=function(_L0){copy_properties(this,_L0);if(this._continuationJS){this._continuation=new Function(this._continuationJS);delete this._continuationJS;}return this;};FeedFormBase.prototype._showBase=function(_L0){var _L1=new AsyncRequest().setURI(this._uri).setHandler(function(r){var _L3=r.getPayload().userData;this.attachProperties(_L3);if(_L3['no_dialog_shown'])this._finish();return true;}.bind(this)).setNectarActionData().setErrorHandler(this._showApplicationError.bind(this)).setData(_L0);this.showDialog(_L1);return this;};FeedFormBase.prototype.showConfirmed=function(_L0){var msg;if(this._profileType==FeedFormBase.PROFILE_TYPE['page']){msg=_tx("Mae'r neges bellach yn weladwy ar Wal y tudalen.");}else if(this._profileType==FeedFormBase.PROFILE_TYPE['group']){msg=_tx("The post is now visible on the group's Wall.");}else if(this._hasTargets){msg=_tx("The post is now visible on your friend's Wall.");}else msg=_tx("Mae'r post bellach yn weladwy ar eich Wal ac ar ffrydiau newyddion eich ffrindiau.");this.showConfirmedWithMessage(msg,_L0);};FeedFormBase.prototype.showConfirmedWithMessage=function(msg,_L1){this.attachProperties(_L1.payload.userData);var _L2='<div class="interim_status">'+msg+'</div>';var _L3=_tx("Post Published");if(this._dialog){this._dialog.setBody(_L2);this._dialog.setTitle(_L3);this._dialog.setButtons(Dialog.OK);this._dialog.setButtonsMessage('');}else{$('dialog_body').innerHTML=_L2;var _L4=ge('publish');if(_L4!=null)DOM.remove(_L4);var _L5=ge('cancel');if(_L5!=null)_L5.value=_tx("Wedi Gorffen");}setTimeout(this._finish.bind(this),2500);return false;};FeedFormBase.prototype._enableSubmitButtons=function(){var _L0=['send','publish'];for(var i=0;i<_L0.length;i++){var _L2=ge(_L0[i]);if(_L2){_L2.disabled=false;break;}}};FeedFormBase.prototype._showApplicationError=function(_L0){this._enableSubmitButtons();var _L1=_L0.getPayload().userData;var _L2=function(_L4){var msg=(_L4&&(_L1.errorMessage!=null))?_L1.errorMessage:_tx("Roedd yna wall gyda'r rhaglen. Ceisiwch eto wedyn.");(new ErrorDialog()).showError(_L1.errorTitle,msg);};var err=_L0.getError();if(err==kError_Platform_ApplicationResponseInvalid){if(_L1.showDebug){_L2(true);}else if(this._continuation){this._continuation();}else _L2(false);}else _L2(true);return false;};function FeedForm(){this.parent.construct(this);}FeedForm.extend('FeedFormBase');FeedForm.attachSubmitHandler=function(_L0,_L1,_L2){_L0.onsubmit='';_L0.listen('submit',function(_L0,_L1,_L2,_L3){FeedForm.shouldShowLoadingToSelf=_L2;new FeedForm().setForm(_L0).setAppId(_L1).show();return false;}.curry(_L0,_L1,_L2));};FeedForm.prototype._setPublishButtonText=function(_L0){this.publish_button.value=_L0;};FeedForm.prototype._setCancelButtonText=function(_L0){this.cancel_button.value=_L0;};FeedForm.prototype.shouldShowLoading=function(){return FeedForm.shouldShowLoadingToSelf;};FeedForm.prototype.show=function(){var _L0={};if(this._form){_L0={callback:this._form.getAttribute('action'),elements:serialize_form(this._form)};}else if(this._elements)_L0.elements=this._elements;var _L1={app_id:this._appid,feedform_type:this._storyType,feed_info:this._feedData,user_message_prompt:this._userMessagePrompt,user_message:this._userMessage.value,preview:true,feed_target_type:'self_feed',extern:this._connectLocation};copy_properties(_L1,_L0);return this._showBase(_L1);};FeedForm.prototype.cancelFeed=function(){this._finish();};FeedForm.prototype.confirmFeed=function(){var _L0={feed_info:this._feedData,feedform_type:this._storyType,preview:false,feed_target_type:'self_feed',app_id:this._appid,size:FeedFormBase.SIZES[this._currentSize],extern:this._connectLocation};this._confirm(_L0);};function MultiFeedForm(){this.parent.construct(this);this._hasTargets=true;}MultiFeedForm.extend('FeedFormBase');MultiFeedForm.prototype.setPrefillId=function(_L0){if(_L0>0){this._prefillId=_L0;}else this._prefillId=null;return this;};MultiFeedForm.prototype.removeRecipient=function(_L0){this._toIds=this._toIds.filter(function(u){return u!=_L0;});if(this._toIds.length==0){this._finish();}else DOM.remove('sp'+_L0);return false;};MultiFeedForm.prototype.confirmFeed=function(){var _L0={feed_info:this._feedData,feedform_type:this._storyType,to_ids:this._toIds,preview:false,feed_target_type:'multi_feed',app_id:this._appid,size:FeedFormBase.SIZES[this._currentSize],extern:this._connectLocation};this._confirm(_L0);};MultiFeedForm.prototype.shouldShowLoading=function(){return FeedFormBase.shouldShowLoadingToOthers;};MultiFeedForm.prototype.show=function(){var ids=[];if(this._prefillId){ids.push(this._prefillId);}else{var _L1=this._form.getElementsByTagName('input');for(var i=0;i<_L1.length;i++)if(_L1[i].getAttribute('fb_protected')=='true'&&(CSS.hasClass(_L1[i],'fb_token_hidden_input')||_L1[i].name=='ids[]'||_L1[i].name=='friend_selector_id')&&(_L1[i].type!='checkbox'||_L1[i].checked))ids.push(_L1[i].value);}this._toIds=ids;var _L3={app_id:this._appid,to_ids:this._toIds,callback:this._form.action,preview:true,form_id:this._form.id,prefill:(this.prefillId>0),elements:serialize_form(this._form),user_message_prompt:this._userMessagePrompt,user_message:this._userMessage.value,feed_target_type:'multi_feed',extern:this._connectLocation};return this._showBase(_L3);};MultiFeedForm.prototype.attachHandlers=function(_L0){for(var i=0;i<this._toIds.length;i++){var _L2=ge('spl_'+this._toIds[i]);if(_L2)_L2.onclick=this.removeRecipient.bind(this,this._toIds[i]);}this.parent.attachHandlers(_L0);return this;};function TargetFeedForm(){this.parent.construct(this);}TargetFeedForm.extend('MultiFeedForm');TargetFeedForm.prototype.confirmFeed=function(){var _L0={feed_info:this._feedData,feedform_type:this._storyType,to_ids:this._toIds,preview:false,feed_target_type:'target_feed',app_id:this._appid,size:FeedFormBase.SIZES[this._currentSize],extern:this._connectLocation};this._confirm(_L0);};TargetFeedForm.prototype.setTarget=function(_L0){this._toIds=[_L0];return this;};TargetFeedForm.prototype.show=function(){var _L0={app_id:this._appid,to_ids:this._toIds,feed_info:this._feedData,preview:true,prefill:(this.prefillId>0),user_message_prompt:this._userMessagePrompt,user_message:this._userMessage.value,feed_target_type:'target_feed',extern:this._connectLocation};return this._showBase(_L0);};
var FBML=(function(){var _L0={};function _L1(obj,_L2b,_L2c){var _L2d=document.createElement('INPUT');_L2d.name=obj.getAttribute('idname');_L2d.type='hidden';_L2d.setAttribute('fb_protected','true');_L2d.typeahead=this;if(obj.form)obj.form.appendChild(_L2d);this._idInput=_L2d;return this.parent.construct(this,obj,_L2b,_L2c);}_L1.extend('typeaheadpro');_L1.prototype.updateID=function(obj){if(obj.i){this._idInput.value=obj.i;}else if(obj.is){this._idInput.value=obj.is;}else this._idInput.value='';};_L1.prototype.destroy=function(){this._idInput.parentNode.removeChild(this._idInput);this._idInput.typeahead=null;this._idInput=null;this.parent.destroy();};_L1.prototype._onselect=function(obj){this.updateID(obj);this.parent._onselect(obj);};var _L2=new Object();function err(msg){if(window.console)window.console.log('Facebook FBML Mock AJAX ERROR: '+msg);return false;}function _L4(_L2a,_L2b,_L2c,_L2d){if(!_L2a['url'])return err("no input with id url in form");if(!_L2a['fb_sig_api_key'])return err("no input with id fb_api_key in form");if(_L2c)_L2c();_L5(_L2a,_L2b,_L2d);}function _L5(_L2a,_L2b,_L2c){new AsyncRequest().setURI('/fbml/ajax/attach.php').setData(_L2a).setMethod('POST').setHandler(function(_L2d){if(_L2c)_L2c();if(!_L2b.removed)set_inner_html(_L2b,_L2d.getPayload().html);}.bind(this)).send();}function _L6(_L2a){if(_L2a=='wall'){var _L2b=wallAttachments;}else if(_L2a=='message')var _L2b=inboxAttachments;if(_L2b){var _L2c=ge(_L2b.edit_id);var _L2d=_L2b.get_all_form_elements(_L2c);var _L2e=Object();for(var i=0;i<_L2d.length;i++)if(!(_L2d[i].type=="radio"||_L2d[i].type=="checkbox")||_L2d[i].checked)_L2e[_L2d[i].name]=_L2d[i].value;_L2e['context']=_L2b.context;_L2e['action']='edit';_L5(_L2e,_L2c);}}function _L7(_L2a,_L2b,_L2c,url,form,_L2f){this.requireLogin(_L2a,function(){return _L8(_L2c,url,form,_L2f);});return false;}function _L8(_L2a,url,form,_L2d){var _L2e=ge(_L2a);if(!_L2e)return err("target "+_L2a+" not found");var _L2f=_L2e.getAttribute("fbcontext");var _L30=FBML.Contexts[_L2f];if(!form)return err("You must either specify a clickrewriteform (an id) or use the clickrewrite attribute inside a form");var _L31=typeof this.PROFILE_OWNER_ID=='undefined'?0:this.PROFILE_OWNER_ID;var post=serialize_form(form);post["fb_mockajax_context"]=_L30;post["fb_mockajax_context_hash"]=_L2f;post["fb_mockajax_url"]=url;post["fb_target_id"]=_L31;post["fb_mockajax_rewrite_id"]=_L2a;new AsyncRequest().setURI('/fbml/mock_ajax_proxy.php').setMethod("POST").setFBMLForm().setData(post).setHandler(function(_L33){var ma=_L33.getPayload();if(ma.ok){set_inner_html(_L2e,ma.html);}else return err(ma["error_message"]);FBML.mockAjaxResponse=ma;return ma.ok;}.bind(this)).setErrorHandler(function(_L33){return err("Failed to successfully retrieve data from Facebook when making mock AJAX call to rewrite id "+_L2a);}.bind(this)).send();if(_L2d)DOM.setContent(_L2e,HTML(_L2d));return false;}function _L9(_L2a){return _Le(_L2a,"");}function _La(_L2a){var _L2b=null;if(_L2b=ge(_L2a)){var _L2c=_L2b.parentNode.innerHTML;_L2b.id='dialog_invoked_'+_L2b.id;var _L2d=parseInt(_L2b.getAttribute('fb_dialog_width'));var elem=_L2b.cloneNode(true);DOM.setContent(_L2b,'');var _L2f=new Dialog();if(_L2d)_L2f.setContentWidth(_L2d);_L2f.setImmediateRendering(true).setStackable(true).setBody(_L2c).setFullBleed(true).show();_L0[_L2b.id]={'elem':elem,'dialog':_L2f};}return false;}function _Lb(_L2a){var _L2b=null;var _L2c='dialog_invoked_'+_L2a;for(dialog_id in _L0)if(_L2b=ge(dialog_id)){var _L2d=_L2b.id.replace('dialog_invoked_','');var _L2e=null;if(_L2e=ge(_L2d))_L2e.id='dialog_closed_'+_L2d;var _L2f=_L2b.parentNode;DOM.setContent(_L2f,'');_L2f.appendChild(_L0[dialog_id].elem);_L0[dialog_id].elem.id=_L2d;}if(_L0[_L2c].dialog)_L0[_L2c].dialog.hide();}function _Lc(_L2a){return _Le(_L2a,"none");}function _Ld(_L2a){var _L2b=ge(_L2a);if(!_L2b){return err("Could not find target "+_L2a);}else{_L2b.style.display=(_L2b.style.display=="none")?'':'none';return false;}}function _Le(_L2a,disp){var _L2c=ge(_L2a);if(!_L2c){return err("Could not find target "+_L2a);}else{_L2c.style.display=disp;return false;}}function _Lf(_L2a){return _L11(_L2a,'');}function _L10(_L2a){return _L11(_L2a,'disabled');}function _L11(_L2a,_L2b){var _L2c=ge(_L2a);if(!_L2c){return err("Could not find target "+_L2a);}else{_L2c.disabled=_L2b;return false;}}function _L12(_L2a,_L2b){new AsyncRequest().setURI('/ajax/api/tos.php').setData({app_id:_L2a,grant_perm:1,profile_id:typeof PROFILE_OWNER_ID=='undefined'?0:PROFILE_OWNER_ID,api_key:$('api_key').value,auth_token:$('auth_token').value,connect:this.connectParams}).setHandler(bind(this,function(_L2c){if(_L2c.getPayload()){var _L2d=_L2c.getPayload();if(_L2b){var form=ge(_L2b);_L14(form,_L2d);if(this.loginContinuation)this.loginContinuation=this.loginContinuation.bind(form);}if(this.sendParams)if(this.loginContinuation)this.loginContinuation=this.loginContinuation.bind(null,_L2d);}this.loginDialog&&this.loginDialog.hide();this.loginContinuation&&this.loginContinuation();this.loginCancellation=this.loginContinuation=this.loginDialog=null;})).send();}function _L13(){this.loginCancellation&&this.loginCancellation();this.loginDialog&&this.loginDialog.hide();this.loginContinuation=this.loginCancellation=this.loginDialog=null;}function _L14(_L2a,_L2b){var i;for(i=_L2a.childNodes.length-1;i>=0;i--)if(_L2a.childNodes[i].name&&_L2a.childNodes[i].name.indexOf('fb_sig')==0)_L2a.removeChild(_L2a.childNodes[i]);for(keyVar in _L2b)DOM.appendContent(_L2a,$N('input',{name:keyVar,value:_L2b[keyVar],type:'hidden'}));}function _L15(form,_L2b){this.grantedPerms=true;if(form)DOM.appendContent(form,$N('input',{name:'fb_perms_approved',value:'1',type:'hidden'}));Dialog.getCurrent()._submitForm('POST','/fbml/ajax/permissions.php',_L2b);return false;}function _L16(_L2a,form){if(window.ApiExtendedPermissions&&window.ApiExtendedPermissions.closeHandler)window.ApiExtendedPermissions.closeHandler();if(this.grantedPerms)_L2a();if(form)form.submit();}function _L17(_L2a,_L2b,_L2c,form){var _L2e=new AsyncRequest().setURI('/fbml/ajax/permissions.php').setData({app_id:_L2a,perms:_L2b});this.grantedPerms=false;var _L2f=new Dialog().setAsync(_L2e).setHandler(_L15.bind(this,form)).setCloseHandler(_L16.bind(this,_L2c,form)).show();}function _L18(_L2a,_L2b,_L2c){var _L2d=new AsyncRequest().setURI('/fbml/ajax/permissions.php').setData({app_id:_L2a,perms_string:_L2b});this.grantedPerms=false;var self=this;var _L2f=new Dialog().setAsync(_L2d).setHandler(_L15.bind(this,null)).setCloseHandler(function(){_L16.call(self,bagofholding,null);if(self.grantedPerms&&this.getUserData())_L2c(this.getUserData().profile_id);}).show();}function _L19(_L2a,_L2b,_L2c,_L2d){_L1d(function(){FB.Connect.showPermissionDialog(_L2a,_L2b,_L2c,_L2d);});}function _L1a(_L2a){_L1d(function(){FB.Connect.showBookmarkDialog(_L2a);});}function _L1b(_L2a,_L2b){_L1d(function(){FB.Connect.createApplication(_L2a,_L2b);});}function _L1c(_L2a,_L2b,_L2c,_L2d,_L2e,_L2f,_L30,_L31){_L1d(function(){FB.Connect.streamPublish(_L2a,_L2b,_L2c,_L2d,_L2e,_L2f,_L30,_L31);});}function _L1d(_L2a){Arbiter.subscribe('PLATFORM_HAS_API_KEY',function(_L2b,_L2c){FB.init({"apiKey":_L2c,"xdChannelUrl":"/xd_receiver_v0.4.php"});FB.ensureInit(_L2a);});}function _L1e(_L2a,_L2b,_L2c,_L2d,_L2e,_L2f,_L30,_L31){var _L32={template_id:_L2b,template_data:_L2c,body_general:_L2d};var _L33;if(_L2e&&(!hasArrayNature(_L2e)||_L2e.length>0)){if(hasArrayNature(_L2e))_L2e=_L2e[0];_L33=new TargetFeedForm().setTarget(_L2e);}else _L33=new FeedForm();_L33.setContinuation(_L2f).setFeedData(_L32).setAppId(_L2a).setUserMessagePrompt(_L30).setUserMessage(_L31).show();}function _L1f(){if(this.loginDialog)this.loginDialog.close();}function _L20(_L2a,_L2b,_L2c,form,_L2e,_L2f){if(this.loginDialog)return;var _L30=form?form.id:'';this.sendParams=_L2e;this.connectParams=_L2f?_L2f:false;this.loginDialog=new Dialog().setStackable(true).setClassName('api_confirmation');this.loginContinuation=_L2b;this.loginCancellation=_L2c;new AsyncRequest().setURI('/ajax/api/tos.php').setData({login_form_id:_L30,app_id:_L2a,profile_id:typeof PROFILE_OWNER_ID=='undefined'?0:PROFILE_OWNER_ID,next:document.location.href}).setReadOnly(true).setHandler(bind(this,function(_L2b,_L31){var resp=_L31.getPayload();if(resp){if(resp.redirect){goURI(resp.uri);}else this.loginDialog.setTitle(resp.title).setBody(resp.content).show();}else{_L2b();this.loginCancellation=null;this.loginContinuation=null;this.loginDialog=null;}},_L2b)).send();}function _L21(_L2a,_L2b,_L2c,_L2d,_L2e,_L2f,_L30){var _L31='';if(!_L2e){if(_L2f)_L2a.onSubmit=fsth.captured_event;_L31=$('message').value;}if(_L30){var ids=[];ids.push(_L30);}else{var _L33=_L2a.getElementsByTagName('input');var ids=[];var _L34=[];for(var i=0;i<_L33.length;i++)if(_L33[i].getAttribute('fb_protected')=='true'&&(_L33[i].name=='ids[]'||_L33[i].name=='friend_selector_id')&&(_L33[i].type!='checkbox'||_L33[i].checked)){ids.push(_L33[i].value);}else if(_L33[i].getAttribute('fb_protected')=='true'&&_L33[i].name=='emails[]')_L34.push(_L33[i].value);}var data={app_id:_L2b,to_ids:ids,to_emails:_L34,request_type:_L2c,invite:_L2d,content:_L2a.getAttribute('content'),preview:_L2e,is_multi:_L2f,form_id:_L2a.id,prefill:(_L30>0),message:_L31,donot_send:ge('donotsend')?$('donotsend').checked:false};var _L37=new AsyncRequest().setURI('/fbml/ajax/prompt_send.php').setData(data);if(_L2e){new Dialog().setClassName('req_dialog').setAsync(_L37).setStackable(true).show();}else{_L37.setHandler(function(_L38){_L2a.submit();});new Dialog().setAsync(_L37);}return false;}function _L22(elem){if(Dialog.getCurrent()){Dialog.getCurrent().hide();return;}generic_dialog.get_dialog(elem).fade_out(100);}function _L23(id){var span=$('sp'+id);var _L2c=span.parentNode;_L2c.removeChild(span);for(var i=0;i<_L2c.childNodes.length;i++)if(_L2c.childNodes[i].nodeName=='SPAN')return false;generic_dialog.get_dialog(_L2c).fade_out(100);return false;}function _L24(id,_L2b,_L2c){var _L2d=_L2b.getElementsByTagName('input');for(var i=0;i<_L2d.length;i++)if(((_L2d[i].name=='emails[]')||(_L2d[i].name=='ids[]'))&&(_L2d[i].value==id)){delNode=_L2d[i].parentNode.parentNode.parentNode.parentNode.parentNode.token;if(delNode)delNode.remove(false);}_L23(id);return false;}function _L25(_L2a,_L2b,_L2c){if(_L2c){if(fs.selected_ids[_L2a]){fs.unselect(_L2a);fs.force_reset();}else{_L24(_L2a,_L2b,_L2c);return false;}}else{var _L2d=_L2b.getElementsByTagName('input');for(var i=0;i<_L2d.length;i++)if(_L2d[i].getAttribute('fb_protected')=='true'&&_L2d[i].value==_L2a)if(_L2d[i].name=='ids[]'){if(_L2d[i].type=='checkbox'){if(_L2d[i].checked)_L2d[i].click();}else _L2d[i].parentNode.parentNode.parentNode.parentNode.parentNode.token.remove(true);}else if(_L2d[i].name=='friend_selector_id'){_L2d[i].typeahead.select_suggestion(false);_L2d[i].typeahead.set_value('');_L2d[i].value='';}}_L23(_L2a);return false;}var _L26=function(_L2a){var _L2b=_L2a.getElementsByTagName('a');for(var i=0;i<_L2b.length;i++)if(!_L2b[i].getAttribute('flash'))addEventBase(_L2b[i],'click',Event.kill);var _L2d=_L2a.getElementsByTagName('form');for(var i=0;i<_L2d.length;i++)_L2d[i].onsubmit=function(){return false;};};var _L27=function(_L2a,_L2b){for(styleName in _L2b)_L2a.style[styleName]=_L2b[styleName];};var _L28=function(_L2a,_L2b){var sb=fbjs_sandbox.getSandbox(_L2a);if(sb)sb.setBridgeHash(_L2b);};var _L29=function(form,_L2b){if(form.onsubmit)try{if(!form.onsubmit(_L2b))return;}catch(e){if(e.message=="Object doesn't support this action"){if(!form.onsubmit())return;}else throw e;}form.submit();};return {friendSelector:_L1,Contexts:_L2,attachCurlFromObject:_L4,attachFromPreview:_L6,clickRewriteAjax:_L7,clickToShow:_L9,clickToShowDialog:_La,clickToHide:_Lc,clickToEnable:_Lf,clickToDisable:_L10,clickToToggle:_Ld,closeDialogInvoked:_Lb,createApplication:_L1b,sendRequest:_L21,removeTokenizerRecipient:_L24,removeReqRecipient:_L25,cancelDialog:_L22,addHiddenInputs:_L14,fbmlLogin:_L12,cancelLogin:_L13,requireLogin:_L20,closeLoginDialog:_L1f,showFeedDialog:_L1e,streamPublish:_L1c,promptPermission:_L17,promptPermissionPro:_L18,showPermissionDialog:_L19,stripLinks:_L26,enforceStyle:_L27,registerFBJSBridge:_L28,submitForm:_L29};})();
Base64={_initialized:false,_chars:null,_inv:null,_init:function(){Base64._chars=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];Base64._inv={"A":0,"B":1,"C":2,"D":3,"E":4,"F":5,"G":6,"H":7,"I":8,"J":9,"K":10,"L":11,"M":12,"N":13,"O":14,"P":15,"Q":16,"R":17,"S":18,"T":19,"U":20,"V":21,"W":22,"X":23,"Y":24,"Z":25,"a":26,"b":27,"c":28,"d":29,"e":30,"f":31,"g":32,"h":33,"i":34,"j":35,"k":36,"l":37,"m":38,"n":39,"o":40,"p":41,"q":42,"r":43,"s":44,"t":45,"u":46,"v":47,"w":48,"x":49,"y":50,"z":51,"0":52,"1":53,"2":54,"3":55,"4":56,"5":57,"6":58,"7":59,"8":60,"9":61,"+":62,"/":63};Base64._initialized=true;},encodeObject:function(obj){return Base64.encode(JSON.encode(obj));},decodeObject:function(_L0){return JSON.decode(Base64.decode(_L0));},_toUtf8:function(s){var _L1='';for(var i=0;i<s.length;i++){var c=s.charCodeAt(i);if(c<128){_L1+=String.fromCharCode(c);}else{if(c<2048){_L1+=String.fromCharCode((c>>6)|192);}else{if(c<65536){_L1+=String.fromCharCode((c>>12)|224);}else{_L1+=String.fromCharCode((c>>18)|240);_L1+=String.fromCharCode(((c>>12)&63)|128);}_L1+=String.fromCharCode(((c>>6)&63)|128);}_L1+=String.fromCharCode((c&63)|128);}}return _L1;},_fromUtf8:function(s){var _L1='';for(var i=0;i<s.length;i++){var c=s.charCodeAt(i);if(c<128){_L1+=String.fromCharCode(c);}else if(c<192){}else if(c<224&&s.length>i+1){_L1+=String.fromCharCode(((c&31)<<6)|(s.charCodeAt(++i)&63));}else if(c<240&&s.length>i+2){_L1+=String.fromCharCode(((c&15)<<12)|((s.charCodeAt(++i)&63)<<6)|(s.charCodeAt(++i)&63));}else if(c<248&&s.length>i+3)_L1+=String.fromCharCode(((c&7)<<18)|((s.charCodeAt(++i)&63)<<12)|((s.charCodeAt(++i)&63)<<6)|(s.charCodeAt(++i)&63));}return _L1;},encode:function(s){if(!Base64._initialized)Base64._init();s=Base64._toUtf8(s);var r='';var p='';var c=s.length%3;if(c>0)for(;c<3;c++){p+='=';s+="\0";}for(c=0;c<s.length;c+=3){var n=(s.charCodeAt(c)<<16)+(s.charCodeAt(c+1)<<8)+s.charCodeAt(c+2);n=[(n>>>18)&63,(n>>>12)&63,(n>>>6)&63,n&63];r+=Base64._chars[n[0]]+Base64._chars[n[1]]+Base64._chars[n[2]]+Base64._chars[n[3]];}return r.substring(0,r.length-p.length)+p;},decode:function(s){if(!Base64._initialized)Base64._init();s=s.replace(new RegExp('[^'+Base64._chars.join("")+'=]','g'),"");var p=(s.charAt(s.length-1)=='='?(s.charAt(s.length-2)=='='?'AA':'A'):"");var r="";s=s.substr(0,s.length-p.length)+p;for(var c=0;c<s.length;c+=4){var n=(Base64._inv[s.charAt(c)]<<18)+(Base64._inv[s.charAt(c+1)]<<12)+(Base64._inv[s.charAt(c+2)]<<6)+Base64._inv[s.charAt(c+3)];r+=String.fromCharCode((n>>>16)&255,(n>>>8)&255,n&255);}r=r.substring(0,r.length-p.length);return Base64._fromUtf8(r);}};
function UIPagelet(_L0,src,_L2,_L3){this._id=_L0||null;this._element=ge(_L0||$N('div'));this._src=src||null;this._context_data=_L2||{};this._data=_L3||{};this._handler=bagofholding;return this;}copy_properties(UIPagelet.prototype,{getElement:function(){return this._element;},setHandler:function(_L0){this._handler=_L0;return this;},go:function(src,_L1){if(arguments.length>=2||typeof src=='string'){this._src=src;this._data=_L1||{};}else if(arguments.length==1)this._data=src;this.refresh();return this;},refresh:function(_L0){var _L1=function(_L2){if(_L0&&this._id)this._element=ge(this._id);this._element.setContent(HTML(_L2.getPayload()));this._handler();}.bind(this);new AsyncRequest().setURI(this._src).setMethod('GET').setData({data:JSON.encode(merge(this._context_data,this._data))}).setReadOnly(true).setHandler(_L1).setOption('bundle',true).send();return this;}});
function Scroller(_L0){this.canvas=_L0;this.scrollZone=50;this.velocity=100;this.coefficient=1;}Scroller.findScrollParent=function(el){var sty;el=el.parentNode;while(el){if(el.scrollHeight!=el.offsetTop){sty=CSS.getStyle(el,'overflowY');if(sty=='scroll'||sty=='auto')return el;}el=el.parentNode;}return document.body;};Scroller.prototype.activate=function(){this.activate=bagofholding;this.event=Event.listen(document,'mousemove',this._onmousemove.bind(this));this.interval=this._intervalHandler.bind(this).recur(50);this.cursor=null;};Scroller.prototype.deactivate=function(){delete this.activate;this.event&&this.event.remove();this.event=null;clearInterval(this.interval);};Scroller.prototype._onmousemove=function(_L0){this.cursor=new Vector2.getEventPosition(_L0);};Scroller.prototype._intervalHandler=function(){if(!this.cursor)return;var _L0=this.canvas==document.body?Rect.getViewportBounds():Rect(this.canvas);var _L1=new Rect(this.cursor.y-_L0.t,_L0.r-this.cursor.x,_L0.b-this.cursor.y,this.cursor.x-_L0.l);var _L2=new Vector2(0,0);if(_L1.t<_L1.b&&_L1.t<this.scrollZone){_L2.y=-this.scrollZone+_L1.t;}else if(_L1.b<this.scrollZone)_L2.y=this.scrollZone-_L1.b;_L2.y=this._doMath(_L2.y);if(_L1.l<_L1.r&&_L1.l<this.scrollZone){_L2.x=-this.scrollZone+_L1.l;}else if(_L1.r<this.scrollZone)_L2.x=this.scrollZone-_L1.r;_L2.x=this._doMath(_L2.x);if(_L2.x||_L2.y){_L2.scrollElementBy(this.canvas);if(document.body==this.canvas)this.cursor=this.cursor.add(_L2);Arbiter.inform('scroller/scroll',this.cursor);}};Scroller.prototype._doMath=function(_L0){return Math.floor(Math.pow((_L0>=0?Math.min(_L0,this.scrollZone):Math.max(_L0,-this.scrollZone))/this.scrollZone*this.velocity,this.coefficient));};
var Drag={};Drag.currentDraggable=null;Drag.grab=function(_L0){if(Drag.currentDraggable)Drag._onmouseup();_L0.lastDragOver=null;Drag.attachDragEvents();Drag.currentDraggable=_L0;};Drag.attachDragEvents=function(){document.onselectstart=function(){document.onselectstart=null;return false;};if(Drag.dragEventsAttached)return;Drag.dragEventsAttached=true;Arbiter.subscribe('scroller/scroll',Drag._onmousemove);Event.listen(document,{'mousemove':Drag._onmousemove,'mouseup':Drag._onmouseup});};Drag.droppables={};Drag.addDroppable=function(_L0,_L1){(Drag.droppables[_L0]=Drag.droppables[_L0]||[]).push(_L1);};Drag.removeDroppable=function(_L0,_L1){Drag.droppables[_L0]=Drag.droppables[_L0].filter(function(a){return a!=_L1;});};Drag._onmousemove=function(_L0,_L1){if(!Drag.currentDraggable)return;var _L2=_L1||Vector2.getEventPosition(_L0),_L3=Drag.currentDraggable,_L4=Drag.droppables[_L3.namespace];if(_L3.namespace&&_L3.active&&_L4){var _L5={};_L4.each(function(_Lb){_L5[_Lb.zIndex]=_Lb.zIndex;});var _L6=[];for(var i in _L5)_L6.push(_L5[i]);_L6.sort();var _L8=_L3.lastDragOver,_L9=null;for(var z=_L6.length;z>=0;z--)if(_L8&&_L8.dom!=null&&_L8.zIndex==_L6[z]&&_L8.pointInside(_L2)){_L9=_L8;break;}else for(var i=0;i<_L4.length;i++){if(_L6[z]!=_L4[i].zIndex)continue;if(_L8!=_L4[i]&&_L3.dom!=_L4[i].dom&&_L4[i].pointInside(_L2)){_L9=_L4[i];z=-1;break;}}if(_L9&&_L9!=_L8)_L9.ondragover(_L3);if(_L9)_L9.ondragmove(_L3,_L2.sub(Vector2.getElementPosition(_L9.dom)));_L3.lastDragOver=_L9;}Drag.currentDraggable._onmousemove(_L2);};Drag._onmouseup=function(e){document.onselectstart=null;if(Drag.currentDraggable){Drag.currentDraggable._ondrop();Drag.currentDraggable=null;}};function Draggable(_L0){if(!_L0)throw new Error('Element should be a DOM node');if(this==window){if(_L0 instanceof Array){var _L1=[];_L0.each(function(_L2){_L1.push(new Draggable(_L2));});return new Collection(Draggable,_L1);}else return new Draggable(_L0);}else{this.data={};this.handles=[];this.dom=_L0;this.boundingBox=null;this.addHandle(this.dom);}}Draggable.prototype.destroy=function(){this.handles.each(function(_L0){this.removeHandle(_L0.obj);}.bind(this));this.data=this.dom=null;};Draggable.prototype._onclick=function(_L0){if(this.active)return Event.kill(_L0);};Draggable.prototype._ongrab=function(_L0){this.ongrab();if(!this.scroller)this.scroller=new Scroller(Scroller.findScrollParent(this.dom));this.scroller.activate();if(this.active){if(!this.oldPosition)this.oldPosition=this.dom.style.position;this.dom.style.position=this.absolute?'absolute':'relative';_L0.sub(this.cursorPositionVector).setElementPosition(this.dom);}};Draggable.prototype._onmousedown=function(_L0){var _L1=$E(_L0).getTarget();if(DOM.isNode(_L1,['input','select','textarea','object','embed']))return true;var _L2=Vector2.getEventPosition(_L0);this.draggableInitialVector=Vector2.getElementPosition(this.dom);this.cursorPositionVector=_L2.sub(this.draggableInitialVector);Drag.grab(this,_L0);if(this.gutter){this.cursorInitialVector=_L2;}else{this._setActive(true);this._ongrab(_L2);}return Event.kill(_L0);};Draggable.prototype._onmousemove=function(_L0){if(!this.active)if(_L0.distanceTo(this.cursorInitialVector)>=this.gutter){this._setActive(true);this._ongrab(_L0);}if(this.active){var _L1=Vector2.getElementPosition(this.dom).sub(new Vector2(parseInt(this.dom.style.left?this.dom.style.left:CSS.getStyle(this.dom,'left'),10)||0,parseInt(this.dom.style.top?this.dom.style.top:CSS.getStyle(this.dom,'top'),10)||0));var _L2=_L0.sub(_L1).sub(this.cursorPositionVector);if(this.boundingBox){var box=Rect.newFromVectors(_L2,Vector2.getElementDimensions(this.dom));box=box.boundWithin(this.boundingBox);_L2=box.getPositionVector(box);if(this.boundingBox.w()==0){var _L4=new Vector2(this.draggableInitialVector.x,_L2.y,'document');}else if(this.boundingBox.h()==0){var _L4=new Vector2(_L2.x,this.draggableInitialVector.y,'document');}else var _L4=_L2;}else var _L4=_L2;_L4.setElementPosition(this.dom);this.ondrag(_L0);}};Draggable.prototype._ondrop=function(){this.scroller&&this.scroller.deactivate();if(this.active){(function(){this._setActive(false);}).bind(this).defer();this.ondrop();if(this.lastDragOver)this.lastDragOver.ondrop(this);}};Draggable.prototype.killDrag=function(){this._setActive(false);Drag._onmouseup();};Draggable.prototype.setBoundingBox=function(_L0){this.boundingBox=_L0;return this;};Draggable.prototype.resetPosition=function(){this.dom.style.position=this.oldPosition;this.oldPosition=null;this.dom.style.left=null;this.dom.style.top=null;return this;};Draggable.prototype.setUseAbsolute=function(_L0){this.absolute=_L0;return this;};Draggable.prototype.ondrag=bagofholding;Draggable.prototype.setDragHandler=function(_L0){this.ondrag=_L0;return this;};Draggable.prototype.ongrab=bagofholding;Draggable.prototype.setGrabHandler=function(_L0){this.ongrab=_L0;return this;};Draggable.prototype.ondrop=bagofholding;Draggable.prototype.setDropHandler=function(_L0){this.ondrop=_L0;return this;};Draggable.prototype.gutter=0;Draggable.prototype.setGutter=function(_L0){this.gutter=_L0;return this;};Draggable.prototype.setNamespace=function(_L0){this.namespace=_L0;return this;};Draggable.prototype.handles=null;Draggable.prototype.addHandle=function(_L0){if(this.handles.length==1&&this.handles[0].obj==this.dom)this.removeHandle(this.dom);this.handles.push({obj:_L0,evt:[Event.listen(_L0,'mousedown',this._onmousedown.bind(this)),Event.listen(_L0,'click',this._onclick.bind(this)),Event.listen(_L0,'drag',Event.kill),Event.listen(_L0,'selectstart',Event.kill)]});return this;};Draggable.prototype.removeHandle=function(_L0){this.handles=this.handles.filter(function(a){if(a.obj!=_L0){return true;}else{a.evt.each(function(evt){evt.remove();});return false;}});};Draggable.prototype.getDOM=function(){return this.dom;};Draggable.prototype.setKey=function(key,_L1){this.data[key]=_L1;return this;};Draggable.prototype.getKey=function(key){return this.data[key];};Draggable.prototype._setActive=function(_L0){this.dom.activeDrag=this.active=_L0;for(var i=0;i<this.handles.length;i++)this.handles[i].obj.activeDrag=_L0;};function Droppable(_L0){if(!_L0)throw new Error('Element should be a DOM node');if(this==window){if(_L0 instanceof Array){var _L1=[];_L0.each(function(_L2){_L1.push(new Droppable(_L2));});return new Collection(Droppable,_L1);}else return new Droppable(_L0);}else{this.data={};this.dom=_L0;this.namespace=null;}}Droppable.prototype.destroy=function(){if(this.namespace)Drag.removeDroppable(this.namespace,this);this.data=this.dom=null;};Droppable.prototype.setNamespace=function(_L0){if(this.namespace)Drag.removeDroppable(_L0,this);this.namespace=_L0;Drag.addDroppable(_L0,this);return this;};Droppable.prototype.zIndex=0;Droppable.prototype.setZIndex=function(_L0){this.zIndex=_L0;return this;};Droppable.prototype.pointInside=function(_L0){var _L1=Vector2.getElementPosition(this.dom);return _L1.x<=_L0.x&&this.dom.offsetWidth+_L1.x>_L0.x&&_L1.y<=_L0.y&&this.dom.offsetHeight+_L1.y>_L0.y;};Droppable.prototype.ondragover=bagofholding;Droppable.prototype.setDragOverHandler=function(_L0){this.ondragover=_L0;return this;};Droppable.prototype.ondragmove=bagofholding;Droppable.prototype.setDragMoveHandler=function(_L0){this.ondragmove=_L0;return this;};Droppable.prototype.ondrop=bagofholding;Droppable.prototype.setDropHandler=function(_L0){this.ondrop=_L0;return this;};Droppable.prototype.getDOM=Draggable.prototype.getDOM;Droppable.prototype.setKey=Draggable.prototype.setKey;Droppable.prototype.getKey=Draggable.prototype.getKey;
function SortableGroup(){this.namespace='sortable'+(++SortableGroup.instanceCount);this.draggables={};this.droppables={};this.sortables={};this.linkedGroups=[];this.linkedGroups.onlinkjump=bagofholding;this.rootNode=null;this.boundingBox=null;this.neverEmpty=false;this.hasEmptyMessage=false;this.isDroppable=true;this.anchor=null;}SortableGroup.instanceCount=0;SortableGroup.prototype.gutter=15;SortableGroup.prototype.setBoundingBox=function(_L0){this.boundingBox=_L0;for(var k in this.draggables)this.draggables[k].setBoundingBox(this.boundingBox);return this;};SortableGroup.prototype.setDroppable=function(val){this.isDroppable=val;return this;};SortableGroup.prototype._initializeAdded=function(key,obj){if(this.rootNode===null){this.rootNode=obj.parentNode;if(!this.linkedGroups.placeholder){this.linkedGroups.placeholder=this.placeholder=$N(obj.tagName,{className:'dragPlaceholder',style:{padding:'0px'}});}else this.placeholder=this.linkedGroups.placeholder;}else if(this.rootNode!=obj.parentNode)throw new Error('All sortables of a collection must share the same parentNode');if(key in this.draggables)throw new Error('All sortables must have a unique key');};SortableGroup.prototype.addSortable=function(key,obj,_L2){this._initializeAdded(key,obj);this.sortables[key]=obj;this.draggables[key]=(new Draggable(obj)).setNamespace(this.namespace).setGutter(this.gutter).setUseAbsolute(true).setGrabHandler(this.grabHandler.bind(this,key)).setDropHandler(this.dropHandler.bind(this,key)).setKey('key',key).setBoundingBox(this.boundingBox);if(_L2)this.draggables[key].addHandle(_L2);this.droppables[key]=(new Droppable(obj)).setNamespace(this.namespace).setDragOverHandler(this._dragOverHandlerShim.bind(null,this,key));return this;};SortableGroup.prototype.addEmptyMessage=function(obj,_L1){var key='placeholder';if(obj.parentNode!=_L1)_L1.appendContent(obj);this._initializeAdded(key,obj);this.hasEmptyMessage=true;this.sortables[key]=obj;this.droppables[key]=(new Droppable(obj)).setNamespace(this.namespace).setDragOverHandler(this._dragOverHandlerShim.bind(null,this,key));return this;};SortableGroup.prototype.setNeverEmpty=function(_L0){this.neverEmpty=_L0;};SortableGroup.prototype.link=function(_L0){_L0.linkedGroups=this.linkedGroups;if(!this.linkedGroups.length)this.linkedGroups.push(this);this.linkedGroups.push(_L0);for(var i=0;i<this.linkedGroups.length;i++)if(this.linkedGroups[i].namespace!=this.namespace){this.linkedGroups[i].namespace=this.namespace;for(var j in this.linkedGroups[i].droppables){this.linkedGroups[i].droppables[j].setNamespace(this.namespace);this.linkedGroups[i].draggables[j].setNamespace(this.namespace);}}return this;};SortableGroup.prototype.getOrder=function(){if(!this.rootNode)return [];var ret=[],_L1=this.rootNode.childNodes;for(var i=0;i<_L1.length;i++)for(var k in this.sortables)if(this.sortables[k]==_L1[i]){ret.push(k);break;}return ret;};SortableGroup.prototype.migrateLinkedSortable=function(key){for(var i=0;i<this.linkedGroups.length;i++)if(key in this.linkedGroups[i].draggables){this.sortables[key]=this.linkedGroups[i].sortables[key];this.draggables[key]=this.linkedGroups[i].draggables[key];this.draggables[key].setGrabHandler(this.grabHandler.bind(this,key)).setDropHandler(this.dropHandler.bind(this,key));this.droppables[key]=this.linkedGroups[i].droppables[key];this.droppables[key].setDragOverHandler(this._dragOverHandlerShim.bind(null,this,key));delete this.linkedGroups[i].sortables[key];delete this.linkedGroups[i].draggables[key];delete this.linkedGroups[i].droppables[key];return true;}return false;};SortableGroup.prototype.setLinkJumpHandler=function(_L0){this.linkedGroups.onlinkjump=_L0;return this;};SortableGroup.prototype.onorderchange=bagofholding;SortableGroup.prototype.setOrderChangeHandler=function(_L0){this.onorderchange=_L0;return this;};SortableGroup.prototype.ongrabcallback=bagofholding;SortableGroup.prototype.setGrabCallback=function(_L0){this.ongrabcallback=_L0;return this;};SortableGroup.prototype._checkLastRemaining=function(_L0){var _L1=this.hasEmptyMessage?2:1;return this.neverEmpty&&this.rootNode.childNodes.length==_L1;};SortableGroup.prototype.grabHandler=function(_L0){if(this._checkLastRemaining()){this.draggables[_L0].killDrag();return;}CSS.setClass(this.placeholder,this.sortables[_L0].className);CSS.addClass(this.placeholder,'droppable_placeholder');CSS.addClass(this.sortables[_L0],'drag');Vector2.getElementDimensions(this.sortables[_L0]).setElementDimensions(this.placeholder);this.rootNode.insertBefore(this.placeholder,this.sortables[_L0]);this.ongrabcallback(_L0);if(!this.isDroppable){var _L1=this.sortables[_L0];this.anchor=_L1.nextSibling;if(!this.anchor){this.anchor=$N('div');_L1.parentNode.appendChild(this.anchor);}}};SortableGroup.prototype.ondropcallback=bagofholding;SortableGroup.prototype.setDropCallback=function(_L0){this.ondropcallback=_L0;return this;};SortableGroup.prototype.dropHandler=function(_L0){if(this._checkLastRemaining()){this.draggables[_L0].resetPosition();return;}CSS.removeClass(this.sortables[_L0],'drag');this.draggables[_L0].resetPosition();this.rootNode.insertBefore(this.sortables[_L0],this.placeholder);this.rootNode.removeChild(this.placeholder);for(var i=0;i<this.linkedGroups.length;i++)if(this.linkedGroups[i].anchor)delete this.linkedGroups[i].anchor;this.ondropcallback(_L0);this.onorderchange();};SortableGroup.prototype._dragOverHandlerShim=function(_L0,_L1,_L2){_L0.dragOverHandler(_L1,_L2.getKey('key'));};SortableGroup.prototype.dragOverHandler=function(_L0,_L1){if(!this.isDroppable&&!this.anchor)return;var _L2=false;if(!(_L1 in this.draggables)){if(!this.migrateLinkedSortable(_L1))throw new Error('Draggable dropped onto a foreign droppable!');_L2=true;}var _L3=true,_L4=this.rootNode.childNodes,_L5=this.sortables[_L1],_L6=this.sortables[_L0];if(!this.anchor){var l=_L4.length;for(var i=0;i<l;i++)if(_L4[i]==_L6){break;}else if(_L4[i]==_L5){_L3=false;break;}}else _L6=this.anchor;if(_L3||this.anchor){this.rootNode.insertBefore(this.placeholder,_L6);}else this.rootNode.insertBefore(this.placeholder,_L6.nextSibling);this.rootNode.insertBefore(_L5,this.placeholder);this.ondragover(_L5,_L6);if(_L2)this.linkedGroups.onlinkjump.call(this,_L1);};SortableGroup.prototype.ondragover=bagofholding;SortableGroup.prototype.setDragOverCallback=function(_L0){this.ondragover=_L0;return this;};SortableGroup.prototype.destroy=function(){for(var k in this.droppables)this.droppables[k].destroy();for(var k in this.draggables)this.draggables[k].destroy();this.droppables=this.draggables=this.rootNode=null;this.linkedGroups.remove(this);for(var i=0;i<this.linkedGroups.length;i++)this.linkedGroups[i].linkedGroups=this.linkedGroups;};SortableGroup.prototype.removeSortable=function(key){if(key in this.sortables){this.draggables[key].destroy();this.droppables[key].destroy();delete this.draggables[key];delete this.droppables[key];delete this.sortables[key];}};SortableGroup.prototype.keyExists=function(key){return this.sortables[key];};
function search_friend_source(_L0,_L1){this.get_param=_L0;this.parent.construct(this);if(!_L1)this.initialize();}search_friend_source.extend('static_source');search_friend_source.prototype.text_noinput=search_friend_source.prototype.text_placeholder=search_friend_source.prototype.text_nomatch='';search_friend_source.prototype.updated_pics={};search_friend_source.prototype.search_limit=5;search_friend_source.prototype._allowed_types=null;search_friend_source.prototype.initialize=function(_L0){var _L1=(new Date()).getTime();new AsyncRequest().setMethod('GET').setReadOnly(true).setURI('/ajax/typeahead_search.php?'+this.get_param).setErrorHandler(function(){}).setTransportErrorHandler(function(){}).setHandler(function(_L2){var _L3=_L2.getPayload();this.values=_L3.entries;search_friend_source.url_templates=this.templates=_L3.templates;this.build_index.bind(this).defer();search_typeahead_log(this.udata,'getdata',_L1);var _L4=((new Date()).getTime()/1000)-60*5;if(_L3.gen_time<_L4)new AsyncRequest().setMethod('GET').setReadOnly(true).setURI('/ajax/recent_pics.php').setData({ref_time:_L3.gen_time}).setErrorHandler(function(){}).setTransportErrorHandler(function(){}).setHandler(function(_L2){this.updated_pics=_L2.getPayload().updated_pics;}.bind(this)).send();if(_L0)_L0();}.bind(this)).send();};search_friend_source.loaded_images={};search_friend_source.TYPES={USER:'u',CONNECTION:'c',FOLLOWER:'fl',PAGE:'p',APP:'a',GROUP:'g',EVENT:'e',SEARCH:'search',WEB:'web'};search_friend_source.prototype.build_index=function(){var _L0=this.history?this.history.entries:undefined;if(_L0!=undefined)this.values=this.values.each(function(_L1){_L1.o=_L0[_L1.i]!=undefined?_L0[_L1.i]:_L1.o;return _L1;});this.parent.build_index();};search_friend_source.image_load=function(_L0,_L1,_L2){var _L3=(new Date()).getTime();search_friend_source.loaded_images[_L2]=true;if((_L3-_L1)<100){CSS.setOpacity(_L0,1);}else animation(_L0).to('opacity',1).duration(100).go();};search_friend_source.prototype.gen_html=function(_L0,_L1){var _L2=_L0.it;if(!_L2&&_L0.ty&&this.templates[_L0.ty])_L2=this.templates[_L0.ty].icon;if(this.updated_pics[_L0.i])_L2=this.updated_pics[_L0.i];switch(_L0.ty){case search_friend_source.TYPES.USER:case search_friend_source.TYPES.CONNECTION:case search_friend_source.TYPES.PAGE:if(!_L2){return ['<div>',typeahead_source.highlight_found(_L0.t,_L1),'</div><div><small>',_L0.n||'&nbsp;','</small></div>'].join('');}else{if(!search_friend_source.loaded_images[_L0.i]){var _L3=(new Date()).getTime();var _L4=sprintf('onload="search_friend_source.image_load(this, %d, %d);" style="opacity:0;filter:alpha(opacity=0);"',_L3,_L0.i);}return ['<img ',_L4,' alt="" src="',_L2,'"/>','<div class="with_pic"><span>',typeahead_source.highlight_found(_L0.t,_L1),'</span><small>',_L0.n||'&nbsp;','</small></div>'].join('');}break;case search_friend_source.TYPES.SEARCH:return ['<div class="app"><div class="icon" style="background-image: url(',_L2,')">&nbsp;</div>','<span>',_L0.t,'</span></div>'].join('');break;default:return ['<div class="app clearfix"><div class="icon" style="background-image: url(',_L2,')">&nbsp;</div>','<span>',typeahead_source.highlight_found(_L0.t,_L1),'</span></div>'].join('');}};search_friend_source.prototype.allowTypes=function(_L0){this._allowed_types=_L0;return this;};search_friend_source.prototype.search_value=function(_L0){var _L1;var _L2=false;var _L3=typeahead_source.tokenize(_L0);for(var i=0;i<_L3.length;i++)if(_L3[i]!=''){_L2=true;break;}if(_L2){this.owner.less_than_n_chars=false;_L1=this.parent.search_value(_L0);}else if(this.is_ready){this.owner.less_than_n_chars=true;_L1=[];}var _L5=(_L1&&_L1.length)?false:true;if(_L1)for(var i=0;i<_L1.length;i++)if((_L1[i].ty!=search_friend_source.TYPES.USER)&&(_L1[i].ty!=search_friend_source.TYPES.CONNECTION)){_L5=true;break;}var _L6=this.search_limit;if(_L1)_L6-=_L1.length;if(_L1&&_L5&&_L2&&search_friend_source.WEBSEARCH_USER){_L1.push({t:_tx("Chwilio Facebook:"),ty:search_friend_source.TYPES.SEARCH,i:_L0});_L1.push({t:_tx("Chwilio'r we"),ty:search_friend_source.TYPES.WEB,i:_L0});}if(_L1&&this._allowed_types)_L1=_L1.filter(function(_L7){return this._allowed_types.contains(_L7.ty);}.bind(this));return _L1;};search_friend_source.prototype._sort_text_obj=function(a,b){var _L2=this.history?this.history.entries:undefined;if(_L2!=undefined){a.o=_L2[a.i]||a.o;b.o=_L2[b.i]||b.o;}if(a.o!=b.o)return a.o-b.o;return a.t.localeCompare(b.t);};search_friend_source.WEBSEARCH_USER=false;
function search_selector_onfound(_L0){var n;if(!(n=ge('n')))return;n.value=_L0?_L0.i:-1;}function search_result_selector_onsubmit(_L0){$('search').init.value=ge('filter_init')?$('filter_init').value:'';$('search').sf.value=ge('filter_sf')?$('filter_sf').value:'';$('search').submit();this.hide();this.advance_focus();}function search_logged_ajax(_L0){new AsyncSignal('/ajax/search_log.php',_L0).send();}function search_log_2nd_action(_L0){new AsyncRequest().setURI('/ajax/search_log_2nd_action.php').setMethod('POST').setReadOnly(true).setContextData('clicktype',_L0).setContextData('source','profile_from_search').setHandler(function(){}).send();}function search_typeahead_log(_L0,evt,_L2){if(!_L0)return;var _L3=_L0;if(evt)_L3.evt=evt;_L3.t=(new Date()).getTime();if(_L2)_L3.dt=_L3.t-_L2;new AsyncSignal('/ajax/typeahead_log.php',_L3).send();}var SearchDashboardKeyboardHandler=function(){return {right_arrow_key_handler:function(_L0,_L1){if(_L0.ctrlKey){if($('search_dashboard_next_session').href)goURI($('search_dashboard_next_session').href);}else if($('search_dashboard_next_query').href)goURI($('search_dashboard_next_query').href);return false;},left_arrow_key_handler:function(_L0,_L1){if(_L0.ctrlKey){if($('search_dashboard_prev_session').href)goURI($('search_dashboard_prev_session').href);}else if($('search_dashboard_prev_query').href)goURI($('search_dashboard_prev_query').href);return false;},right_arrow_key_filter:function(_L0,_L1){return true;}};}();
if(typeof deconcept=="undefined")var deconcept={};if(typeof deconcept.util=="undefined")deconcept.util={};if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil={};deconcept.SWFObject=function(swf,id,w,h,ver,c,_L6,_L7,_L8,_L9){if(!document.getElementById)return;this.DETECT_KEY=_L9?_L9:'detectflash';this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];this.fallback_html='';this.fallback_js_fcn=function(){};if(swf)this.setAttribute('swf',swf);if(id)this.setAttribute('id',id);if(w)this.setAttribute('width',w);if(h)this.setAttribute('height',h);this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(ver){if(!(ver instanceof Array))ver=[ver];var x;ver.each(function(ii){x=new deconcept.PlayerVersion(ii.toString().split('.'));if(x.major==this.installedVer.major){this.setAttribute('version',x);return;}else if(!this.getAttribute('version')||x.major<this.getAttribute('version').major)this.setAttribute('version',x);}.bind(this));}if(!window.opera&&document.all&&this.installedVer.major>7)if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}if(c)this.addParam('bgcolor',c);var q=_L6?_L6:'high';this.addParam('quality',q);this.setAttribute('useExpressInstall',false);this.setAttribute('doExpressInstall',false);var xir=(_L7)?_L7:window.location;this.setAttribute('xiRedirectUrl',xir);this.setAttribute('redirectUrl','');if(_L8)this.setAttribute('redirectUrl',_L8);};deconcept.SWFObject.prototype={useExpressInstall:function(_L0){this.xiSWFPath=!_L0?"/swf/expressinstall.swf":_L0;this.setAttribute('useExpressInstall',true);},setAttribute:function(_L0,_L1){this.attributes[_L0]=_L1;},getAttribute:function(_L0){return this.attributes[_L0]||"";},addParam:function(_L0,_L1){this.params[_L0]=_L1;},getParams:function(){return this.params;},addVariable:function(_L0,_L1){this.variables[_L0]=_L1;},getVariable:function(_L0){return this.variables[_L0]||"";},getVariables:function(){return this.variables;},getVariablePairs:function(){var _L0=[];var key;var _L2=this.getVariables();for(key in _L2)_L0[_L0.length]=key+"="+_L2[key];return _L0;},getSWFHTML:function(){var _L0="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute('swf',this.xiSWFPath);}_L0='<embed type="application/x-shockwave-flash" src="'+htmlspecialchars(this.getAttribute('swf'))+'" width="'+htmlspecialchars(this.getAttribute('width'))+'" height="'+htmlspecialchars(this.getAttribute('height'))+'" style="'+htmlspecialchars(this.getAttribute('style')||"")+'"';_L0+=' id="'+htmlspecialchars(this.getAttribute('id'))+'" name="'+htmlspecialchars(this.getAttribute('id'))+'" ';var _L1=this.getParams();for(var key in _L1)_L0+=htmlspecialchars(key)+'="'+htmlspecialchars(_L1[key])+'" ';var _L3=this.getVariablePairs().join("&");if(_L3.length>0)_L0+='flashvars="'+_L3+'"';_L0+='/>';}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute('swf',this.xiSWFPath);}_L0='<object id="'+this.getAttribute('id')+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+(this.getAttribute('style')||"")+'">';_L0+='<param name="movie" value="'+this.getAttribute('swf')+'" />';var _L1=this.getParams();for(var key in _L1)_L0+='<param name="'+key+'" value="'+_L1[key]+'" />';var _L3=this.getVariablePairs().join("&");if(_L3.length>0)_L0+='<param name="flashvars" value="'+_L3+'" />';_L0+="</object>";}return _L0;},write:function(_L0){if(this.getAttribute('useExpressInstall')){var _L1=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_L1)&&!this.installedVer.versionIsValid(this.getAttribute('version'))){this.setAttribute('doExpressInstall',true);this.addVariable("MMredirectURL",escape(this.getAttribute('xiRedirectUrl')));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}var n=(typeof _L0=='string')?document.getElementById(_L0):_L0;if(this.skipDetect||this.getAttribute('doExpressInstall')||this.installedVer.versionIsValid(this.getAttribute('version'))){n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute('redirectUrl')!="")document.location.replace(this.getAttribute('redirectUrl'));need_version=this.getAttribute('version').major+'.'+this.getAttribute('version').minor+'.'+this.getAttribute('version').rev;have_version=this.installedVer.major+'.'+this.installedVer.minor+'.'+this.installedVer.rev;this.fallback_js_fcn(have_version,need_version);n.innerHTML=this.fallback_html;}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _L0=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){for(k=0;k<navigator.plugins.length;k++)try{x=navigator.plugins[k];if(x.name=='Shockwave Flash'){PlayerVersion_tmp=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));if(typeof _L0=='undefined'||PlayerVersion_tmp.major>_L0.major||(PlayerVersion_tmp.major==_L0.major&&(PlayerVersion_tmp.minor>_L0.minor||(PlayerVersion_tmp.minor==_L0.minor&&PlayerVersion_tmp.rev>_L0.rev))))_L0=PlayerVersion_tmp;}}catch(honk){}}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _L2=3;while(axo)try{_L2++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_L2);_L0=new deconcept.PlayerVersion([_L2,0,0]);}catch(e){axo=null;}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_L0=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_L0.major==6)return _L0;}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null)_L0=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}return _L0;};deconcept.PlayerVersion=function(_L0){this.major=_L0[0]!=null?parseInt(_L0[0]):0;this.minor=_L0[1]!=null?parseInt(_L0[1]):0;this.rev=_L0[2]!=null?parseInt(_L0[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major)return false;if(this.major>fv.major)return true;if(this.minor<fv.minor)return false;if(this.minor>fv.minor)return true;if(this.rev<fv.rev)return false;return true;};deconcept.util={getRequestParameter:function(_L0){var q=document.location.search||document.location.hash;if(_L0==null)return q;if(q){var _L2=q.substring(1).split("&");for(var i=0;i<_L2.length;i++)if(_L2[i].substring(0,_L2[i].indexOf("="))==_L0)return _L2[i].substring((_L2[i].indexOf("=")+1));}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _L0=document.getElementsByTagName("OBJECT");for(var i=_L0.length-1;i>=0;i--){_L0[i].style.display='none';for(var x in _L0[i])if(typeof _L0[i][x]=='function')_L0[i][x]=function(){};}};if(!document.getElementById&&document.all)document.getElementById=function(id){return document.all[id];};var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var flash_update_dialog_shown=false;function spawn_flash_update_dialog(_L0,_L1){if(flash_update_dialog_shown)return;flash_update_dialog_shown=true;new AsyncRequest().setURI('/ajax/flash_update_dialog.php').setData({have_version:_L0,need_version:_L1}).setMethod('GET').setReadOnly(true).send();}function setFlashFallback(id,_L1){var _L2=ge(id);var _L3=deconcept.SWFObjectUtil.getPlayerVersion();var _L4;_L1.each(function(ii){ii=new deconcept.PlayerVersion(ii.toString().split('.'));if(ii.major==_L3.major){_L4=ii;return;}else if(typeof _L4=='undefined'||ii.major<_L4.major)_L4=ii;}.bind(this));if(_L2&&_L3.major>0){var _L5=_L3.major+'.'+_L3.minor+'.'+_L3.rev;var _L6=_L4.major+'.'+_L4.minor+'.'+_L4.rev;_L2.innerHTML=_tx("Mae angen Flash {required-version} arnoch i weld y cynnwys yma. Eich fersiwn bresennol yw {current-version}. Lawrlwythwch y fersiwn ddiweddaraf o'r Chwaraewr Flash, os gwelwch yn dda.",{'required-version':_L6,'current-version':_L5});}}function getFlashPlayer(){goURI('http://get.adobe.com/flashplayer');return false;}

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