/*
HTTP Host: b.static.ak.fbcdn.net
Generated: March 18th 2010 11:17:15 PM PDT
Machine: 10.16.139.105
Locale: nu_ll
Path: js/65gwl1yhib0ok8gs.pkg.js
*/

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

function resend_confirmation_email(){hide($('confirm_error'));hide($('confirm_status'));show($('confirm_progress'));new AsyncRequest().setURI('/ajax/confirm_email.php').setData({resend:1}).setHandler(function(b){hide($('confirm_progress'));if(b){var a=b.getPayload();if(a&&a.success){DOM.setContent($('confirm_status'),HTML(a.msg));show($('confirm_status'));}else{DOM.setContent($('confirm_error'),HTML(a.msg));show($('confirm_error'));}}else{DOM.setContent($('confirm_error'),HTML(a.msg));show($('confirm_error'));}}).send();}
function external_friend_add(f,a,d,e,b){var c=(function(g){e(g.getPayload());});new AsyncRequest().setURI('/friends/ajax/external.php').setData({action:'add',uid:f,email:a,name:d,allow_nameless:true,ok:true,no_success_dialog:true,from_invite:b}).setHandler(c).send();}function accept_external_friend_suggestion(b,a){external_friend_add(b,null,a,function(){FriendSuggesterDialog.show(b,true,function(){handle_request_click('friend_suggestion',b,'accept');});},false);}function show_external_friend_dialog(e,c,a,d){d=d||bagofholding;var b=new AsyncRequest().setMethod('GET').setData({action:a,uid:e,email:c}).setReadOnly(true).setURI('/friends/ajax/external.php');new Dialog().setAsync(b).setCloseHandler(function(){var f=this.getUserData();if(f){external_friend_hide_link(f);d(f);}}).show();}function external_friend_hide_link(b){var a=ge('add_as_friend_'+b);if(a)hide(a);}
function ads_fetch_admarket_ad(g,e,a,d,c,f){var b={page:g,location:e,adnetwork_id:a,netego:f?f:false};var h=new AsyncRequest().setURI(muffinize('/muffins/ajax/fetch_admarket_muffin.php')).setData(b).setHandler(d).setErrorHandler(c).send();}
function ComposerAttachment(){this._container=null;}copy_properties(ComposerAttachment,{newFromURL:function(c,b){if(!/(?:https?:\/\/)?\w+\.\w+/.test(c))return false;var a=new ComposerAttachment();a.url=c;new AsyncRequest().setURI('/ajax/inbox/ajax.php').setData({action:'attachment',url:c}).setHandler(a._asyncCallback.bind(a)).setErrorHandler(b).send();return a;},setupThumbnails:function(a,b){var c=new ImageSandbox();c.onfinish=function(){a=c.getImages();for(var d=a.length-1;d>=0;d--)if(a[d].width&&(a[d].height<50||a[d].width<50||a[d].height/a[d].width>3||a[d].width/a[d].height>3))a.splice(d,1);if(!a.length){CSS.removeClass(b,'loading');CSS.removeClass(b.parentNode,'has_image');var e=b;while(e.parentNode&&e.tagName.toLowerCase()!='form')e=e.parentNode;e=e.getElementsByTagName('input');for(var d=0;d<e.length;d++)if(e[d].name.indexOf('[params][images]')!=-1)e[d].parentNode.removeChild(e[d]);return;}for(var f=0;f<a.length-1;f++)for(var g=a.length-1;g>=f;g--)if(a[f].width*a[f].height<a[g].width*a[g].height){temp=a[f];a[f]=a[g];a[g]=temp;}var e=b;while(e.parentNode&&e.tagName.toLowerCase()!='form')e=e.parentNode;e=e.getElementsByTagName('input');for(var d=0;d<e.length;d++)if(e[d].name.indexOf('[params][images]')!=-1){e=e[d];break;}CSS.removeClass(b,'loading');new ThumbnailSelector(b,e,a);}.bind(this);c.loadImages(a);}});copy_properties(ComposerAttachment.prototype,{containerReady:function(d,e){this._container=d;var c=d.getElementsByTagName('input');var a=[''];for(var b=0;b<c.length;b++)if(c[b].type=='text'||c[b].type=='hidden')a.push('<input type="hidden" name="'+htmlspecialchars(c[b].name)+'" value="'+htmlspecialchars(c[b].value)+'" />');if(e){a.push('&nbsp;');d.innerHTML=a.join('');CSS.addClass(d,'share_attachment_loading');}else d.innerHTML+=a.join('');},_renderInputsRecursive:function(c,d){if(d===null)return '';var a=[];if(typeof(d)=='object'){for(var b in d)a.push(this._renderInputsRecursive(c+'['+b+']',d[b]));}else if(typeof(d)!='function')a.push('<input type="hidden" name="',c,'" value="',htmlspecialchars(d),'" />');return a.join('');},_asyncCallback:function(b){var a=b.getPayload().html;CSS.removeClass(this._container,'share_attachment_loading');set_inner_html(this._container,a);}});function ThumbnailSelector(f,d,c){var b=['<div class="thumbnail_stage"><h4>'+_tx("Choose a Thumbnail")+'</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 ',c.length>1?'enabled':'disabled','">&nbsp;</a></span>','</div><div class="counter"><span>1 of ',c.length,'</span></div></div>'];for(var e=0;e<c.length;e++)b.push('<div class="thumbnail',e==0?' thumbnail_selected':' thumbnail_unselected','">','<img class="img_loading" src="',c[e].src,'" onload="adjustImage(this);" />','</div>');b.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>');f.innerHTML=b.join('');this.images=c;this.input=d;d.value=this.images[0].src;this.obj=f;this.obj.thumbnail=this;this.label=f.getElementsByTagName('span')[2];this.index=0;var a=f.getElementsByTagName('a');this.left=a[0];this.right=a[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(a){if(!a){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(f){var d=this.index+f;if(d>=0&&d<this.images.length){var b=this.obj.getElementsByTagName('div');var e=0;this.index=d;for(var c=0;c<b.length;c++){var a=b[c].className;if(!CSS.hasClass(b[c],'thumbnail '))continue;var g=e==d;if(a.indexOf(g?'_unselected':'_selected')!=-1)CSS.setClass(b[c],a.replace(/thumbnail_(?:un)?selected/,g?'thumbnail_selected':'thumbnail_unselected'));e++;}this.label.innerHTML=_tx("{selected} of {total}",{selected:(d+1),total:e});CSS.setClass(this.left,this.left.className.replace(/[^ ]+abled/,d==0?'disabled':'enabled'));CSS.setClass(this.right,this.right.className.replace(/[^ ]+abled/,d==this.images.length-1?'disabled':'enabled'));this.input.value=this.images[d].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(b){this.images=b.length;for(var a=0;a<b.length;a++)new ImageSandboxLoader(this,b[a]);},onImageLoaded:function(a){this.done++;this._stateChange();},onImageFailed:function(a){a.destroy();this.images--;this._stateChange();},getImages:function(){var c=new Array();var a=this.obj.getElementsByTagName('img');for(var b=0;b<a.length;b++)c.push(a[b]);return c;},_stateChange:function(){if(this.done==this.images)if(this.onfinish)this.onfinish();}});function ImageSandboxLoader(b,a){this._timeout=4000;this._start=new Date().getTime();this._sandbox=b;if(typeof a!='object')a={src:a};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,a);this._sandbox.obj.appendChild(this._obj);if(this._pollImage!==null)this._pollImage();}copy_properties(ImageSandboxLoader.prototype,{_pollImage:function(a){if(a==1){this._pollImage=null;this._sandbox.onImageLoaded(this);}else if(a==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 fix_attachment_more_menu_alignment(d){var a=ge('attachment_buttons_list');var j=a.offsetWidth;if(d){var f=Vector2.getElementPosition(d).x;var b=Vector2.getElementPosition(a).x;var g=f-b;var c=d.offsetWidth;var i=j-g;if(i>=c&&i<126){var e=ge('wall_more_menu');var h=0;e.style.left='auto';e.style.right=h+'px';}}}function wall_video_thumb_adjust(a,b){if(ua.ie()>=6&&ua.ie()<7){a.style.marginTop=(-1*b.height-3)+'px';a.style.paddingTop=(b.height-19)+'px';}a.style.display='block';}function attachments(a){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=a;this.edit_container_id='attachment_edit_container_'+a;this.edit_loading_id='attachment_edit_loading_'+a;this.edit_id='attachment_edit_'+a;this.view_container_id='attachment_view_container_'+a;this.view_wrapper_id='attachment_view_wrapper_'+a;this.view_id='attachment_view_'+a;this.remove_id='attachment_remove_'+a;this.view_loading_id='attachment_view_loading_'+a;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(g,d,f,a){this.is_active=true;if(this.dialog)return;var e=(f==14);this.is_share=(f==100);var h='<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(g).setBody(h).setStackable(true).setButtons([Dialog.newButton('attach',_tx("Attach"),'',function(){if(this.is_share){this._share_attach();}else this._attach(e,a,true);this.dialog.hide();this.dialog=null;this.is_active=false;}.bind(this)),Dialog.newButton('cancel',_tx("Cancel"),'inputaux',function(){this.dialog.hide();this.remove_attachment_view();this.dialog=null;this.is_active=false;}.bind(this))]).show();var b=ge(this.edit_container_id);var c=document.createElement('div');c.className='share_stage';CSS.addClass(c,'attachment_edit');c.id=this.edit_id;c.is_app=e;b.appendChild(c);set_inner_html(c,d);if(this.is_share){placeholderSetup('share_link');if(ua.ie()<7)$('share_link').focus();}return c;};attachments.prototype._show_attachment_view=function(c,d){var a=ge(this.view_container_id);var b=document.createElement('div');b.className='share_stage';CSS.addClass(b,'attachment_view');b.id=this.view_id;b.is_app=d;a.appendChild(b);set_inner_html(b,c);hide('attachment_buttons_list');var e=ge(this.view_wrapper_id);e.style.display='block';this.attachment_added=true;return b;};attachments.prototype.remove_attachment_view=function(){var c=ge(this.view_container_id);var a=ge(this.view_id);if(this.attachment_added&&a){this.removed=true;c.removeChild(a);hide(this.view_wrapper_id);if(ge('attachment_buttons_list'))show('attachment_buttons_list');var b=ge(this.remove_id);CSS.setClass(b,b.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(a){var f=[];if(a){var b=a.getElementsByTagName('input');for(var e=0;e<b.length;e++)f.push(b[e]);var c=a.getElementsByTagName('select');for(var e=0;e<c.length;e++)f.push(c[e]);var d=a.getElementsByTagName('textarea');for(var e=0;e<d.length;e++)f.push(d[e]);}return f;};attachments.prototype._add_attachment_input_data=function(b,a){if(!a)return false;var e=this.get_all_form_elements(a);if(a.is_app){b.attachment={app:{},type:14};for(var d=0;d<e.length;d++)if(!(e[d].type=="radio"||e[d].type=="checkbox")||e[d].checked)b.attachment.app[e[d].name]=e[d].value;}else{var c=false;for(var d=0;d<e.length;d++){if(e[d].name=='attachment[type]')c=true;if(e[d].name=='attachment[params][url]')if(!e[d].value||e[d].value=='http://')return false;b[e[d].name]=e[d].value;}if(!c)return false;}b.context=this.context;return true;};attachments.prototype._attach=function(f,b,e){var c={};if(e){var d=ge(this.edit_id);var a=this._add_attachment_input_data(c,d);if(!a)return;}if(b)for(var i in b)c[i]=b[i];var g=ge(this.view_loading_id);g.style.display='block';var j=this._show_attachment_view('',f);var h=function(k){var l=k.getPayload();if(!j.removed){hide(this.view_loading_id);set_inner_html(j,l.html);this.attachment_oid=l.oid;this.attachment_app_id=l.app_id;}}.bind(this);new AsyncRequest().setHandler(h).setURI('/ajax/attachments.php').setErrorHandler(this.remove_attachment_view).setTransportErrorHandler(this.remove_attachment_view).setData(c).send();};attachments.prototype.add_post_data=function(a){if(this.attachment_added)if(this.attached_share){this._add_attachment_input_data(a,ge(this.view_id));}else a.attachment={oid:this.attachment_oid,app_id:this.attachment_app_id};};attachments.prototype.prepare_wall_post=function(){var a=ge(this.view_id);if(a){var c=this.get_all_form_elements(a);for(var b=0;b<c.length;b++)c[b].disabled=true;}};attachments.prototype.show_full_attachment=function(a){if(typeof this.wall_attachments[a]!='string')return;hide('attachment_compact_'+a);hide('attached_item_info_'+a);hide('attachment_compact_td_'+a);attachment_div=ge('wall_attachment_'+a);set_inner_html(attachment_div,this.wall_attachments[a]);};attachments.prototype.fix_app_inputs_on_send=function(){var a=ge(this.view_id);if(!this.attachment_added||!a)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(a.is_app){new_inputs.push(create_hidden_input('attachment[type]',14));new_inputs.push(create_hidden_input('attachment[app][message_sent]',true));}for(var b=0,c=new_inputs.length;b<c;b++)a.appendChild(new_inputs[b]);}};attachments.prototype.share_attach_from_dialog=function(){this._share_attach();Dialog.getCurrent().hide();this.dialog=null;};attachments.prototype._share_attach=function(){var a=ge('share_link');var b=a.value;if(b&&b!='http://')this._share_submit_url(b);};attachments.prototype._share_submit_url=function(c){this._show_attachment_view(this.share_html_block,false);var d=ge(this.view_container_id);var b=d.childNodes[0].childNodes[0].childNodes[0];this._attach_link_url(b,c,true);var a=ge(this.remove_id);a.className+=' edit';this.attached_share=true;};attachments.prototype._attach_link_url=function(c,e,d){var b=function(f){this.remove_attachment_view();}.bind(this);var a=ComposerAttachment.newFromURL(e,b);a.containerReady(c,d);};attachments.prototype._is_fb_code_url=function(a){return a.search('fb:')==0;};attachments.prototype._auto_attach_link=function(event,b){if(this._is_fb_code_url(b)){var a={code:b,context:this.context};this._attach(true,a,false);}else this._share_submit_url(b);};attachments.prototype.register_url_detection=function(b){var a=new UrlDetector($(b));a.subscribe('urlDetected',this._auto_attach_link.bind(this));a.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(a){this._storyType=a;return this;};FeedFormBase.prototype.setProfileType=function(a){this._profileType=a;return this;};FeedFormBase.prototype.setForm=function(a){if(this._elements)return null;this._form=$(a);return this;};FeedFormBase.prototype.setElements=function(a){if(this._form)return null;this._elements=a;return this;};FeedFormBase.prototype.setFeedData=function(a){this._feedData=a;return this;};FeedFormBase.prototype.setAppId=function(a){this._appid=a;return this;};FeedFormBase.prototype.setConnectLocation=function(a){this._connectLocation=a;return this;};FeedFormBase.prototype.setUserMessagePrompt=function(a){this._userMessagePrompt=a;return this;};FeedFormBase.prototype.setUserMessage=function(a){if(a)if(typeof a=='string'){this._userMessage={value:a};}else this._userMessage=a;return this;};FeedFormBase.prototype.setURI=function(a){this._uri=a;return this;};FeedFormBase.prototype.setContinuation=function(a){this._continuation=a;return this;};FeedFormBase.prototype.setButtonCallback=function(a){this._buttonCallback=a;return this;};FeedFormBase.prototype._selectSize=function(a){var b=a.size;if(b!=this._currentSize){CSS.removeClass(this._selectedSize,'Tabset_selected');animation($('preview_'+this._currentSize)).to('opacity',0).hide().duration(150).go();animation($('preview_'+b)).duration(150).checkpoint().show().from('opacity',0).to('opacity',1).duration(150).go();this._selectedSize=a;this._currentSize=b;CSS.addClass(this._selectedSize,'Tabset_selected');}return false;};FeedFormBase.prototype.attachHandlers=function(a){if(!this._isNile)this._attachSizeHandlers(a);var b=$('preview_container').scry('a');b.forEach(function(c){c.listen('click',function(d){d.kill();});});if(this._supportsUserMessage)$('feedform_user_message').focus();return this;};FeedFormBase.prototype._attachSizeHandlers=function(b){var f=this._selectorOptions;var d=this._feedformFilter;for(var c=0;c<f.length;c++){var e=$(d+'_'+f[c].size);var a=$(d+'_'+f[c].size+'_anchor');var g=f[c].size;f[c].node=e;if(CSS.hasClass(e,'Tabset_selected')){this._selectedSize=f[c];this._currentSize=g;}addEventBase(a,'click',this._selectSize.bind(this,f[c]),g);}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(a){this._dialog=new Dialog().setContentWidth(580).setClassName('interaction_form').setAsync(a).setHandler(this.handleButton.bind(this)).onloadRegister(this.attachHandlers.bind(this));if(this.shouldShowLoading())this._dialog.show();return this;};FeedFormBase.prototype._confirm=function(b){if(this._isNile&&this._supportsUserMessage){user_message=$('feedform_user_message').value;this._userMessage.value=b.user_message=user_message;}var a=new AsyncRequest().setURI(this._uri).setData(b).setNectarActionData().setHandler(this.showConfirmed.bind(this));new Dialog().setAsync(a);};FeedFormBase.prototype.handleButton=function(a){if(this._buttonCallback)this._buttonCallback(a);if(a.name=="publish"){var b=this._dialog?this._dialog.getButtonElement(a.name):a;if(b)b.disabled=true;this.confirmFeed();return false;}else if(a.name=="cancel")this.cancelFeed();};FeedFormBase.prototype.cancelFeed=function(){this._finish();};FeedFormBase.prototype.attachProperties=function(a){copy_properties(this,a);if(this._continuationJS){this._continuation=new Function(this._continuationJS);delete this._continuationJS;}return this;};FeedFormBase.prototype._showBase=function(b){var a=new AsyncRequest().setURI(this._uri).setHandler(function(c){var d=c.getPayload().userData;this.attachProperties(d);if(d.no_dialog_shown)this._finish();return true;}.bind(this)).setNectarActionData().setErrorHandler(this._showApplicationError.bind(this)).setData(b);this.showDialog(a);return this;};FeedFormBase.prototype.showConfirmed=function(b){var a;if(this._profileType==FeedFormBase.PROFILE_TYPE.page){a=_tx("The post is now visible on the page's Wall.");}else if(this._profileType==FeedFormBase.PROFILE_TYPE.group){a=_tx("The post is now visible on the group's Wall.");}else if(this._hasTargets){a=_tx("The post is now visible on your friend's Wall.");}else a=_tx("The post is now visible on your Wall and your friends' home pages.");this.showConfirmedWithMessage(a,b);};FeedFormBase.prototype.showConfirmedWithMessage=function(c,e){this.attachProperties(e.payload.userData);var b='<div class="interim_status">'+c+'</div>';var f=_tx("Post Published");if(this._dialog){this._dialog.setBody(b);this._dialog.setTitle(f);this._dialog.setButtons(Dialog.OK);this._dialog.setButtonsMessage('');}else{$('dialog_body').innerHTML=b;var d=ge('publish');if(d!=null)DOM.remove(d);var a=ge('cancel');if(a!=null)a.value=_tx("Done");}setTimeout(this._finish.bind(this),2500);return false;};FeedFormBase.prototype._enableSubmitButtons=function(){var b=['send','publish'];for(var c=0;c<b.length;c++){var a=ge(b[c]);if(a){a.disabled=false;break;}}};FeedFormBase.prototype._showApplicationError=function(b){this._enableSubmitButtons();var d=b.getPayload().userData;var c=function(f){var e=(f&&(d.errorMessage!=null))?d.errorMessage:_tx("There was an application error. Please try again later.");(new ErrorDialog()).showError(d.errorTitle,e);};var a=b.getError();if(a==kError_Platform_ApplicationResponseInvalid){if(d.showDebug){c(true);}else if(this._continuation){this._continuation();}else c(false);}else c(true);return false;};function FeedForm(){this.parent.construct(this);}FeedForm.extend('FeedFormBase');FeedForm.attachSubmitHandler=function(b,a,c){b.onsubmit='';b.listen('submit',function(e,d,f,event){FeedForm.shouldShowLoadingToSelf=f;new FeedForm().setForm(e).setAppId(d).show();return false;}.curry(b,a,c));};FeedForm.prototype._setPublishButtonText=function(a){this.publish_button.value=a;};FeedForm.prototype._setCancelButtonText=function(a){this.cancel_button.value=a;};FeedForm.prototype.shouldShowLoading=function(){return FeedForm.shouldShowLoadingToSelf;};FeedForm.prototype.show=function(){var b={};if(this._form){b={callback:this._form.getAttribute('action'),elements:serialize_form(this._form)};}else if(this._elements)b.elements=this._elements;var a={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(a,b);return this._showBase(a);};FeedForm.prototype.cancelFeed=function(){this._finish();};FeedForm.prototype.confirmFeed=function(){var a={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(a);};function MultiFeedForm(){this.parent.construct(this);this._hasTargets=true;}MultiFeedForm.extend('FeedFormBase');MultiFeedForm.prototype.setPrefillId=function(a){if(a>0){this._prefillId=a;}else this._prefillId=null;return this;};MultiFeedForm.prototype.removeRecipient=function(a){this._toIds=this._toIds.filter(function(b){return b!=a;});if(this._toIds.length==0){this._finish();}else DOM.remove('sp'+a);return false;};MultiFeedForm.prototype.confirmFeed=function(){var a={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(a);};MultiFeedForm.prototype.shouldShowLoading=function(){return FeedFormBase.shouldShowLoadingToOthers;};MultiFeedForm.prototype.show=function(){var c=[];if(this._prefillId){c.push(this._prefillId);}else{var d=this._form.getElementsByTagName('input');for(var b=0;b<d.length;b++)if(d[b].getAttribute('fb_protected')=='true'&&(CSS.hasClass(d[b],'fb_token_hidden_input')||d[b].name=='ids[]'||d[b].name=='friend_selector_id')&&(d[b].type!='checkbox'||d[b].checked))c.push(d[b].value);}this._toIds=c;var a={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(a);};MultiFeedForm.prototype.attachHandlers=function(a){for(var b=0;b<this._toIds.length;b++){var c=ge('spl_'+this._toIds[b]);if(c)c.onclick=this.removeRecipient.bind(this,this._toIds[b]);}this.parent.attachHandlers(a);return this;};function TargetFeedForm(){this.parent.construct(this);}TargetFeedForm.extend('MultiFeedForm');TargetFeedForm.prototype.confirmFeed=function(){var a={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(a);};TargetFeedForm.prototype.setTarget=function(a){this._toIds=[a];return this;};TargetFeedForm.prototype.show=function(){var a={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(a);};
var FBML=(function(){var zb={};function za(zr,zt,zs){var zq=document.createElement('INPUT');zq.name=zr.getAttribute('idname');zq.type='hidden';zq.setAttribute('fb_protected','true');zq.typeahead=this;if(zr.form)zr.form.appendChild(zq);this._idInput=zq;return this.parent.construct(this,zr,zt,zs);}za.extend('typeaheadpro');za.prototype.updateID=function(zq){if(zq.i){this._idInput.value=zq.i;}else if(zq.is){this._idInput.value=zq.is;}else this._idInput.value='';};za.prototype.destroy=function(){this._idInput.parentNode.removeChild(this._idInput);this._idInput.typeahead=null;this._idInput=null;this.parent.destroy();};za.prototype._onselect=function(zq){this.updateID(zq);this.parent._onselect(zq);};var a=new Object();function y(zq){if(window.console)window.console.log('Facebook FBML Mock AJAX ERROR: '+zq);return false;}function h(zq,zr,zt,zs){if(!zq['url'])return y("no input with id url in form");if(!zq['fb_sig_api_key'])return y("no input with id fb_api_key in form");if(zt)zt();g(zq,zr,zs);}function g(zq,zr,zs){new AsyncRequest().setURI('/fbml/ajax/attach.php').setData(zq).setMethod('POST').setHandler(function(zt){if(zs)zs();if(!zr.removed)set_inner_html(zr,zt.getPayload().html);}.bind(this)).send();}function i(zr){if(zr=='wall'){var zq=wallAttachments;}else if(zr=='message')var zq=inboxAttachments;if(zq){var zv=ge(zq.edit_id);var zt=zq.get_all_form_elements(zv);var zu=Object();for(var zs=0;zs<zt.length;zs++)if(!(zt[zs].type=="radio"||zt[zs].type=="checkbox")||zt[zs].checked)zu[zt[zs].name]=zt[zs].value;zu.context=zq.context;zu.action='edit';g(zu,zv);}}function l(zq,zt,zu,zv,zr,zs){this.requireLogin(zq,function(){return c(zu,zv,zr,zs);});return false;}function c(zx,zy,zq,zs){var zw=ge(zx);if(!zw)return y("target "+zx+" not found");var zr=zw.getAttribute("fbcontext");var zv=FBML.Contexts[zr];if(!zq)return y("You must either specify a clickrewriteform (an id) or use the clickrewrite attribute inside a form");var zt=typeof this.PROFILE_OWNER_ID=='undefined'?0:this.PROFILE_OWNER_ID;var zu=serialize_form(zq);zu.fb_mockajax_context=zv;zu.fb_mockajax_context_hash=zr;zu.fb_mockajax_url=zy;zu.fb_target_id=zt;zu.fb_mockajax_rewrite_id=zx;new AsyncRequest().setURI('/fbml/mock_ajax_proxy.php').setMethod("POST").setFBMLForm().setData(zu).setHandler(function(zza){var zz=zza.getPayload();if(zz.ok){set_inner_html(zw,zz.html);}else return y(zz.error_message);FBML.mockAjaxResponse=zz;return zz.ok;}.bind(this)).setErrorHandler(function(zz){return y("Failed to successfully retrieve data from Facebook when making mock AJAX call to rewrite id "+zx);}.bind(this)).send();if(zs)DOM.setContent(zw,HTML(zs));return false;}function r(zq){return q(zq,"");}function s(zv){var zt=null;if(zt=ge(zv)){var zs=zt.parentNode.innerHTML;zt.id='dialog_invoked_'+zt.id;var zq=parseInt(zt.getAttribute('fb_dialog_width'));var zu=zt.cloneNode(true);DOM.setContent(zt,'');var zr=new Dialog();if(zq)zr.setContentWidth(zq);zr.setImmediateRendering(true).setStackable(true).setBody(zs).setFullBleed(true).show();zb[zt.id]={elem:zu,dialog:zr};}return false;}function u(zv){var zr=null;var zq='dialog_invoked_'+zv;for(dialog_id in zb)if(zr=ge(dialog_id)){var zt=zr.id.replace('dialog_invoked_','');var zs=null;if(zs=ge(zt))zs.id='dialog_closed_'+zt;var zu=zr.parentNode;DOM.setContent(zu,'');zu.appendChild(zb[dialog_id].elem);zb[dialog_id].elem.id=zt;}if(zb[zq].dialog)zb[zq].dialog.hide();}function o(zq){return q(zq,"none");}function t(zr){var zq=ge(zr);if(!zq){return y("Could not find target "+zr);}else{zq.style.display=(zq.style.display=="none")?'':'none';return false;}}function q(zs,zq){var zr=ge(zs);if(!zr){return y("Could not find target "+zs);}else{zr.style.display=zq;return false;}}function n(zq){return p(zq,'');}function m(zq){return p(zq,'disabled');}function p(zs,zq){var zr=ge(zs);if(!zr){return y("Could not find target "+zs);}else{zr.disabled=zq;return false;}}function z(zq,zr){new AsyncRequest().setURI('/ajax/api/tos.php').setData({app_id:zq,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(zt){if(zt.getPayload()){var zu=zt.getPayload();if(zr){var zs=ge(zr);f(zs,zu);if(this.loginContinuation)this.loginContinuation=this.loginContinuation.bind(zs);}if(this.sendParams)if(this.loginContinuation)this.loginContinuation=this.loginContinuation.bind(null,zu);}this.loginDialog&&this.loginDialog.hide();this.loginContinuation&&this.loginContinuation();this.loginCancellation=this.loginContinuation=this.loginDialog=null;})).send();}function k(){this.loginCancellation&&this.loginCancellation();this.loginDialog&&this.loginDialog.hide();this.loginContinuation=this.loginCancellation=this.loginDialog=null;}function f(zr,zq){var zs;for(zs=zr.childNodes.length-1;zs>=0;zs--)if(zr.childNodes[zs].name&&zr.childNodes[zs].name.indexOf('fb_sig')==0)zr.removeChild(zr.childNodes[zs]);for(keyVar in zq)DOM.appendContent(zr,$N('input',{name:keyVar,value:zq[keyVar],type:'hidden'}));}function e(zr,zq){this.grantedPerms=true;if(zr)DOM.appendContent(zr,$N('input',{name:'fb_perms_approved',value:'1',type:'hidden'}));Dialog.getCurrent()._submitForm('POST','/fbml/ajax/permissions.php',zq);return false;}function d(zr,zq){if(window.ApiExtendedPermissions&&window.ApiExtendedPermissions.closeHandler)window.ApiExtendedPermissions.closeHandler();if(this.grantedPerms)zr();if(zq)zq.submit();}function zc(zq,zv,zu,zt){var zr=new AsyncRequest().setURI('/fbml/ajax/permissions.php').setData({app_id:zq,perms:zv});this.grantedPerms=false;var zs=new Dialog().setAsync(zr).setHandler(e.bind(this,zt)).setCloseHandler(d.bind(this,zu,zt)).show();}function zd(zq,zu,zs){var zr=new AsyncRequest().setURI('/fbml/ajax/permissions.php').setData({app_id:zq,perms_string:zu});this.grantedPerms=false;var zv=this;var zt=new Dialog().setAsync(zr).setHandler(e.bind(this,null)).setCloseHandler(function(){d.call(zv,bagofholding,null);if(zv.grantedPerms&&this.getUserData())zs(this.getUserData().profile_id);}).show();}function zm(zs,zq,zr,zt){b(function(){FB.Connect.showPermissionDialog(zs,zq,zr,zt);});}function zk(zq){b(function(){FB.Connect.showBookmarkDialog(zq);});}function w(zq,zr){b(function(){FB.Connect.createApplication(zq,zr);});}function zn(zw,zs,zq,zv,zx,zu,zt,zr){b(function(){FB.Connect.streamPublish(zw,zs,zq,zv,zx,zu,zt,zr);});}function b(zq){Arbiter.subscribe('PLATFORM_HAS_SESSION_DATA',function(event,zr){FB.init({apiKey:zr.api_key,xdChannelUrl:"/xd_receiver_v0.4.php"});FB.ensureInit(function(){FB.Facebook.apiClient.set_session(zr.session);zq();});});}function zl(zq,zw,zx,zr,zv,zs,zz,zy){var zt={template_id:zw,template_data:zx,body_general:zr};var zu;if(zv&&(!hasArrayNature(zv)||zv.length>0)){if(hasArrayNature(zv))zv=zv[0];zu=new TargetFeedForm().setTarget(zv);}else zu=new FeedForm();zu.setContinuation(zs).setFeedData(zt).setAppId(zq).setUserMessagePrompt(zz).setUserMessage(zy).show();}function v(){if(this.loginDialog)this.loginDialog.close();}function zi(zq,zs,zr,zt,zw,zv){if(this.loginDialog)return;var zu=zt?zt.id:'';this.sendParams=zw;this.connectParams=zv?zv:false;this.loginDialog=new Dialog().setStackable(true).setClassName('api_confirmation');this.loginContinuation=zs;this.loginCancellation=zr;new AsyncRequest().setURI('/ajax/api/tos.php').setData({login_form_id:zu,app_id:zq,profile_id:typeof PROFILE_OWNER_ID=='undefined'?0:PROFILE_OWNER_ID,next:document.location.href}).setReadOnly(true).setHandler(bind(this,function(zx,zz){var zy=zz.getPayload();if(zy){if(zy.redirect){goURI(zy.uri);}else this.loginDialog.setTitle(zy.title).setBody(zy.content).show();}else{zx();this.loginCancellation=null;this.loginContinuation=null;this.loginDialog=null;}},zs)).send();}function zj(zzc,zq,zzd,zx,zzb,zy,zza){var zz='';if(!zzb){if(zy)zzc.onSubmit=fsth.captured_event;zz=$('message').value;}if(zza){var zv=[];zv.push(zza);}else{var zw=zzc.getElementsByTagName('input');var zv=[];var zt=[];for(var zu=0;zu<zw.length;zu++)if(zw[zu].getAttribute('fb_protected')=='true'&&(zw[zu].name=='ids[]'||zw[zu].name=='friend_selector_id')&&(zw[zu].type!='checkbox'||zw[zu].checked)){zv.push(zw[zu].value);}else if(zw[zu].getAttribute('fb_protected')=='true'&&zw[zu].name=='emails[]')zt.push(zw[zu].value);}var zs={app_id:zq,to_ids:zv,to_emails:zt,request_type:zzd,invite:zx,content:zzc.getAttribute('content'),preview:zzb,is_multi:zy,form_id:zzc.id,prefill:(zza>0),message:zz,donot_send:ge('donotsend')?$('donotsend').checked:false};var zr=new AsyncRequest().setURI('/fbml/ajax/prompt_send.php').setData(zs);if(zzb){new Dialog().setClassName('req_dialog').setAsync(zr).setStackable(true).show();}else{zr.setHandler(function(zze){zzc.submit();});new Dialog().setAsync(zr);}return false;}function j(zq){if(Dialog.getCurrent()){Dialog.getCurrent().hide();return;}generic_dialog.get_dialog(zq).fade_out(100);}function zf(zr){var zt=$('sp'+zr);var zs=zt.parentNode;zs.removeChild(zt);for(var zq=0;zq<zs.childNodes.length;zq++)if(zs.childNodes[zq].nodeName=='SPAN')return false;generic_dialog.get_dialog(zs).fade_out(100);return false;}function zh(zr,zu,zt){var zs=zu.getElementsByTagName('input');for(var zq=0;zq<zs.length;zq++)if(((zs[zq].name=='emails[]')||(zs[zq].name=='ids[]'))&&(zs[zq].value==zr)){delNode=zs[zq].parentNode.parentNode.parentNode.parentNode.parentNode.token;if(delNode)delNode.remove(false);}zf(zr);return false;}function zg(zu,zt,zs){if(zs){if(fs.selected_ids[zu]){fs.unselect(zu);fs.force_reset();}else{zh(zu,zt,zs);return false;}}else{var zr=zt.getElementsByTagName('input');for(var zq=0;zq<zr.length;zq++)if(zr[zq].getAttribute('fb_protected')=='true'&&zr[zq].value==zu)if(zr[zq].name=='ids[]'){if(zr[zq].type=='checkbox'){if(zr[zq].checked)zr[zq].click();}else zr[zq].parentNode.parentNode.parentNode.parentNode.parentNode.token.remove(true);}else if(zr[zq].name=='friend_selector_id'){zr[zq].typeahead.select_suggestion(false);zr[zq].typeahead.set_value('');zr[zq].value='';}}zf(zu);return false;}var zo=function(zq){var zt=zq.getElementsByTagName('a');for(var zs=0;zs<zt.length;zs++)if(!zt[zs].getAttribute('flash'))addEventBase(zt[zs],'click',Event.kill);var zr=zq.getElementsByTagName('form');for(var zs=0;zs<zr.length;zs++)zr[zs].onsubmit=function(){return false;};};var x=function(zq,zr){for(styleName in zr)zq.style[styleName]=zr[styleName];};var ze=function(zq,zr){var zs=fbjs_sandbox.getSandbox(zq);if(zs)zs.setBridgeHash(zr);};var zp=function(zq,event){if(zq.onsubmit)try{if(!zq.onsubmit(event))return;}catch(e){if(e.message=="Object doesn't support this action"){if(!zq.onsubmit())return;}else throw e;}zq.submit();};return {friendSelector:za,Contexts:a,attachCurlFromObject:h,attachFromPreview:i,clickRewriteAjax:l,clickToShow:r,clickToShowDialog:s,clickToHide:o,clickToEnable:n,clickToDisable:m,clickToToggle:t,closeDialogInvoked:u,createApplication:w,sendRequest:zj,removeTokenizerRecipient:zh,removeReqRecipient:zg,cancelDialog:j,addHiddenInputs:f,fbmlLogin:z,cancelLogin:k,requireLogin:zi,closeLoginDialog:v,showFeedDialog:zl,streamPublish:zn,promptPermission:zc,promptPermissionPro:zd,showPermissionDialog:zm,showBookmarkDialog:zk,stripLinks:zo,enforceStyle:x,registerFBJSBridge:ze,submitForm:zp};})();
function PlatformCanvasController(b,e,g,f,c,d,a,h){this.sessionKey=e;this.appName=c;this.appId=b;this.callback=d;this.api_key=a;this.isFirstPage=false;this.isIFrame=false;this._movingPage=false;this.sessionRefresh=(g*900);if(this.appId&&this.sessionKey&&this.sessionRefresh)setTimeout(this.refreshAppSession.bind(this),this.sessionRefresh);PlatformCanvasController.singleton=this;Arbiter.inform('PLATFORM_HAS_SESSION_DATA',{api_key:a,session:{session_key:e,uid:h,expires:g,secret:f}},Arbiter.BEHAVIOR_PERSISTENT);}PlatformCanvasController.AUTO_REFRESH=30000;PlatformCanvasController.prototype.setUpIFrame=function(a){PageTransitions.registerHandler(this.handleChange.bind(this));this.isIFrame=true;this.isStatic=a;};PlatformCanvasController.prototype.autoRefreshAd=function(){if(this.isIFrame){this.isFirstPage=true;$('app'+this.appId+'_iframe_canvas').onload=this._clickRefresh.bind(this);}this._ignoreNext=true;this._loopRefresh();};PlatformCanvasController.prototype.requireLogin=function(){var a=FB.IFrameUtil.CanvasUtilServer.loginResponse;FBML.requireLogin(this.appId,a.bind(null,true),a.bind(null,false),null,true,true);};PlatformCanvasController.prototype.closeLogin=function(){FBML.closeLoginDialog();};PlatformCanvasController.prototype.showFeedDialog=function(c,d,a,b,f,e){FBML.showFeedDialog(this.appId,c,d,a,b,FB.IFrameUtil.CanvasUtilServer.loginResponse.bind(null),f,e);};PlatformCanvasController.prototype._loopRefresh=function(){if(this._ignoreNext){this._ignoreNext=false;}else this.refreshAd();this._loopRefresh.bind(this).defer(PlatformCanvasController.AUTO_REFRESH);};PlatformCanvasController.prototype._clickRefresh=function(){this.refreshAd();this._ignoreNext=true;};PlatformCanvasController.prototype.refreshAppSession=function(){new AsyncRequest().setURI('/ajax/session.php').setData({app_id:this.appId,session_key:this.sessionKey}).setReadOnly(true).setHandler(function(b){var a=b.getPayload();if(a.session_end>0)setTimeout(this.refreshAppSession.bind(this),this.sessionRefresh);}.bind(this)).send();};PlatformCanvasController.prototype.refreshUrl=function(c){var a=c.href;if(a.startsWith(this.callback)){var b=new URI(a.substring(this.callback.length));this.changeUrlSuffix(b,true);}return false;};PlatformCanvasController.refreshUrl=function(a){if(PlatformCanvasController.singleton)PlatformCanvasController.singleton.refreshUrl(a);};PlatformCanvasController.prototype.changeUrlSuffix=function(d,b){this.currentUri=URI.getRequestURI().getUnqualifiedURI();var c=new URI(this.getAppPrefix()+d);this.stripFbParams(c);var a=b&&PlatformCanvasController.storesIFrameHistory(this.isStatic);if(this.currentUri.toString()!=c.toString()){this.currentUri=c;this.refreshAd();PageTransitions.go(c.toString(),a);}};PlatformCanvasController.prototype.getAppPrefix=function(){return "/"+this.appName+"/";};PlatformCanvasController.prototype.convertFromApps=function(c){var a=this.getAppPrefix();var b=c.getUnqualifiedURI().toString().substring(a.length);return new URI(this.callback+b);};PlatformCanvasController.prototype.convertToApps=function(b){var a=b.toString().substring(this.callback.length);return new URI(this.getAppPrefix()+a);};PlatformCanvasController.prototype.stripFbParams=function(c){var b=c.getQueryData();var a={};for(key in b)if((!key.startsWith("fb_")||key.startsWith("fb_force_mode"))&&!key.startsWith("_fb")&&!key.startsWith("quickling_apps"))a[key]=b[key];c.setQueryData(a);};PlatformCanvasController.prototype.refreshAd=function(){if(this.isFirstPage){this.isFirstPage=false;}else ads_refresh(this.appName,'/canvas.php');};PlatformCanvasController.prototype.handleChange=function(b){if(!b.getPath().startsWith("/"+this.appName)||this._movingPage)return false;var a=b.getUnqualifiedURI();this.stripFbParams(a);if(this.currentUri.toString()!=a.toString()){FB.IFrameUtil.CanvasUtilServer.loadNewUrl(this.convertFromApps(b).toString());this.currentUri=a;}PageTransitions.transitionComplete();return true;};PlatformCanvasController.prototype.goURI=function(b){this._movingPage=true;var a=new URI(b);a.addQueryData({_fb_q:true});PageTransitions.go(a);};PlatformCanvasController.storesIFrameHistory=function(a){if(ua.ie()){return true;}else if(ua.firefox()){if(a){return true;}else return false;}else if(ua.safari()){return false;}else return false;};var smartIframes=[];function smartSizingFrameAdded(){window.onresize=_resizeSmartFrames;smartIframes=[];var a=document.getElementsByTagName('iframe');for(var c=0;c<a.length;c++){var b=a[c];if(CSS.hasClass(b,'smart_sizing_iframe')){CSS.removeClass(b,'canvas_iframe_util');smartIframes.push(b);b.style.width=b.parentNode.scrollWidth-2+"px";}}_resizeSmartFrames();}if(window.innerHeight){var windowHeight=function(){return window.innerHeight;};}else if(document.documentElement&&document.documentElement.clientHeight){var windowHeight=function(){return document.documentElement.clientHeight;};}else var windowHeight=function(){return DOMScroll.getScrollRoot().clientHeight;};function _resizeSmartFrames(){var b=windowHeight();for(var c=0;c<smartIframes.length;c++){var a=smartIframes[c];var d=b-elementY(a)-61;a.style.height=d/(smartIframes.length-c)+'px';}}
if(Object.prototype.eval)window.eval=Object.prototype.eval;delete Object.prototype.eval;delete Object.prototype.valueOf;function fbjs_sandbox(a){if(fbjs_sandbox.instances['a'+a])return fbjs_sandbox.instances['a'+a];this.appid=a;this.pending_bootstraps=[];this.bootstrapped=false;fbjs_sandbox.instances['a'+a]=this;}fbjs_sandbox.instances={};fbjs_sandbox.prototype.bootstrap=function(){if(!this.bootstrapped){var appid=this.appid;var code=['a',appid,'_Math = new fbjs_math();','a',appid,'_Date = fbjs_date();','a',appid,'_String = new fbjs_string();','a',appid,'_RegExp = new fbjs_regexp();','a',appid,'_Ajax = fbjs_ajax(',appid,');','a',appid,'_Dialog = fbjs_dialog(',appid,');','a',appid,'_Facebook = new fbjs_facebook(',appid,');','a',appid,'_Animation = new fbjs_animation();','a',appid,'_LiveMessage = new fbjs_livemessage(',appid,');','a',appid,'_document = new fbjs_main(',appid,');','a',appid,'_undefined = undefined;','a',appid,'_console = new fbjs_console();','a',appid,'_setTimeout = fbjs_sandbox.set_timeout;','a',appid,'_setInterval = fbjs_sandbox.set_interval;','a',appid,'_escape = escapeURI;','a',appid,'_unescape = unescape;'];for(var i in {clearTimeout:1,clearInterval:1,parseFloat:1,parseInt:1,isNaN:1,isFinite:1})code=code.concat(['a',appid,'_',i,'=',i,';']);eval(code.join(''));}for(var i=0,il=this.pending_bootstraps.length;i<il;i++)eval_global(this.pending_bootstraps[i]);this.pending_bootstraps=[];this.bootstrapped=true;};fbjs_sandbox.prototype.setBridgeHash=function(a){this.bridgeHash=a;return this;};fbjs_sandbox.quicklingEnabled=function(){query=URI.getRequestURI().getQueryData();if(query._fb_q&&window.Quickling)return true;return false;};fbjs_sandbox.getSandbox=function(a){return fbjs_sandbox.instances['a'+a];};fbjs_sandbox.loadScripts=function(a){script=a.shift(0);if(!script)return false;if(script.inline){eval_global(script.inline);fbjs_sandbox.loadScripts(a);}else loadExternalJavascript(script.src,fbjs_sandbox.loadScripts.bind(null,a));};var $FBJS=function(){function d(e){if(e==window){return null;}else if(e.ownerDocument===document){fbjs_console.error('ref called with a DOM object!');return fbjs_dom.get_instance(e);}else{if(ua.safari()<528.16&&(typeof e=='object')&&!(e instanceof Object))return null;return e;}}function c(e){return (e instanceof Object||b[e])?'__unknown__':e;}var b={caller:true,$FBJS:true};function a(e){var g=[];for(var f=0;f<e.length;f++)g.push(e[f]);return g;}return ({arg:a,idx:c,ref:d});}();void function(){var a=String.prototype.replace,b=String.prototype.toLowerCase;fbjs_sandbox.safe_string=function(c){String.prototype.replace=a;String.prototype.toLowerCase=b;return c+'';};}();fbjs_sandbox.set_timeout=function(a,b){if(typeof a!='function'){fbjs_console.error('setTimeout may not be used with a string. Please enclose your event in an anonymous function.');}else return setTimeout(a,b);};fbjs_sandbox.set_interval=function(b,a){if(typeof b!='function'){fbjs_console.error('setInterval may not be used with a string. Please enclose your event in an anonymous function.');}else return setInterval(b,a);};function fbjs_main(a){fbjs_private.get(this).appid=a;}fbjs_main.allowed_elements={a:true,abbr:true,acronym:true,address:true,b:true,br:true,bdo:true,big:true,blockquote:true,caption:true,center:true,cite:true,code:true,del:true,dfn:true,div:true,dl:true,dd:true,dt:true,em:true,fieldset:true,font:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,hr:true,i:true,img:true,input:true,ins:true,iframe:true,kbd:true,label:true,legend:true,li:true,ol:true,option:true,optgroup:true,p:true,pre:true,q:true,s:true,samp:true,select:true,small:true,span:true,strike:true,strong:true,sub:true,sup:true,table:true,textarea:true,tbody:true,td:true,tfoot:true,th:true,thead:true,tr:true,tt:true,u:true,ul:true};fbjs_main.allowed_editable={embed:true,object:true};fbjs_main.allowed_events={focus:true,click:true,mousedown:true,mouseup:true,dblclick:true,change:true,reset:true,select:true,submit:true,keydown:true,keypress:true,keyup:true,blur:true,load:true,mouseover:true,mouseout:true,mousemove:true,selectstart:true};fbjs_main.prototype.getElementById=function(b){var a=fbjs_private.get(this).appid;return fbjs_dom.get_instance(document.getElementById('app'+a+'_'+b),a);};fbjs_main.prototype.getRootElement=function(){var a=fbjs_private.get(this).appid;return fbjs_dom.get_instance(document.getElementById('app_content_'+a).firstChild,a);};fbjs_main.prototype.createElement=function(a){var b=fbjs_sandbox.safe_string(a.toLowerCase());if(fbjs_main.allowed_elements[b]){return fbjs_dom.get_instance(document.createElement(b),fbjs_private.get(this).appid);}else switch(b){case 'fb:swf':return new fbjs_fbml_dom('fb:swf',fbjs_private.get(this).appid);break;default:fbjs_console.error(b+' is not an allowed DOM element');break;}};fbjs_main.prototype.setLocation=function(a){a=fbjs_sandbox.safe_string(a);if(fbjs_dom.href_regex.test(a)){if(window.Quickling&&Quickling.isActive()){if(!Quickling.isFeatureEnabled('full_platform'))a=new URI(a).addQueryData({_fb_q:true});goURI(a);}else document.location.href=a;return this===window?null:this;}else fbjs_console.error(a+' is not a valid location');};function fbjs_facebook(a){var b=fbjs_private.get(this);b.appid=a;b.sandbox=fbjs_sandbox.instances['a'+a];this.appid=a;}fbjs_facebook.prototype.getUser=function(){var a=fbjs_private.get(this);if(a.sandbox.data.installed){return a.sandbox.data.user;}else return null;};fbjs_facebook.prototype.isApplicationAdded=function(){return fbjs_private.get(this).sandbox.data.installed;};fbjs_facebook.prototype.isLoggedIn=function(){return fbjs_private.get(this).sandbox.data.installed;};fbjs_facebook.prototype.urchinTracker=function(a){if(urchinTracker){urchinTracker(a);}else fbjs_console.error('There is no fb:google-analytics tag on this page!');};fbjs_facebook.prototype.showFeedDialog=function(d,e,a,c,b,g,f){FBML.showFeedDialog(this.appid,d,e,a,c,b,g,f);};fbjs_facebook.prototype.streamPublish=function(g,c,a,f,h,e,d,b){FBML.streamPublish(g,c,a,f,h,e,d,b);};fbjs_facebook.prototype.promptPermission=function(b,a){FBML.promptPermissionPro(this.appid,b,a);};fbjs_facebook.prototype.showPermissionDialog=function(c,a,b,d){FBML.showPermissionDialog(c,a,b,d);};fbjs_facebook.prototype.showBookmarkDialog=function(a){FBML.showBookmarkDialog(a);};fbjs_facebook.prototype.createApplication=function(a,b){FBML.createApplication(a,b);};fbjs_facebook.prototype.setPublishStatus=function(c){var d=ge(this.appid+'_publish_button');if(d){d.disabled=!c;CSS[c?'removeClass':'addClass'](d,'disabled_button');}var b=ge('app_content_'+this.appid);if(b){var a=DataStore.get(b,'attachment');if(a)a.setEnabled(c);}};fbjs_facebook.prototype.requireLogin=function(b,a){if(!b){fbjs_console.error('Continuation is a required parameter for requireLogin');return false;}var c=fbjs_private.get(this);if(!c.sandbox.data.installed){FBML.requireLogin(this.appid,function(){c.sandbox.data.installed=true;b();},(a||bagofholding));}else b();};fbjs_facebook.prototype.submitOrder=function(d){var a=fbjs_private.get(this).appid;var f=d.receiver;var e=d.order_info;var b=d.next_js;var c=d.next_url;GiftCredits.getPrompt(a,f,e,c,b,GiftCredits.PLACE_APP);};function fbjs_dom(b,a){this.__instance=fbjs_dom.len;try{b.fbjs_instance=fbjs_dom.len;}catch(e){}fbjs_dom[fbjs_dom.len]={instance:this,obj:b,events:{},appid:a};fbjs_dom.len++;}fbjs_dom.len=0;fbjs_dom.attr_setters={href:'setHref',id:'setId',dir:'setDir',checked:'setChecked',action:'setAction',value:'setValue',method:'setMethod',target:'setTarget',src:'setSrc','class':'setClassName',dir:'setDir',title:'setTitle',tabIndex:'setTabIndex',name:'setName',cols:'setCols',rows:'setRows',accessKey:'setAccessKey',disabled:'setDisabled',readOnly:'setReadOnly',type:'setType',selectedIndex:'setSelectedIndex',selected:'setSelected'};fbjs_dom.factory=function(b,a){if(!b.tagName||((!fbjs_main.allowed_elements[b.tagName.toLowerCase()]&&!fbjs_main.allowed_editable[b.tagName.toLowerCase()])||CSS.hasClass(b,'__fbml_tag')||(b.tagName=='INPUT'&&(b.name.substring(0,2)=='fb'||b.name=='post_form_id'))||b.getAttribute('fb_protected')=='true')){return null;}else return new this(b,a);};fbjs_dom.get_data=function(b){if(b.__instance instanceof Object){return null;}else{var a=fbjs_dom[b.__instance];return a.instance==b?a:null;}};fbjs_dom.get_obj=function(b){if(b instanceof fbjs_fbml_dom){return fbjs_fbml_dom.get_obj(b);}else if(typeof b.__instance=='number'){var a=fbjs_dom[b.__instance];if(a&&a.instance==b){return a.obj;}else throw ('This DOM node is no longer valid.');}else throw ('This DOM node is no longer valid.');};fbjs_dom.render=function(a){if(a instanceof fbjs_fbml_dom)fbjs_fbml_dom.render(a);};fbjs_dom.get_instance=function(b,a){if(!b)return null;if(typeof b.fbjs_instance=='undefined'){return fbjs_dom.factory(b,a);}else return fbjs_dom[b.fbjs_instance].instance;};fbjs_dom.get_instance_list=function(c,a){var e=[];for(var b=0;b<c.length;b++){var d=fbjs_dom.get_instance(c[b],a);if(d)e.push(d);}return e;};fbjs_dom.get_first_valid_instance=function(c,b,a){var d=null;if(c&&((c.id&&c.id.indexOf('app_content')!=-1)||(c.tagName&&c.tagName.toLowerCase()=='body')))return null;while(c&&(!(d=fbjs_dom.factory(c,a)))){if((c.id&&c.id.indexOf('app_content')!=-1)||(c.tagName&&c.tagName.toLowerCase()=='body'))return null;c=c[b];}return d;};fbjs_dom.clear_instances=function(d,c){if(c&&d.fbjs_instance){delete fbjs_dom[d.fbjs_instance].obj;delete fbjs_dom[d.fbjs_instance].events;delete fbjs_dom[d.fbjs_instance].instance;delete fbjs_dom[d.fbjs_instance];d.fbjs_instance=undefined;}var a=d.childNodes;for(var b=0;b<a.length;b++)fbjs_dom.clear_instances(a[b],true);};fbjs_dom.prototype.appendChild=function(a){fbjs_dom.get_obj(this).appendChild(fbjs_dom.get_obj(a));fbjs_dom.render(a);return a;};fbjs_dom.prototype.insertBefore=function(b,a){if(a){fbjs_dom.get_obj(this).insertBefore(fbjs_dom.get_obj(b),fbjs_dom.get_obj(a));}else fbjs_dom.get_obj(this).appendChild(fbjs_dom.get_obj(b));fbjs_dom.render(b);return b;};fbjs_dom.prototype.removeChild=function(a){var a=fbjs_dom.get_obj(a);fbjs_dom.clear_instances(a,true);fbjs_dom.get_obj(this).removeChild(a);return this;};fbjs_dom.prototype.replaceChild=function(a,b){fbjs_dom.clear_instances(b,true);fbjs_dom.get_obj(this).replaceChild(fbjs_dom.get_obj(a),fbjs_dom.get_obj(b));return this;};fbjs_dom.prototype.cloneNode=function(c){var a=fbjs_dom.get_data(this);var b=a.obj.cloneNode(c);b.fbjs_instance=undefined;return fbjs_dom.get_instance(b,a.appid);};fbjs_dom.prototype.getParentNode=function(){var a=fbjs_dom.get_data(this);return fbjs_dom.get_first_valid_instance(a.obj.parentNode,'parentNode',a.appid);};fbjs_dom.prototype.getNextSibling=function(){var a=fbjs_dom.get_data(this);return fbjs_dom.get_first_valid_instance(a.obj.nextSibling,'nextSibling',a.appid);};fbjs_dom.prototype.getPreviousSibling=function(){var a=fbjs_dom.get_data(this);return fbjs_dom.get_first_valid_instance(a.obj.previousSibling,'previousSibling',a.appid);};fbjs_dom.prototype.getFirstChild=function(){var a=fbjs_dom.get_data(this);return fbjs_dom.get_first_valid_instance(a.obj.firstChild,'nextSibling',a.appid);};fbjs_dom.prototype.getLastChild=function(){var a=fbjs_dom.get_data(this);return fbjs_dom.get_first_valid_instance(a.obj.lastChild,'previousSibling',a.appid);};fbjs_dom.prototype.getChildNodes=function(){var a=fbjs_dom.get_data(this);return fbjs_dom.get_instance_list(a.obj.childNodes,a.appid);};fbjs_dom.prototype.getElementsByTagName=function(b){var a=fbjs_dom.get_data(this);return fbjs_dom.get_instance_list(a.obj.getElementsByTagName(b),a.appid);};fbjs_dom.prototype.getOptions=function(){var a=fbjs_dom.get_data(this);return fbjs_dom.get_instance_list(a.obj.options,a.appid);};fbjs_dom.prototype.getForm=function(){var a=fbjs_dom.get_data(this);return fbjs_dom.get_instance(a.obj.form,a.appid);};fbjs_dom.prototype.serialize=function(){var b=fbjs_dom.get_data(this).obj.elements;var a={};for(var c=b.length-1;c>=0;c--)if(b[c].name&&b[c].name.substring(0,2)!='fb'&&b[c].name!='post_form_id'&&!b[c].disabled)if(b[c].tagName=='SELECT'){var f=b[c].multiple?b[c].name+'[]':b[c].name;for(var d=0,e=b[c].options.length;d<e;d++)if(b[c].options[d].selected)serialize_form_helper(a,f,(b[c].options[d].getAttribute('value')==null)?undefined:b[c].options[d].value);}else if(!(b[c].type=='radio'||b[c].type=='checkbox')||b[c].checked||(!b[c].type||b[c].type=='text'||b[c].type=='password'||b[c].type=='hidden'||b[c].tagName=='TEXTAREA'))serialize_form_helper(a,b[c].name,b[c].value);return a;};fbjs_dom.prototype.setInnerXHTML=function(b){var a=fbjs_dom.get_data(this);var e=new fbjs_fbml_sanitize(a.appid);var c=e.parseFBML(b);if(!c)return this;var d=fbjs_dom.get_obj(this);switch(d.tagName){case 'TEXTAREA':fbjs_console.error('setInnerXHTML is not supported on textareas. Please use .value instead.');break;case 'COL':case 'COLGROUP':case 'TABLE':case 'TBODY':case 'TFOOT':case 'THEAD':case 'TR':fbjs_console.error('setInnerXHTML is not supported on this node.');break;default:fbjs_dom.clear_instances(d,false);DOM.setContent(d,'');this.appendChild(c);break;}return this;};fbjs_dom.prototype.setInnerFBML=function(a){var b=fbjs_private.get(a).htmlstring;var c=fbjs_dom.get_obj(this);switch(c.tagName){case 'TEXTAREA':fbjs_console.error('setInnerFBML is not supported on textareas. Please use .value instead.');break;case 'COL':case 'COLGROUP':case 'TABLE':case 'TBODY':case 'TFOOT':case 'THEAD':case 'TR':fbjs_console.error('setInnerFBML is not supported on this node.');break;default:DOM.setContent(c,b);break;}return this;};fbjs_dom.prototype.setTextValue=function(b){var a=fbjs_dom.get_obj(this);fbjs_dom.clear_instances(a,false);DOM.setContent(a,fbjs_sandbox.safe_string(b));return this;};fbjs_dom.prototype.setValue=function(a){fbjs_dom.get_obj(this).value=a;return this;};fbjs_dom.prototype.getValue=function(){var a=fbjs_dom.get_obj(this);if(a.tagName=='SELECT'){var b=a.selectedIndex;if(b==-1){return null;}else if(a.options[b].getAttribute('value')==null){return undefined;}else return a.value;}else return fbjs_dom.get_obj(this).value;};fbjs_dom.prototype.getSelectedIndex=function(){return fbjs_dom.get_obj(this).selectedIndex;};fbjs_dom.prototype.setSelectedIndex=function(a){fbjs_dom.get_obj(this).selectedIndex=a;return this;};fbjs_dom.prototype.getChecked=function(){return fbjs_dom.get_obj(this).checked;};fbjs_dom.prototype.setChecked=function(a){fbjs_dom.get_obj(this).checked=a;return this;};fbjs_dom.prototype.getSelected=function(){return fbjs_dom.get_obj(this).selected;};fbjs_dom.prototype.setSelected=function(a){fbjs_dom.get_obj(this).selected=a;return this;};fbjs_dom.set_style=function(b,c,d){if(typeof c=='string'){if(c=='opacity'){CSS.setOpacity(b,parseFloat(d,10));}else{d=fbjs_sandbox.safe_string(d);if(fbjs_dom.css_regex.test(d)){b.style[c]=d;}else fbjs_console.error(c+': '+d+' is not a valid CSS style');}}else for(var a in c)fbjs_dom.set_style(b,a,c[a]);};fbjs_dom.css_regex=/^(?:[\w\-#%+]+|rgb\(\d+ *, *\d+, *\d+\)|url\('?http[^ ]+?'?\)| +)*$/i;fbjs_dom.prototype.setStyle=function(a,b){fbjs_dom.set_style(fbjs_dom.get_obj(this),a,b);return this;};fbjs_dom.prototype.getStyle=function(a){return fbjs_dom.get_obj(this).style[$FBJS.idx(a)];};fbjs_dom.prototype.setHref=function(a){a=fbjs_sandbox.safe_string(a);if(fbjs_dom.href_regex.test(a)){fbjs_dom.get_obj(this).href=a;return this;}else fbjs_console.error(a+' is not a valid hyperlink');};fbjs_dom.href_regex=/^(?:https?|mailto|ftp|aim|irc|itms|gopher|\/|#)/;fbjs_dom.sanitizeUri=function(a){var b=new URI().parse(a);for(key in b.getQueryData())if(key.startsWith("_fb"))b.removeQueryData(key);return b.toString();};fbjs_dom.prototype.getHref=function(){return fbjs_dom.sanitizeUri(fbjs_dom.get_obj(this).href);};fbjs_dom.prototype.setAction=function(a){a=fbjs_sandbox.safe_string(a);if(fbjs_dom.href_regex.test(a)){fbjs_dom.get_obj(this).action=a;return this;}else fbjs_console.error(a+' is not a valid hyperlink');};fbjs_dom.prototype.getAction=function(){return fbjs_dom.get_obj(this).action;};fbjs_dom.prototype.setMethod=function(a){a=fbjs_sandbox.safe_string(a);fbjs_dom.get_obj(this).method=a.toLowerCase()=='get'?'get':'post';return this;};fbjs_dom.prototype.getMethod=function(){return fbjs_dom.get_obj(this).method;};fbjs_dom.prototype.setSrc=function(a){a=fbjs_sandbox.safe_string(a);if(fbjs_dom.href_regex.test(a)){fbjs_dom.get_obj(this).src=a;return this;}else fbjs_console.error(a+' is not a valid hyperlink');};fbjs_dom.prototype.getSrc=function(){return fbjs_dom.get_obj(this).src;};fbjs_dom.prototype.setTarget=function(a){fbjs_dom.get_obj(this).target=a;return this;};fbjs_dom.prototype.getTarget=function(){return fbjs_dom.get_obj(this).target;};fbjs_dom.prototype.setClassName=function(a){fbjs_dom.get_obj(this).className=a;return this;};fbjs_dom.prototype.getClassName=function(){return fbjs_dom.get_obj(this).className;};fbjs_dom.prototype.hasClassName=function(a){return CSS.hasClass(fbjs_dom.get_obj(this),a);};fbjs_dom.prototype.addClassName=function(a){CSS.addClass(fbjs_dom.get_obj(this),a);return this;};fbjs_dom.prototype.removeClassName=function(a){CSS.removeClass(fbjs_dom.get_obj(this),a);return this;};fbjs_dom.prototype.toggleClassName=function(a){this.hasClassName(a)?this.removeClassName(a):this.addClassName(a);return $FBJS.ref(this);};fbjs_dom.prototype.getTagName=function(){return fbjs_dom.get_obj(this).tagName;};fbjs_dom.prototype.getNodeType=function(){return fbjs_dom.get_obj(this).nodeType;};fbjs_dom.prototype.getId=function(){var a=fbjs_dom.get_obj(this).id;if(a){return a.replace(/^app\d+_/,'');}else return a;};fbjs_dom.prototype.setId=function(b){var a=fbjs_dom.get_data(this);a.obj.id=['app',a.appid,'_',b].join('');return this;};fbjs_dom.prototype.setDir=function(a){fbjs_dom.get_obj(this).dir=a;return this;};fbjs_dom.prototype.getDir=function(a){return fbjs_dom.get_obj(this).dir;};fbjs_dom.prototype.getdir=function(a){return fbjs_dom.get_obj(this).dir;};fbjs_dom.prototype.getClientWidth=function(){return fbjs_dom.get_obj(this).clientWidth;};fbjs_dom.prototype.getClientHeight=function(){return fbjs_dom.get_obj(this).clientHeight;};fbjs_dom.prototype.getOffsetWidth=function(){return fbjs_dom.get_obj(this).offsetWidth;};fbjs_dom.prototype.getOffsetHeight=function(){return fbjs_dom.get_obj(this).offsetHeight;};fbjs_dom.prototype.getAbsoluteLeft=function(){return elementX(fbjs_dom.get_obj(this));};fbjs_dom.prototype.getAbsoluteTop=function(){return elementY(fbjs_dom.get_obj(this));};fbjs_dom.prototype.getScrollHeight=function(){return fbjs_dom.get_obj(this).scrollHeight;};fbjs_dom.prototype.getScrollWidth=function(a){return fbjs_dom.get_obj(this).scrollWidth;};fbjs_dom.prototype.getScrollTop=function(){return fbjs_dom.get_obj(this).scrollTop;};fbjs_dom.prototype.setScrollTop=function(a){fbjs_dom.get_obj(this).scrollTop=a;return this;};fbjs_dom.prototype.getScrollLeft=function(){return fbjs_dom.get_obj(this).scrollLeft;};fbjs_dom.prototype.setScrollLeft=function(a){fbjs_dom.get_obj(this).scrollLeft=a;return this;};fbjs_dom.prototype.getTabIndex=function(){return fbjs_dom.get_obj(this).tabIndex;};fbjs_dom.prototype.setTabIndex=function(a){fbjs_dom.get_obj(this).tabIndex=a;return this;};fbjs_dom.prototype.getTitle=function(){return fbjs_dom.get_obj(this).title;};fbjs_dom.prototype.setTitle=function(a){fbjs_dom.get_obj(this).title=a;return this;};fbjs_dom.prototype.getRowSpan=function(){return fbjs_dom.get_obj(this).rowSpan;};fbjs_dom.prototype.setRowSpan=function(a){fbjs_dom.get_obj(this).rowSpan=a;return this;};fbjs_dom.prototype.getColSpan=function(){return fbjs_dom.get_obj(this).colSpan;};fbjs_dom.prototype.setColSpan=function(a){fbjs_dom.get_obj(this).colSpan=a;return this;};fbjs_dom.prototype.getName=function(){return fbjs_dom.get_obj(this).name;};fbjs_dom.prototype.setName=function(a){fbjs_dom.get_obj(this).name=a;return this;};fbjs_dom.prototype.getCols=function(){return fbjs_dom.get_obj(this).cols;};fbjs_dom.prototype.setCols=function(a){fbjs_dom.get_obj(this).cols=a;return this;};fbjs_dom.prototype.getRows=function(){return fbjs_dom.get_obj(this).rows;};fbjs_dom.prototype.setRows=function(a){fbjs_dom.get_obj(this).rows=a;return this;};fbjs_dom.prototype.getAccessKey=function(){return fbjs_dom.get_obj(this).accessKey;};fbjs_dom.prototype.setAccessKey=function(a){fbjs_dom.get_obj(this).accessKey=a;return this;};fbjs_dom.prototype.setDisabled=function(a){fbjs_dom.get_obj(this).disabled=a;return this;};fbjs_dom.prototype.getDisabled=function(){return fbjs_dom.get_obj(this).disabled;};fbjs_dom.prototype.setMaxLength=function(a){fbjs_dom.get_obj(this).maxLength=a;return this;};fbjs_dom.prototype.getMaxLength=function(){return fbjs_dom.get_obj(this).maxLength;};fbjs_dom.prototype.setReadOnly=function(a){fbjs_dom.get_obj(this).readOnly=a;return this;};fbjs_dom.prototype.getReadOnly=function(){return fbjs_dom.get_obj(this).readOnly;};fbjs_dom.prototype.setType=function(a){a=fbjs_sandbox.safe_string(a);fbjs_dom.get_obj(this).type=a;return this;};fbjs_dom.prototype.getType=function(){return fbjs_dom.get_obj(this).type;};fbjs_dom.prototype.getSelection=function(){var a=fbjs_dom.get_obj(this);return DOM.getCaretPosition(a);};fbjs_dom.prototype.setSelection=function(c,a){var b=fbjs_dom.get_obj(this);DOM.setCaretPosition(b,c,a);return this;};fbjs_dom.prototype.submit=function(){fbjs_dom.get_obj(this).submit();return this;};fbjs_dom.prototype.focus=function(){fbjs_dom.get_obj(this).focus();return this;};fbjs_dom.prototype.select=function(){fbjs_dom.get_obj(this).select();return this;};fbjs_dom.eventHandler=function(event){var a=(event instanceof fbjs_event)?event:new fbjs_event(event?event:window.event,this[2]);if(a.ignore)return;var b=this[1].call(this[0],a);if(b===false)a.preventDefault();return fbjs_event.destroy(a);};fbjs_dom.prototype.addEventListener=function(f,b){f=fbjs_sandbox.safe_string(f.toLowerCase());if(!fbjs_main.allowed_events[f]){fbjs_console.error(f+' is not an allowed event');return false;}var a=fbjs_dom.get_data(this);var e=a.obj;if(!a.events[f])a.events[f]=[];var c=null;var d=null;if(fbjs_sandbox.quicklingEnabled()){d=Event.listen(e,f,c=fbjs_dom.eventHandler.bind([this,b,a.appid]));}else if(e.addEventListener){e.addEventListener(f,c=fbjs_dom.eventHandler.bind([this,b,a.appid]),false);}else if(e.attachEvent)e.attachEvent('on'+f,c=fbjs_dom.eventHandler.bind([this,b,a.appid]));a.events[f].push({func:b,handler:c,listener:d});return $FBJS.ref(this);};fbjs_dom.prototype.removeEventListener=function(f,b){f=f.toLowerCase();var a=fbjs_dom.get_data(this);var e=a.obj;if(a.events[f])for(var c=0,d=a.events[f].length;c<d;c++)if(a.events[f][c].func==b){if(fbjs_sandbox.quicklingEnabled()){a.events[f][c].listener.remove();}else if(e.removeEventListener){e.removeEventListener(f,a.events[f][c].handler,false);}else if(e.detachEvent)e.detachEvent('on'+f,a.events[f][c].handler);a.events[f].splice(c,1);}if(!fbjs_sandbox.quicklingEnabled()&&e['on'+f]==b)e['on'+f]=null;return this;};fbjs_dom.prototype.listEventListeners=function(e){e=e.toLowerCase();var a=fbjs_dom.get_data(this);var b=[];if(a.events[e])for(var c=0,d=a.events[e].length;c<d;c++)b.push(a.events[e].func);if(a.obj['on'+e])b.push(a.obj['on'+e]);return b;};fbjs_dom.prototype.purgeEventListeners=function(e){e=e.toLowerCase();var a=fbjs_dom.get_data(this);var d=a.obj;if(a.events[e])for(var b=0,c=a.events[e].length;b<c;b++)if(fbjs_sandbox.quicklingEnabled()){a.events[e][b].listener.remove();}else if(d.removeEventListener){d.removeEventListener(e,a.events[e][b].handler,false);}else if(d.detachEvent)d.detachEvent('on'+e,a.events[e][b].handler);if(!fbjs_sandbox.quicklingEnabled()&&d['on'+e])d['on'+e]=null;return this;};fbjs_dom.prototype.callSWF=function(e){var f=fbjs_dom.get_data(this).obj;var a=new Array(arguments.length-1);for(var c=1;c<arguments.length;c++)a[c-1]=arguments[c];if(ua.ie()<8){var d=0;for(var c=0;c<f.childNodes.length;c++)if(f.childNodes[c].name=="fbjs")d=f.childNodes[c].getAttribute("value");var b=window.so_swf_fbjs;}else{var d=f.getAttribute("fbjs");var b=document.so_swf_fbjs;}if(b.length!==undefined)b=b[0];return b.callFlash(d,e,a);};function fbjs_fbml_dom(c,a){var b=fbjs_private.get(this);b.type=c;b.appid=a;}fbjs_fbml_dom.get_obj=function(b){var a=fbjs_private.get(b);if(!a.obj){a.obj=document.createElement('div');a.obj.className='__fbml_tag';}return a.obj;};fbjs_fbml_dom.render=function(h){var b=fbjs_private.get(h);if(b.rendered)return;if(!b.id)b.id='swf'+parseInt(Math.random()*999999);switch(b.type){case 'fb:swf':var d=new SWFObject(b.swf_src,b.id,b.width,b.height,['5.0.0'],b.bg_color?b.bg_color:'000000');var e={loop:true,quality:true,scale:true,align:true,salign:true};for(f in e)if(b[f])d.addParam(f,b[f]);d.addParam('wmode','transparent');d.addParam('allowScriptAccess','never');if(b.flash_vars)for(var f in b.flash_vars)d.addVariable(f,b.flash_vars[f]);var j=fbjs_sandbox.instances['a'+b.appid];if(j.validation_vars)for(var f in j.validation_vars)d.addVariable(f,j.validation_vars[f]);d.addVariable('fb_local_connection',j.bridgeHash);var c='_'+'swf'+parseInt(Math.random()*999999);d.addVariable('fb_fbjs_connection',c);d.addParam('fbjs',c);if(b.wait_for_click){var g=document.createElement('img');g.src=b.img_src;if(b.width)g.width=b.width;if(b.height)g.height=b.height;if(b.img_style)fbjs_dom.set_style(g,b.img_style);if(b.img_class)g.className=b.img_class;var a=document.createElement('a');a.href='#';a.onclick=function(){d.write(b.obj);return false;};a.appendChild(g);b.obj.appendChild(a);}else d.write(b.obj);break;}};fbjs_fbml_dom.prototype.setId=function(b){var a=fbjs_private.get(this);a.id=['app',a.appid,'_',b].join('');return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setSWFSrc=function(b){var a=fbjs_private.get(this);b=fbjs_sandbox.safe_string(b);if(fbjs_dom.href_regex.test(b)){a.swf_src=b;}else fbjs_console.error(b+' is not a valid swf');};fbjs_fbml_dom.prototype.setImgSrc=function(b){var a=fbjs_private.get(this);b=fbjs_sandbox.safe_string(b);if(fbjs_dom.href_regex.test(b)){a.img_src=b;}else fbjs_console.error(b+' is not a valid src');return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setWidth=function(b){var a=fbjs_private.get(this);a.width=(/\d+%?/.exec(b)||[]).pop();return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setHeight=function(b){var a=fbjs_private.get(this);a.height=(/\d+%?/.exec(b)||[]).pop();return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setImgStyle=function(c,e){var a=fbjs_private.get(this);var d=a.img_style?a.img_style:a.img_style={};if(typeof c=='string'){d[c]=e;}else for(var b in c)this.setImgStyle(b,c[b]);return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setImgClass=function(b){var a=fbjs_private.get(this);a.img_class=b;return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setFlashVar=function(c,d){var a=fbjs_private.get(this);var b=a.flash_vars?a.flash_vars:a.flash_vars={};b[c]=d;return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setSWFBGColor=function(a){var b=fbjs_private.get(this);if(fbjs_dom.css_regex.text(a)){b.bg_color=a;}else fbjs_console.error(a+' is not a valid background color.');return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setWaitForClick=function(b){var a=fbjs_private.get(this);a.wait_for_click=b;return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setLoop=function(b){var a=fbjs_private.get(this);a.loop=b;return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setQuality=function(b){var a=fbjs_private.get(this);a.quality=b;return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setScale=function(b){var a=fbjs_private.get(this);a.scale=b;return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setAlign=function(b){var a=fbjs_private.get(this);a.align=b;return $FBJS.ref(this);};fbjs_fbml_dom.prototype.setSAlign=function(b){var a=fbjs_private.get(this);a.salign=b;return $FBJS.ref(this);};function fbjs_event(event,a){if(!fbjs_event.hacks){fbjs_event.hacks=true;fbjs_event.should_check_double_arrows=ua.safari()&&(ua.safari()<500);fbjs_event.arrow_toggle={};}for(var c in fbjs_event.allowed_properties)this[c]=event[c];this.keyCode=this.keyCode||event.charCode;var d=null;if(event.target){d=event.target;}else if(event.srcElement)d=event.srcElement;if(d&&d.nodeType==3)d=d.parentNode;this.target=fbjs_dom.get_instance(d,a);var b=Vector2.getEventPosition(event);this.pageX=b.x;this.pageY=b.y;if(fbjs_event.should_check_double_arrows&&this.keyCode>=37&&this.keyCode<=40){fbjs_event.arrow_toggle[this.type]=!fbjs_event.arrow_toggle[this.type];if(fbjs_event.arrow_toggle[this.type])this.ignore=true;}fbjs_private.get(this).event=event;}fbjs_event.allowed_properties={type:true,ctrlKey:true,keyCode:true,metaKey:true,shiftKey:true};fbjs_event.prototype.preventDefault=function(){var a=fbjs_private.get(this);if(!a.prevented&&a.event.preventDefault){a.event.preventDefault();a.prevented=true;}a.return_value=false;};fbjs_event.prototype.stopPropagation=function(){var event=fbjs_private.get(this).event;if(event.stopPropagation){event.stopPropagation();}else event.cancelBubble=true;};fbjs_event.destroy=function(a){var b=fbjs_private.get(a).return_value;fbjs_private.remove(a);delete a.target;return b==undefined?true:b;};function fbjs_math(){}fbjs_math.prototype.abs=Math.abs;fbjs_math.prototype.acos=Math.acos;fbjs_math.prototype.asin=Math.asin;fbjs_math.prototype.atan=Math.atan;fbjs_math.prototype.atan2=Math.atan2;fbjs_math.prototype.ceil=Math.ceil;fbjs_math.prototype.cos=Math.cos;fbjs_math.prototype.exp=Math.exp;fbjs_math.prototype.floor=Math.floor;fbjs_math.prototype.log=Math.log;fbjs_math.prototype.max=Math.max;fbjs_math.prototype.min=Math.min;fbjs_math.prototype.pow=Math.pow;fbjs_math.prototype.random=Math.random;fbjs_math.prototype.round=Math.round;fbjs_math.prototype.sin=Math.sin;fbjs_math.prototype.sqrt=Math.sqrt;fbjs_math.prototype.tan=Math.tan;fbjs_math.prototype.valueOf=Math.valueOf;fbjs_math.prototype.E=Math.E;fbjs_math.prototype.LN2=Math.LN2;fbjs_math.prototype.LN10=Math.LN10;fbjs_math.prototype.LOG2E=Math.LOG2E;fbjs_math.prototype.PI=Math.PI;fbjs_math.prototype.SQRT1_2=Math.SQRT1_2;fbjs_math.prototype.SQRT2=Math.SQRT2;function fbjs_string(){}fbjs_string.prototype.fromCharCode=String.fromCharCode;function fbjs_date(){var a=function(){var b=new Date();if(arguments.length)b.setFullYear.apply(b,arguments);return b;};a.parse=Date.parse;return a;}function fbjs_regexp(){var a=function(){var b=arguments.length?new RegExp(arguments[0],arguments[1]):new RegExp();return b;};return a;}function fbjs_console(){}fbjs_console.error=function(a){if(typeof console!='undefined'&&console.error)console.error(a);};fbjs_console.render=function(d){if(d&&typeof d.__priv!='undefined'){var c={};for(var b in d)c[b]=d[b];delete c.__priv;delete c.__private;for(var b in c)c[b]=fbjs_console.render(c[b]);var e=fbjs_private.get(d);for(var b in e)c['PRIV_'+b]=e[b];if(d.__private){var e=fbjs_private.get(d.__private);for(var b in e)c['PRIV_'+b]=e[b];}return c;}else if(d&&typeof d.__instance!='undefined'&&d.setInnerFBML){var c={};for(var b in d)c[b]=d[b];delete c.__instance;c.PRIV_obj=fbjs_dom.get_obj(d);return c;}else if(d&&typeof d=='object'&&d.ownerDocument!=document){var c=d instanceof Array?[]:{};var a=false;for(var b in d){d instanceof Array?c.push(fbjs_console.render(d[b])):c[b]=fbjs_console.render(d[b]);if(c[b]!=d[b])a=true;}return a?c:d;}else return d;};fbjs_console.render_args=function(a){var c=[];for(var b=0;b<a.length;b++)c[b]=fbjs_console.render(a[b]);return c;};if(typeof console!='undefined')for(var i in console)fbjs_console.prototype[i]=console[i];fbjs_console.prototype.debug=function(){if(typeof console!='undefined'&&console.debug)console.debug.apply(console,fbjs_console.render_args(arguments));};fbjs_console.prototype.log=function(){if(typeof console!='undefined'&&console.log)console.log.apply(console,fbjs_console.render_args(arguments));};fbjs_console.prototype.warn=function(){if(typeof console!='undefined'&&console.warn)console.warn.apply(console,fbjs_console.render_args(arguments));};fbjs_console.prototype.error=function(){if(typeof console!='undefined'&&console.error)console.error.apply(console,fbjs_console.render_args(arguments));};fbjs_console.prototype.assert=function(){if(typeof console!='undefined'&&console.assert)console.assert.apply(console,fbjs_console.render_args(arguments));};fbjs_console.prototype.dir=function(){if(typeof console!='undefined'&&console.dir)console.dir.apply(console,fbjs_console.render_args(arguments));};fbjs_console.prototype.group=function(){if(typeof console!='undefined'&&console.group)console.group.apply(console,fbjs_console.render_args(arguments));};fbjs_console.prototype.dirxml=function(a){if(typeof console!='undefined'&&console.dirxml)if(a.get_obj){console.dirxml(a.get_obj(a));}else console.dirxml(a);};function fbjs_ajax(a){var d=function(){};for(var b in fbjs_ajax.prototype)d.prototype[b]=fbjs_ajax.prototype[b];var c=fbjs_private.get(d.prototype.__private={});c.appid=a;c.sandbox=fbjs_sandbox.instances['a'+a];c.request=null;d.JSON=fbjs_ajax.JSON;d.FBML=fbjs_ajax.FBML;d.RAW=fbjs_ajax.RAW;return d;}fbjs_ajax.proxy_url='/fbml/fbjs_ajax_proxy.php';fbjs_ajax.RAW=0;fbjs_ajax.JSON=1;fbjs_ajax.FBML=2;fbjs_ajax.STATUS_WAITING_FOR_USER=1;fbjs_ajax.STATUS_WAITING_FOR_SERVER=2;fbjs_ajax.STATUS_IDLE=0;fbjs_ajax.prototype.responseType=0;fbjs_ajax.prototype.useLocalProxy=false;fbjs_ajax.prototype.requireLogin=false;fbjs_ajax.prototype.status=fbjs_ajax.STATUS_IDLE;fbjs_ajax.tokencount=0;fbjs_ajax.tokens=new Object();fbjs_ajax.flash_success=function(a,b){fbjs_ajax.tokens[b].success(a);};fbjs_ajax.flash_fail=function(a){fbjs_ajax.tokens[a].fail();};fbjs_ajax.prototype.post=function(g,f){var e=fbjs_private.get(this.__private);var a=e.appid;var d=ge('post_form_id');if(!e.sandbox.data.installed&&this.requireLogin){this.status=fbjs_ajax.STATUS_WAITING_FOR_USER;FBML.requireLogin(a,function(){this.status=fbjs_ajax.STATUS_READY;e.sandbox.data.installed=true;this.post(g,f);}.bind(this),fbjs_ajax.errorHandler.bind(this));return;}if(this.useLocalProxy&&window.localProxy.callUrl&&this.responseType!=fbjs_ajax.FBML){fbjs_ajax.tokencount++;fbjs_ajax.tokens[fbjs_ajax.tokencount]={success:function(j){this.status=fbjs_ajax.STATUS_READY;this.ondone(j);}.bind(this),fail:fbjs_ajax.errorHandler.bind(this)};var h=(this.responseType==fbjs_ajax.JSON);var b=localProxy.callUrl(g+'?query='+f,h,"fbjs_ajax.flash_success","fbjs_ajax.flash_fail",fbjs_ajax.tokencount);if(!b)(fbjs_ajax.errorHandler.bind(this))();}else{var c={url:g,query:f,type:this.responseType,require_login:this.requireLogin,fb_mockajax_context:fbjs_sandbox.instances['a'+a].contextd,fb_mockajax_context_hash:fbjs_sandbox.instances['a'+a].context,appid:a};this.status=fbjs_ajax.STATUS_WAITING_FOR_SERVER;e.request=new AsyncRequest();e.request.setURI(fbjs_ajax.proxy_url).setData(c).setHandler(fbjs_ajax.doneHandler.bind(this)).setErrorHandler(fbjs_ajax.errorHandler.bind(this)).setTransportErrorHandler(fbjs_ajax.errorHandler.bind(this));if(!this.requireLogin){e.request.setReadOnly(true);e.request.specifiesWriteRequiredParams();}e.request.send();}};fbjs_ajax.prototype.abort=function(){var a=fbjs_private.get(this.__private);if(a.request)a.request.setHandler(bagofholding).setErrorHandler(bagofholding).setTransportErrorHandler(bagofholding);this.status=fbjs_ajax.STATUS_READY;};fbjs_ajax.doneHandler=function(c){if(!(this.ondone instanceof Function))this.ondone=function(){};this.status=fbjs_ajax.STATUS_READY;var b=c.getPayload();var a=b.data;switch(b.type){case fbjs_ajax.RAW:this.ondone(a);break;case fbjs_ajax.JSON:fbjs_ajax.make_fbjs_recursive(a);this.ondone(a);break;case fbjs_ajax.FBML:this.ondone(new fbjs_fbml_string(a));break;}};fbjs_ajax.errorHandler=function(){this.status=fbjs_ajax.STATUS_READY;if(this.onerror){this.onerror();}else fbjs_console.error('There was an uncaught Ajax error. Please attach on onerror handler to properly handle failures.');};fbjs_ajax.make_fbjs_recursive=function(b){for(var a in b)if(a.substring(0,5)=='fbml_'){b[a]=new fbjs_fbml_string(b[a]);}else if(typeof b[a]=='object')fbjs_ajax.make_fbjs_recursive(b[a]);};function fbjs_dialog(a){var c=function(e){var d=fbjs_private.get(this);switch(e){case fbjs_dialog.DIALOG_CONTEXTUAL:d.dialog=new ContextualDialog();break;case fbjs_dialog.DIALOG_POP:default:d.dialog=new Dialog();break;}d.dialog.setImmediateRendering(true).setClassName('app_content_'+a).setStackable(true);d.type=e;d.ready=false;};for(var b in fbjs_dialog.prototype)c.prototype[b]=fbjs_dialog.prototype[b];c.DIALOG_POP=fbjs_dialog.DIALOG_POP;c.DIALOG_CONTEXTUAL=fbjs_dialog.DIALOG_CONTEXTUAL;return c;}fbjs_dialog.DIALOG_POP=1;fbjs_dialog.DIALOG_CONTEXTUAL=2;fbjs_dialog.onconfirm=function(){var a=true;if(this.onconfirm)if(this.onconfirm()===false)a=false;if(a)this.hide();return false;};fbjs_dialog.oncancel=function(){var a=true;if(this.oncancel)if(this.oncancel()===false)a=false;if(a)this.hide();return false;};fbjs_dialog.build_dialog=function(){var a=fbjs_private.get(this);if(!a.ready){a.dialog._buildDialog();a.ready=true;}};fbjs_dialog.prototype.setStyle=function(c,d){var b=fbjs_private.get(this);fbjs_dialog.build_dialog.call(this);var a=null;if(c=='width'||c=='height'){a=b.type==fbjs_dialog.DIALOG_CONTEXTUAL?b.dialog._frame:b.dialog._frame.parentNode;}else a=b.dialog._content;fbjs_dom.set_style(a,c,d);return $FBJS.ref(this);};fbjs_dialog.prototype.showMessage=function(c,b,a){this.showChoice(c,b,a,false);return $FBJS.ref(this);};fbjs_dialog.prototype.showChoice=function(h,f,a,c){var g=fbjs_private.get(this).dialog;fbjs_dialog.build_dialog.call(this);var e=[];var b=a?fbjs_fbml_string.get(a):_tx("Okay");e.push({label:b,name:'button1',handler:bind(this,fbjs_dialog.onconfirm)});if(c||c===undefined){var d=c?fbjs_fbml_string.get(c):_tx("Cancel");e.push({label:d,name:'button2',handler:bind(this,fbjs_dialog.oncancel)});}g.setTitle(fbjs_fbml_string.get(h)).setBody(fbjs_fbml_string.get(f)).setButtons(e).show();g._content.id='app_content_'+(+new Date());return $FBJS.ref(this);};fbjs_dialog.prototype.setContext=function(b){var a=fbjs_private.get(this).dialog;var c=fbjs_dom.get_obj(b);a.setContext(c);return $FBJS.ref(this);};fbjs_dialog.prototype.hide=function(){var a=fbjs_private.get(this).dialog;a.hide();return $FBJS.ref(this);};function fbjs_animation(){var b=function(c){if(this==window){return new arguments.callee(fbjs_dom.get_obj(c));}else fbjs_private.get(this).animation=new animation(c);};for(var a in fbjs_animation.prototype)b.prototype[a]=fbjs_animation.prototype[a];b.ease={begin:animation.ease.begin,end:animation.ease.end,both:animation.ease.both};return b;}fbjs_animation.prototype.stop=function(){fbjs_private.get(this).animation.stop();return this;};fbjs_animation.prototype.to=function(a,b){fbjs_private.get(this).animation.to(a,b);return this;};fbjs_animation.prototype.by=function(a,b){fbjs_private.get(this).animation.by(a,b);return this;};fbjs_animation.prototype.from=function(a,b){fbjs_private.get(this).animation.from(a,b);return this;};fbjs_animation.prototype.duration=function(a){fbjs_private.get(this).animation.duration(a);return this;};fbjs_animation.prototype.checkpoint=function(b,a){fbjs_private.get(this).animation.checkpoint(b,typeof a=='function'?bind(this,a):null);return this;};fbjs_animation.prototype.ondone=function(a){if(typeof a=='function'){fbjs_private.get(this).animation.checkpoint(bind(this,a));return this;}};fbjs_animation.prototype.blind=function(){fbjs_private.get(this).animation.blind();return this;};fbjs_animation.prototype.show=function(){fbjs_private.get(this).animation.show();return this;};fbjs_animation.prototype.hide=function(){fbjs_private.get(this).animation.hide();return this;};fbjs_animation.prototype.ease=function(a){fbjs_private.get(this).animation.ease(a);return this;};fbjs_animation.prototype.go=function(){fbjs_private.get(this).animation.go();return this;};function fbjs_livemessage(a){var c=function(e,d){if(!e)throw ('Parameter "event_name" must be non-empty.');var f=fbjs_private.get(this);f.appid=a;f.event_name=e;f.send_success_handler=null;f.send_error_handler=null;f.livemessage=new LiveMessageReceiver(e).setAppId(a).setHandler(d).register();};for(var b in fbjs_livemessage.prototype)c.prototype[b]=fbjs_livemessage.prototype[b];return c;}fbjs_livemessage.prototype.send=function(c,a){if(!c)throw ('Parameter "recipient" must be non-empty.');var b=fbjs_private.get(this);new AsyncRequest().setURI('/fbml/ajax/livemessage_send.php').setData({app_id:b.appid,recipient:c,event_name:b.event_name,message:JSON.encode(a)}).setMethod('POST').setHandler(function(e){payload=e.getPayload();if(payload.error_code){var d=b.send_error_handler;if(d)d(payload.error_code,payload.error_msg,c,a);}else{var f=b.send_success_handler;if(f)f(c,a);}}).setErrorHandler(function(e){var d=b.send_error_handler;if(d)d(e.getError(),e.getErrorSummary(),c,a);}).send();};fbjs_livemessage.prototype.setSendSuccessHandler=function(a){var b=fbjs_private.get(this);b.send_success_handler=a;return $FBJS.ref(this);};fbjs_livemessage.prototype.setSendErrorHandler=function(a){var b=fbjs_private.get(this);b.send_error_handler=a;return $FBJS.ref(this);};fbjs_livemessage.prototype.setShutdownHandler=function(a){var b=fbjs_private.get(this);b.livemessage.setShutdownHandler(a);return $FBJS.ref(this);};fbjs_livemessage.prototype.setRestartHandler=function(a){var b=fbjs_private.get(this);b.livemessage.setRestartHandler(a);return $FBJS.ref(this);};function fbjs_fbml_string(a,b){a=HTML(a);if(b)a.setAction(b);fbjs_private.get(this).htmlstring=a;}fbjs_fbml_string.get=function(a){if(a instanceof fbjs_fbml_string){return fbjs_private.get(a).htmlstring.toString();}else return htmlspecialchars(fbjs_sandbox.safe_string(a));};fbjs_private=new Object();fbjs_private.len=0;fbjs_private.get=function(a){if(typeof a!='object')return null;if(a==window)throw ('Invalid object supplied');if(a.__priv==undefined){var b={data:{},instance:a};a.__priv=fbjs_private.len;fbjs_private.len++;b.instance=a;fbjs_private[a.__priv]=b;return b.data;}else if(typeof a.__priv=='number'){var b=fbjs_private[a.__priv];if(b.instance==a){return b.data;}else throw ('Invalid object supplied to fbjs_private.get');}else throw ('Invalid object supplied to fbjs_private.get');};fbjs_private.remove=function(a){if(a.__priv!=undefined)if(fbjs_private[a.__priv].instance==a){delete fbjs_private[a.__priv];delete a.__priv;}};function fbjs_fbml_sanitize(appid){this.appid=appid;this.main=eval('a'+appid+'_document');return this;}fbjs_fbml_sanitize.prototype.parseFBML=function(c){if(window.ActiveXObject){var a=new ActiveXObject("Microsoft.XMLDOM");a.async="false";a.loadXML(c);if(a.parseError.reason){fbjs_console.error(a.parseError.reason);return null;}}else{var b=new DOMParser();var a=b.parseFromString(c,"text/xml");if(a.documentElement.nodeName=='parsererror'){fbjs_console.error(a.documentElement.textContent);return null;}}var d=a.documentElement;return this.processElement(d);};fbjs_fbml_sanitize.prototype.processElement=function(h){if(h.nodeType==3){return new fbjs_dom(document.createTextNode(h.nodeValue),this.appid);}else if(h.nodeType!=1)return null;var e=this.main.createElement(h.nodeName);if(!e)return null;for(var k=0;k<h.attributes.length;k++){var b=h.attributes[k];var a=b.nodeName;if(a=='style'){var f=b.nodeValue.split(";");for(var g=0;g<f.length;g++)if(f[g]!=''){var j=f[g].split(":");e.setStyle(j[0],j[1].replace(/^\s+|\s+$/g,''));}}else{setter=fbjs_dom.attr_setters[a];if(e[setter])e[setter](b.nodeValue);}}for(var k=0;k<h.childNodes.length;k++){var d=h.childNodes[k];var c=this.processElement(d);if(c)e.appendChild(c);}return e;};
function pages_show_block_app(b,a,d){var c=new AsyncRequest().setMethod('POST').setData({app_id:b,action:a,source:d}).setURI('/ajax/apps/block.php');new Dialog().setAsync(c).show();}
var details_shown=false;function toggle_stored_cc(a){if(a.checked==true){show('cvv2_div');hide_new_cc();}else{hide('cvv2_div');show_new_cc();}}function hide_cc_payment(){hide('card_payment');hide('cvv2_div');hide_new_cc();var a=ge('cc_id');if(a)a.checked=false;}function show_cc_payment(){show('card_payment');}function hide_new_cc(){hide('cc_input');hide('enter_new_card');}function show_new_cc(){show('cc_input');show('enter_new_card');if(details_shown)toggleStoredCreditCardDetails();}function toggleStoredCreditCardDetails(){var a=ge('toggle_stored_credit_card_details_link');if(!details_shown){show('stored_credit_card_details');a.innerHTML=_tx("hide details");details_shown=true;}else{hide('stored_credit_card_details');a.innerHTML=_tx("show details");details_shown=false;}}function show_csc_info(b){var c=_tx("A Card Security Code (CSC) is a security feature of debit and credit cards that helps fight credit card fraud.  The following graphic illustrates where to find the CSC code on your credit card.");var d='float: left;';var g='text-align: center; margin: 5px 0;';var a='';a+='<div style="'+d+'">';a+='<img src="/images/cvv2_types/amex_csc.gif" alt="" />';a+='<p style="'+g+'">'+_tx("American Express")+'</p>';a+='</div>';var f='';f+='<div style="margin-right: 8px;'+d+'">';f+='<img src="/images/cvv2_types/backofcard.gif" alt="" />';f+='<p style="'+g+'">'+_tx("Visa, Mastercard, JCB")+'</p>';f+='</div>';var e='';e+='<div class="clearfix">';e+='<p>'+c+'</p>';if(b==null){e+=f;e+=a;}else if(b==65){e+=a;}else e+=f;e+='</div>';new Dialog().setClassName('csc_type').setTitle(_tx("What's a CSC?")).setBody(e).setButtons([Dialog.OK]).show();}function show_csc_validation_info(){var a='';a+='<div class="clearfix">';a+='<div style="float: left">';a+='<p style="text-align: left; margin: 5px 0;">';a+=_tx("In order to fight credit card fraud, we have started to enforce CSC code validation in credit card payments.  For credit cards we have stored before, this means they will need to be CSC validated once for later uses.  You will not be prompted in the future once the card gets validated.");a+='</p>';a+='</div>';a+='</div>';new Dialog().setClassName('validation').setTitle(_tx("Why is CSC validation required?")).setBody(a).setButtons([Dialog.OK]).show();}function get_selected_cc_type(a,b){if(b){cc_type=get_form_select_value(get_dialog_pro_elem(a));}else cc_type=get_form_select_value(ge(a));return cc_type;}function validate_csc(a,d){if(d){var c=get_dialog_pro_elem('cc_cvv2');}else var c=ge('cc_cvv2');var b=get_selected_cc_type(a,d);if(b==65){if(c.value.length!=4){c.style.border="1px solid red;";}else c.style.border="";}else if(c.value.length!=3){c.style.border="1px solid red;";}else c.style.border="";}function get_dialog_pro_elem(c){var b=document.getElementsByName(c);var d;var e=null;for(d=0;d<b.length;d++){var a=b[d];if(DOM.contains('pop_content',a))e=a;}return e;}

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