/*
HTTP Host: b.static.ak.fbcdn.net
Generated: March 21st 2010 8:13:10 AM PDT
Machine: 10.16.139.105
Locale: nu_ll
Path: js/ailxchlgkgg880ck.pkg.js
*/

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

function fbpage_set_fan_status(c,f,a,h,g,d,e){g=g?g:function(j){_fbpage_show_change_status_feedback(c,j.getPayload());};var b={fbpage_id:f,add:a,reload:h};if(e!=null)copy_properties(b,e);var i=new AsyncRequest().setURI('/ajax/pages/fan_status.php').setData(b).setHandler(g);if(d)i.setErrorHandler(d);i.send();return false;}function fbpage_set_favorite_status(d,e,a){var f=function(){_fbpage_show_change_status_feedback(d,this.getUserData());};var c={fbpage_id:e,add:a};var b=new AsyncRequest().setMethod('POST').setURI('/ajax/pages/favorite_status.php').setData(c);new Dialog().setAsync(b).setCloseHandler(f).show();return false;}function _fbpage_show_change_status_feedback(b,a){if(!a||!b)return;if(a.reload){fbpage_reload_on_fan_status_changed(a.preserve_tab);}else fbpage_redraw_on_fan_status_changed(a.feedback);}function fbpage_reload_on_fan_status_changed(a){var b=URI.getRequestURI();if(a)if(!b.getQueryData().v&&window.profile_tab_controller)b.addQueryData({v:window.profile_tab_controller.currentView});goURI(b,true);}function fbpage_redraw_on_fan_status_changed(a){if(!a)return;var c=document.createElement('span');c.innerHTML=a;CSS.setClass(c,'fan_status_inactive');elem.parentNode.replaceChild(c,elem);var b=function(){if(data.can_repeat_action)c.parentNode.replaceChild(elem,c);};animation(c).duration(3000).checkpoint().to('backgroundColor','#FFFFFF').duration(1000).ondone(b).go();}
function ConnectWidget(f,d,a){copy_properties(this,{button:$(a),profile_id:d,viewer_id:f,status:null,popup:null,busy:false,new_fan:null});this.popup_uri=new URI('/login.php');this.popup_uri.addQueryData({connect_id:this.profile_id,popup:true});this.button=$(a);this.button.listen('click',this.connectClickHandler.bind(this));this.fan_hidden=[];this.fan_shown=[];var b=DOM.scry(document,'div.connections');if(b.length>0){b=b[0];this.new_fan=DOM.find(b,'div.grid_item_plus');this.fan_shown.push(this.new_fan);this.fan_shown.push(DOM.find(b,'span.total_plus'));var e=DOM.scry(b,'span.total');var c=DOM.scry(b,'div.grid_item');if(c.length>1)this.fan_hidden.push(c[1]);this.fan_hidden.push(e[e.length-1]);}ConnectWidget.instances[a]=this;}ConnectWidget.instances={};ConnectWidget.prototype.setLoggedIn=function(a){this.viewer_id=a;return this;};ConnectWidget.prototype.connectClickHandler=function(a){a.kill();if(this.viewer_id!=0){this.connect();}else this.popUpLogin();};ConnectWidget.prototype.connect=function(){if(!this.busy){this.busy=true;fbpage_set_fan_status(this.button,this.profile_id,true,false,this.connectDoneHandler.bind(this),this.connectErrorHandler.bind(this),this.getAsyncData());}};ConnectWidget.prototype.disconnect=function(){if(!this.busy){this.busy=true;fbpage_set_fan_status(this.button,this.profile_id,false,false,this.connectUndoneHandler.bind(this),function(){},this.getAsyncData());}};ConnectWidget.prototype.getAsyncData=function(){var a={source:'connect'};if(ge('post_form_id'))a.post_form_id=$('post_form_id').value;if(ge('fb_dtsg'))a.fb_dtsg=$('fb_dtsg').value;return a;};ConnectWidget.prototype.popUpLogin=function(){window.open(this.popup_uri.toString(),'_blank','toolbar=0,status=0,width=626,height=400');};ConnectWidget.prototype.connectErrorHandler=function(b){if(b.error==kError_Async_NotLoggedIn){this.viewer_id=0;this.popUpLogin();}else if(b.error==kError_Async_PopUpCaptchaRequired){hide(this.button);var a=$N('a',{href:DOM.find(document,'div.name_block a').href,target:'_blank'},_tx("\u78ba\u8a8d\u901a\u904e\u5f8c\u624d\u80fd\u9032\u884c\u9023\u63a5\u3002"));this.status=$N('span',{className:'connect_span'},a);DOM.insertAfter(this.button,this.status);}else{hide(this.button);if(b.error==kError_ProfileConnect_AlreadyConnected){this.status=$N('span',{className:'connect_span'},_tx("\u4f60\u4e5f\u662f\u7c89\u7d72\u5718\u7684\u4e00\u54e1\u4e86\u3002"));}else this.status=$N('span',{className:'connect_span'},b.getErrorSummary()+': '+b.getErrorDescription());animation(this.status).from('opacity',0).to('opacity',1).go();DOM.insertAfter(this.button,this.status);}this.busy=false;};ConnectWidget.prototype.connectDoneHandler=function(c){var b=c.getPayload();if(!b||!b.feedback)return;this.status=$N('span',{className:'connect_span'},HTML(b.feedback));var d=$N('a',{className:'undo'},_tx("\u53d6\u6d88\u522a\u9664"));d.listen('click',function(e){e.kill();this.disconnect();}.bind(this));DOM.appendContent(this.status,d);animation(this.status).from('opacity',0).to('opacity',1).go();DOM.insertAfter(this.button,this.status);hide(this.button);if(this.new_fan!=null&&b.connect_fan_div){var a=$N('div',{},HTML(b.connect_fan_div));DOM.setContent(this.new_fan,DOM.find(a,'a'));}this.fan_shown.forEach(function(e){animation(e).from('opacity',0).to('opacity',1).go();CSS.removeClass(e,'hidden');});this.fan_hidden.forEach(function(e){CSS.addClass(e,'hidden');});this.busy=false;};ConnectWidget.prototype.connectUndoneHandler=function(b){var a=b.getPayload();DOM.remove(this.status);animation(this.button).from('opacity',0).to('opacity',1).go();show(this.button);this.fan_shown.forEach(function(c){CSS.addClass(c,'hidden');});this.fan_hidden.forEach(function(c){CSS.removeClass(c,'hidden');});this.busy=false;};ConnectWidget.loadStream=function(b,a){new AsyncRequest().setMethod('GET').setURI('/ajax/connect/connect_widget.php').setData({id:b}).setReadOnly(true).setErrorHandler(function(){}).setTransportErrorHandler(function(){}).setHandler(function(c){payload=c.getPayload();DOM.setContent($(a),HTML(payload.stream_markup));}.bind(this)).send();};ConnectWidget.loggedIn=function(c,a){if(ge('post_form_id')){DOM.replace($('post_form_id'),HTML(a));}else DOM.appendContent(DOM.find(document,'body'),HTML(a));for(var b in ConnectWidget.instances){ConnectWidget.instances[b].setLoggedIn(c);ConnectWidget.instances[b].connect();}};
function invitetool_dialog_helper(k,l,a,j,m,i,f,g,b,d){var h='';var c=d[a];switch(a){case 'make_admin':dialog_info=invitetool_make_admin_msg(m,j,i,g);break;case 'remove_admin':dialog_info=invitetool_remove_admin_msg(m,j,i,g);break;case 'remove_member':dialog_info=invitetool_remove_msg(m,j,i,f,g);if(b&&!i)h='<input type="checkbox" id="ban_user" name="ban_user" value="1" />'+_tx("\u6c38\u4e45\u5c01\u9396");break;case 'unban_member':dialog_info=invitetool_unban_msg(m,j);break;case 'remove_fbpage_admin':dialog_info=invitetool_fbpage_admin_msg(m,j,i);break;default:return false;}var e=new Dialog().setTitle(dialog_info.label).setBody(dialog_info.msg).setButtons([Dialog.newButton('invitetool_dialog',dialog_info.label,'',function(){c();e.hide();}),Dialog.CANCEL]).setButtonsMessage(h).show();return false;}function invitetool_unban_msg(a,b){text=' '+_tx("\u4f60\u78ba\u5b9a\u8981\u89e3\u9664{user-name}\u7684\u5c01\u9396\uff1f",{'user-name':a});return {msg:text,label:_tx("\u89e3\u9664\u5c01\u9396")};}function invitetool_remove_msg(d,e,c,a,b){var f='';if(c){if(a)if(b)switch(e){case 'Group':f+=' '+_tx("\u4f60\u6b63\u5617\u8a66\u5c07\u4f60\u81ea\u5df1\u5f9e\u9019\u500b\u793e\u5718\u4e2d\u79fb\u9664\uff0c\u7136\u800c\u4f60\u662f\u552f\u4e00\u7684\u7ba1\u7406\u8005\u3002");f+=' '+_tx("Since you are the last administrator, the administrator position will be offered to other people in this Group.");break;case 'Event':f+=' '+_tx("\u4f60\u662f\u4f60\u6b63\u60f3\u8981\u9000\u51fa\u7684\u6d3b\u52d5\u88e1\u552f\u4e00\u50c5\u5269\u7684\u7ba1\u7406\u54e1\u3002");f+=' '+_tx("Since you are the last administrator, removing yourself will cause this Event to be deleted.");break;case 'Page':f+=' '+_tx("\u60a8\u6b63\u5c07\u81ea\u5df1\u5f9e\u53ea\u6709\u60a8\u70ba\u7ba1\u7406\u8005\u7684\u7c89\u7d72\u5c08\u9801\u4e2d\u79fb\u9664\u3002");f+=' '+_tx("Since you are the last administrator, removing yourself will cause this Page to be deleted.");break;}switch(e){case 'Group':f+=' '+_tx("\u4f60\u78ba\u5b9a\u8981\u96e2\u958b\u6b64\u793e\u5718\uff1f");break;case 'Event':f+=' '+_tx("\u4f60\u78ba\u5b9a\u8981\u628a\u81ea\u5df1\u5f9e\u9019\u500b\u6d3b\u52d5\u88e1\u522a\u9664");break;case 'Page':f+=' '+_tx("\u4f60\u78ba\u5b9a\u8981\u628a\u4f60\u81ea\u5df1\u5f9e\u9019\u500b\u7c89\u7d72\u5c08\u9801\u79fb\u9664\u55ce\uff1f");break;}}else{switch(e){case 'Group':f+=' '+_tx("You are attempting to remove {user-name} from this Group.",{'user-name':d});break;case 'Event':f+=' '+_tx("You are attempting to remove {user-name} from this Event.",{'user-name':d});break;case 'Page':f+=' '+_tx("\u4f60\u6b63\u5c07{user-name}\u5f9e\u672c\u9801\u79fb\u9664\u3002",{'user-name':d});break;}f+=' '+_tx("\u60a8\u78ba\u5b9a\u8981\u522a\u9664 {user-name} \u55ce\uff1f",{'user-name':d});}return {msg:f,label:_tx("\u79fb\u9664")};}function invitetool_remove_admin_msg(c,d,b,a){var e='';if(b){e+=' '+_tx("You are attempting to remove yourself as an administrator.");if(a)switch(d){case 'Group':e+=' '+_tx("Since you are the last administrator, the administrator position will be offered to other people in this Group.");break;case 'Event':e+=' '+_tx("Since you are the last administrator, removing yourself will cause this Event to be deleted.");break;case 'Page':e+=' '+_tx("Since you are the last administrator, removing yourself will cause this Page to be deleted.");break;}e+=' '+_tx("\u60a8\u78ba\u5b9a\u8981\u5c07\u81ea\u5df1\u5f9e\u7ba1\u7406\u54e1\u540d\u55ae\u4e2d\u79fb\u9664\uff1f");}else{e+=' '+_tx("\u4f60\u6b63\u8a66\u5716\u4ee5\u7ba1\u7406\u54e1\u8eab\u4efd\u79fb\u9664{user-name}\u3002",{'user-name':c});e+=' '+_tx("\u4f60\u78ba\u5b9a\u8981\u79fb\u9664 {user-name} \u7684\u7ba1\u7406\u54e1\u8cc7\u683c\uff1f",{'user-name':c});}return {msg:e,label:_tx("\u79fb\u9664\u7ba1\u7406\u54e1")};}function invitetool_fbpage_admin_msg(b,c,a){var d='';if(a){d+=' '+_tx("You are attempting to remove yourself as an administrator.")+' '+_tx("\u5728\u672a\u88ab\u9080\u8acb\u4e0b\uff0c\u60a8\u5c07\u7121\u6cd5\u53d6\u56de\u9019\u4e9b\u7279\u6b8a\u6b0a\u9650\u3002");}else d+=' '+_tx("\u4f60\u6b63\u8a66\u5716\u4ee5\u7ba1\u7406\u54e1\u8eab\u4efd\u79fb\u9664{user-name}\u3002",{'user-name':b});return {msg:d,label:_tx("\u79fb\u9664\u7ba1\u7406\u54e1")};}function invitetool_make_admin_msg(b,c){var a;switch(c){case 'Group':a=_tx("\u4f60\u78ba\u5b9a\u8981\u5c07{user-name}\u8a2d\u6b0a\u7576\u7ba1\u7406\u54e1\uff1f\u9019\u884c\u52d5\u5c07\u6703\u8b93{user-name}\u5728\u4f60\u7684\u793e\u5718\u88e1\u64c1\u6709\u8207\u4f60\u76f8\u540c\u7684\u6b0a\u8cac\u3002",{'user-name':b});break;case 'Event':a=_tx("\u4f60\u78ba\u5b9a\u8981\u8b93 {user-name} \u6709\u7ba1\u7406\u6b0a\u9650\uff1f\u9019\u6a23\u6703\u8b93 {user-name} \u4e5f\u80fd\u7ba1\u7406\u4f60\u7684\u6d3b\u52d5\u3002",{'user-name':b});break;case 'Page':a=_tx("Are you sure you want to make {user-name} an admin? This will let {user-name} have the same control that you do over your Page.",{'user-name':b});break;}return {msg:a,label:_tx("\u6210\u70ba\u7ba1\u7406\u54e1")};}

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