/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 10th 2010 4:46:28 AM PST                            */
/*      Machine:  10.16.140.109                                                */
/*       Source:  Global Cache                                                 */
/*     Location:  js/lib/ui/typeaheadpro/sources/friend_and_email_source.js h:atmbl3c6 */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/lib/ui/typeaheadpro/sources/friend_and_email_source.js    */

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/lib\/ui\/typeaheadpro\/sources\/friend_and_email_source.js"]); }

function friend_and_email_source(_L0){_L0=_L0?_L0+'&include_emails=1':'';this.parent.construct(this,_L0);}friend_and_email_source.extend('friend_source');friend_and_email_source.prototype.text_noinput=friend_and_email_source.prototype.text_placeholder=_tx("Gib eine E-Mail-Adresse oder den Namen eines Freundes bzw. einer Liste ein");friend_and_email_source.prototype.text_nomatch=_tx("Gib eine E-Mail-Adresse ein...");friend_and_email_source.prototype.onselect_not_found=function(){emails=this.results_text.split(/[,; ]/);for(var i=0;i<emails.length;i++){var _L1=emails[i].replace(/^\s+|\s+$/g,'');var _L2=/.*\@.*\.[a-z]+$/;if(!_L2.test(_L1))continue;var _L3={t:_L1,e:_L1};var _L4=new token(_L3,this.tokenizer,this.element);var _L5={email:_L1,pluses:false};new AsyncRequest().setMethod('GET').setReadOnly(true).setURI('/ajax/typeahead_email.php').setData(_L5).setHandler(function(_L6){if(_L6.getPayload()){var obj=_L6.getPayload().token;this.render_obj(obj);this.tokenizer._ontokenadded(obj);}else this.tokenizer._ontokennotfound(_L1);}.bind(_L4)).setErrorHandler(function(_L6){ErrorDialog.showAsyncError(_L6);this.remove(false);}.bind(_L4)).send();}this.clear();};

if (window.Bootloader) { Bootloader.done(["js\/lib\/ui\/typeaheadpro\/sources\/friend_and_email_source.js"]); }