/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 9th 2010 9:10:50 PM PST                             */
/*      Machine:  10.16.140.106                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/dr9iqdidknc408c4.pkg.js h:6dckgg9a                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/dr9iqdidknc408c4.pkg.js                                   */

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

function CIFileUploadInputController(_L0,_L1,_L2,_L3){this.parent.construct(this,_L0,_L1,_L2,_L3);CIFileUploadInputController.instance=this;return this;}CIFileUploadInputController.extend('CIInputController');copy_properties(CIFileUploadInputController.prototype,{onUploadComplete:function(_L0){if(_L0.error){this.parent.handleLoginSubmit(_L0);return;}hide(this.getId('iframe'));this._submitLoginForm({memcache_key:_L0.memcache_key});}});
function CIOutlookDesktopController(_L0){copy_properties(this,{args:_L0,DOWNLOAD_TIMEOUT:60*3*1000,IMPORT_TIMEOUT:60*1*1000,DETECT_SERVER_INTERVAL:500,LOCAL_SERVER_PORT:19514,imageLoaded:false,detectorImage:null,imageTimeout:null});return this;}copy_properties(CIOutlookDesktopController.prototype,{detectImportServer:function(){if(this.imageLoaded)return;if(!this.detectorImage){this.imageTimeout=setTimeout(bind(this,'failDetection'),this.DOWNLOAD_TIMEOUT);show('importProgress-download');this.detectorImage=new Image();this.detectorImage.onload=bind(this,function(){clearTimeout(this.imageTimeout);this.imageLoaded=true;this.startImportRequest();});}this.detectorImage.src=null;this.detectorImage.src=sprintf("http://127.0.0.1:%d/loaded",this.LOCAL_SERVER_PORT);setTimeout(bind(this,'detectImportServer'),this.DETECT_SERVER_INTERVAL);},failDetection:function(){this.showImportError_download();},startImportRequest:function(){setTimeout(this.showImportError_import,this.IMPORT_TIMEOUT);hide('importProgress-download');show('importProgress-import');copy_properties(this.args,{post_form_id:$("post_form_id").getAttribute("value")});var _L0="";for(name in this.args)_L0+=sprintf("%h=%h&",name,encodeURIComponent(this.args[name]));$('frameImportContacts').src=sprintf("http://127.0.0.1:%d/importContacts?%h",this.LOCAL_SERVER_PORT,_L0);},showImportError_download:function(){hide('importProgress-download');show('importProgress-failure-download');},showImportError_import:function(){hide('importProgress-import');show('importProgress-failure-import');}});
function CIOutlookVertigoController(_L0,_L1){this.parent.construct(this,_L0,_L1,true,true);CIOutlookVertigoController.instance=this;return this;}CIOutlookVertigoController.extend('CIInputController');copy_properties(CIOutlookVertigoController.prototype,{startExtraction:function(){hide('outlook_loading');if(this.controlIsInstalled()){this.logUpdate('install_success');this.exec();}else{this.logUpdate('install_pending');hide('outlook_loading');show('install_prompt');show('back_link');}},controlIsInstalled:function(){try{$('extractor').IsInstalled();return true;}catch(exc){return false;}},exec:function(){this.showProcessing();$('extractor').attachEvent('Processing',bind(this,this.extractorHandleProcessing));$('extractor').attachEvent('Completed',bind(this,this.extractorHandleComplete));if(!$('extractor').BeginUpload()){this.logUpdate('failed_upload');Util.error('Importer Failed. Could not upload contact file.');}},cancelExtraction:function(_L0){$('extractor').detachEvent('Processing',bind(this,this.extractorHandleProcessing));$('extractor').detachEvent('Completed',bind(this,this.extractorHandleComplete));DOM.remove($('extractor'));},finishExtraction:function(){this.cancelExtraction();var w=window.opener;if(w){var _L1=w.CIOutlookVertigoController.instance;_L1.submitForm();}window.close();},submitForm:function(){this._submitLoginForm({});},extractorHandleProcessing:function(_L0,_L1){var _L2=Math.round((_L1/32768)*100);this.refreshStatus(_L0);this.refreshProgressBar(_L2);},logUpdate:function(msg){var _L1=this.getConfigData();_L1['outlook_msg']=msg;new AsyncRequest().setURI(this.ci_config.log_endpoint).setData(_L1).send();},extractorHandleComplete:function(_L0){if(_L0==0){this.logUpdate('finished_upload');this.finishExtraction();}else{this.logUpdate('error_'+_L0);var _L1='<p class="outlook_error">'+this.showErrorCode(_L0)+'</p>';DOM.setContent($('extract_error'),HTML(_L1));hide('extractor_progress');show('back_link');}},showProcessing:function(){hide('install_prompt');show('extractor_progress');},refreshProgressBar:function(_L0){if(ge('extractor_progress_outer')){var _L1=$('extractor_progress_outer');var _L2=$('extractor_progress_inner');var _L3=$('extractor_progress_outer').clientWidth-6;var _L4=0;if(_L0>0){if(_L0>100)_L0=100;_L4=(_L3*_L0)/100;}_L2.style.width=_L4+'px';}return;},refreshStatus:function(_L0){var _L1=[_tx("Procesando tus contactos"),_tx("Procesando tus contactos"),_tx("Subiendo tus contactos de modo seguro.")+'<br />'+'<span class="subcaption">'+_tx("No salgas de esta p\u00e1gina o cierres esta ventana.")+'</span>',_tx("Contactos a\u00f1adidos con \u00e9xito.")];if(_L1[_L0]&&ge('extractor_progress_text'))if(typeof(animation)=='function'){animation($('extractor_progress_text')).from('opacity',1).to('opacity',0).duration(100).go();DOM.setContent($('extractor_progress_text'),HTML(_L1[_L0]));animation($('extractor_progress_text')).from('opacity',0).to('opacity',1).duration(100).go();}else DOM.setContent($('extractor_progress_text'),HTML(_L1[_L0]));return;},showErrorCode:function(_L0){if(!this.error_codes)this._constructErrorCodes();if(this.error_codes[_L0]){return this.error_codes[_L0];}else return _tx("Se ha producido un error. Por favor, prueba repetir este proceso un poco m\u00e1s tarde. Si te pones en contacto con el equipo de apoyo de Facebook, refi\u00e9reles el n\u00famero de error {error-number}.",{'error-number':_L0});},_constructErrorCodes:function(){this.error_codes=new Array();this.error_codes[2147500037]=_tx("Outlook no est\u00e1 instalado en tu ordenador o los datos est\u00e1n corrompidos. Por favor comprueba que Outlook est\u00e1 instalado e int\u00e9ntalo de nuevo m\u00e1s tarde.");this.error_codes[2147746069]=_tx("Se ha producido un error al acceder a tu cuenta de Outlook. Por favor, comprueba la configuraci\u00f3n de Outlook e int\u00e9ntalo de nuevo.");this.error_codes[2149122452]=_tx("Se ha producido un error. Por favor, prueba repetir este proceso un poco m\u00e1s tarde. Si te pones en contacto con el equipo de apoyo de Facebook, refi\u00e9reles el n\u00famero de error {error-number}.",{'error-number':'2149122452'});this.error_codes[2147942405]=_tx("Se ha producido un error con tus autorizaciones. Por favor, comprueba la configuraci\u00f3n de seguridad y el acceso administrativo e int\u00e9ntalo de nuevo.");this.error_codes[2147746062]=_tx("Se ha producido un error con tus autorizaciones. Aseg\u00farate de que no est\u00e1s en modo protegido e int\u00e9ntalo de nuevo.");}});
function CIWlmInputController(_L0,_L1,_L2,_L3,_L4){this.parent.construct(this,_L0,_L1,_L2,_L3);copy_properties(this,{api_instance:_L4});return this;}CIWlmInputController.extend('CIInputController');copy_properties(CIWlmInputController.prototype,{onSubmit:function(){var _L0=this.getLoginString();this.openAPIPopup(this.api_instance,_L0);return false;}});
function checkVals(){var _L0=ge('hs_year');var _L1=ge('school');$('hs').value=_L1.value;$('hr').value=_L0.value;}function genYearList(_L0,_L1,_L2){var ctl=ge(_L0);ctl.options.length=0;var j=1;ctl.options[0]=new Option(_tx("A\u00f1o de promoci\u00f3n:"),'');for(var i=_L2;i>=_L1;i--){ctl.options[j]=new Option(i,i);j++;}}function showYearSelector(){var _L0=ge('yr');_L0.disabled=false;}function showYearSelectorHS(){var _L0=ge('hs_year');_L0.disabled=false;}function query_hs_onselect(_L0){$('hs_year').disabled=false;if(_L0.i)$('hs').value=_L0.i;}function query_cm_onselect(_L0){if(_L0.i)$('n').value=_L0.i;}function query_college_onselect(_L0){$('yr').disabled=false;if(_L0.i)$('n').value=_L0.i;}function query_coworker_onselect(_L0){if(_L0.i)document.forms["coworker_form"].elements.n.value=_L0.i;}var hiddenId='hs';
function findfriends_open_panel(_L0,_L1){CSS.addClass(_L0,'opened');CSS.removeClass(_L0,'closed');if(_L1){var _L2=_L0.parentNode.childNodes;for(var ii=_L2.length-1;ii>=0;ii--)if(_L2[ii]!=_L0)findfriends_close_panel(_L2[ii]);hide('error');if(Vector2.getElementPosition(_L0,'viewport').y<0)DOMScroll.scrollTo(new Vector2(0,0,'document'));}}function findfriends_close_panel(_L0){CSS.addClass(_L0,'closed');CSS.removeClass(_L0,'opened');}function ff_toggle_webmail(){toggle('address_book_login_widget');toggle('upload_contact_link');toggle('webmail_contact_link');toggle('address_book_upload');}

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