/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 10th 2010 3:00:23 AM PST                            */
/*      Machine:  10.16.140.108                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/devsite/setup.js h:cpuwyji5                               */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/devsite/setup.js                                          */

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

function connect_setup_form_submit_basic_info(_L0){var _L1=_L0.form;CSS.addClass(ge('reg_error'),'hidden_elem');var _L2={step:_L1.step.value,app_id:_L1.app_id?_L1.app_id.value:'',website_name:_L1.website_name.value,website_url:_L1.website_url.value,i18n_custom:_L1.i18n_custom.value};connect_setup_ensure_controller();window.connect_setup_controller.sendFormPost(_L0,_L2);}function connect_setup_form_submit_upload_icons(_L0,_L1){var _L2=_L0.form;if(!_L2.agree.value||(!_L2.fileicon.value&&!_L2.filelogo.value)){CSS.removeClass(ge('reg_error'),'hidden_elem');return false;}else CSS.addClass(ge('reg_error'),'hidden_elem');connect_setup_ensure_controller();return window.connect_setup_controller.waitFormPost(_L1);}function connect_setup_test_setup(_L0,_L1,_L2){connect_setup_ensure_controller();if(!_L1){var _L3='<a target="_blank" href="http://wiki.developers.facebook.com/'+'index.php/Cross_Domain_Communication_Channel">'+_tx("here")+'</a>';var _L4={'documentation_link':_L3};var msg=HTML(_tx("Uploading this file is important for performance for those users with older browsers. For more details, you can read the wiki {documentation_link}.",_L4));var _L6=HTML(_tx("Upload xd_receiver.htm later?"));new Dialog().setTitle(_L6).setBody(msg).setModal(true).setButtons([Dialog.OK,Dialog.CANCEL]).setHandler(function(){this.hide();window.connect_setup_controller.sendSetupTest(_L0,'false',_L2);return false;}).show();}else window.connect_setup_controller.sendSetupTest(_L0,'true',_L2);}function connect_setup_ensure_controller(){if(!window.connect_setup_controller)window.connect_setup_controller=new ConnectSetupController();}function ConnectSetupController(){}ConnectSetupController._waiting_for_ajax=false;ConnectSetupController.prototype.sendFormPost=function(_L0,_L1){if(!this._waiting_for_ajax){var _L2=_L0.form;new AsyncRequest().setMethod('POST').setReadOnly(true).setURI(new URI(_L2.action)).setData(_L1).setHandler(function(_L3){var _L4=null;var _L5=_L3.getPayload();window.location=_L5.next_step_url;}.bind(this)).setErrorHandler(function(_L3){var _L4=ge('reg_error');var _L5=ge('reg_error_inner');set_inner_html(_L5,_L3.getErrorSummary());CSS.removeClass(ge('reg_error'),'hidden_elem');}.bind(this)).setTransportErrorHandler(function(_L3){CSS.removeClass(ge('reg_error'),'hidden_elem');}.bind(this)).setFinallyHandler(function(_L3){this._waiting_for_ajax=false;}.bind(this)).send();this._waiting_for_ajax=true;}};ConnectSetupController.prototype.sendSetupTest=function(_L0,_L1,_L2){if(!this._waiting_for_ajax){var _L3={step:_L0,test:_L1};if(this.app_id)_L3.app_id=this.app_id;new AsyncRequest().setMethod('POST').setReadOnly(true).setURI(new URI('/ajax/setup.php')).setData(_L3).setHandler(function(_L4){var _L5=_L4.getPayload();if(_L5&&_L5.app_id)this.app_id=_L5.app_id;if(this.app_id)_L2+='&app_id='+this.app_id;window.location=_L2;}.bind(this)).setErrorHandler(function(_L4){var _L5=_L4.getPayload();if(_L5&&_L5.app_id)this.app_id=_L5.app_id;var _L6=ge('reg_error');var _L7=ge('reg_error_inner');set_inner_html(_L7,_L4.getErrorSummary());CSS.removeClass(ge('reg_error'),'hidden_elem');}.bind(this)).setTransportErrorHandler(function(_L4){CSS.removeClass(ge('reg_error'),'hidden_elem');}.bind(this)).setFinallyHandler(function(_L4){this._waiting_for_ajax=false;}.bind(this)).send();this._waiting_for_ajax=true;}};

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