/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  November 7th 2008 9:19:28 AM PST                             */
/*      Machine:  10.16.139.105                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/recaptcha.js.pkg.php r122901                              */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/recaptcha.js.pkg.php                                      */


function create_captcha() {var options={};if(Recaptcha.focus_on_load){ _proxy_jslib_assign('', options, ('callback'), '=', (Recaptcha.focus_response_field));}
 _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)(function() {Recaptcha.create("6LezHAAAAAAAADqVjseQ3ctG3ocfQs2Elo1FTa_a","recaptchadiv_view",options)},0);}
function log_captcha_timeout() {new (AsyncRequest)().setURI('/captcha_timeout.php').setData({ua:navigator.userAgent,location: _proxy_jslib_handle( _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '', 0, 0)}).setReadOnly(true).send();}
var RecaptchaOptions;var RecaptchaDefaultOptions={tabindex:0,callback:null,lang:'en'};var Recaptcha={widget:null,timer_id:-1,fail_timer_id:-1,type:'image',ajax_verify_cb:null,focus_on_load:true,$:function(id) {if(typeof(id)=="string"){return  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(id);}
else{return id;}},create:function(public_key,element,options) {Recaptcha.destroy();if(element){Recaptcha.widget=Recaptcha.$(element);}
Recaptcha._init_options(options);Recaptcha._call_challenge(public_key);},destroy:function() {var challengefield=Recaptcha.$('recaptcha_challenge_field');if(challengefield){challengefield.parentNode.removeChild(challengefield);}
if(Recaptcha.timer_id!=-1){clearInterval(Recaptcha.timer_id);}
Recaptcha.timer_id=-1;var imagearea=Recaptcha.$('recaptcha_image');if(imagearea){ _proxy_jslib_assign('', imagearea, 'innerHTML', '=', (""));}
if(Recaptcha.widget){Recaptcha.widget.style.display="none";Recaptcha.widget=null;}},focus_response_field:function() {var $=Recaptcha.$;var field=$('captcha_response');try{field.focus();}catch(ignored){}},get_challenge:function() {if(typeof(RecaptchaState)=="undefined"){return null;}
return RecaptchaState.challenge;},get_response:function() {var $=Recaptcha.$;var field=$('captcha_response');if(!field){return null;}
return  _proxy_jslib_handle(field, 'value', '', 0, 0);},ajax_verify:function(callback) {Recaptcha.ajax_verify_cb=callback;var scriptURL=Recaptcha._get_api_server()+"/ajaxverify"+"?c="+encodeURIComponent(Recaptcha.get_challenge())+"&response="+encodeURIComponent(Recaptcha.get_response());Recaptcha._add_script(scriptURL);},_ajax_verify_callback:function(data) {Recaptcha.ajax_verify_cb(data);},_get_api_server:function() {var protocol= _proxy_jslib_handle( _proxy_jslib_handle(window, 'location', '', 0, 0), 'protocol', '', 0, 0);var server;if(typeof(_RecaptchaOverrideApiServer)!="undefined"){server=_RecaptchaOverrideApiServer;}else if( _proxy_jslib_handle(null, 'protocol', protocol, 0, 0)=='https:'){server="api-secure.recaptcha.net";}else{server="api.recaptcha.net";}
return  _proxy_jslib_handle(null, 'protocol', protocol, 0, 0)+"//"+server;},_call_challenge:function(public_key) {Recaptcha.fail_timer_id= _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)(Recaptcha.fail_timer_id==-1?"log_captcha_timeout(); create_captcha();":"create_captcha();",15000);var scriptURL=Recaptcha._get_api_server()+"/challenge?k="+public_key+"&ajax=1&xcachestop="+Math.random();Recaptcha._add_script(scriptURL);},_add_script:function(scriptURL) {Bootloader.requestResource('js',scriptURL);},_init_options:function(opts) {var comb_opt=RecaptchaDefaultOptions;var user_opts=opts||{};for(var p in user_opts){ _proxy_jslib_assign('', comb_opt, (p), '=', ( _proxy_jslib_handle(user_opts, (p), 0, 0)));}
RecaptchaOptions=comb_opt;},challenge_callback:function() {clearTimeout(Recaptcha.fail_timer_id);var element=Recaptcha.widget;Recaptcha._reset_timer();if(window.addEventListener){window.addEventListener('unload',function(e) {Recaptcha.destroy();},false);}
if(Recaptcha._is_ie()&&window.attachEvent){window.attachEvent('onbeforeunload',function() {});}
if(navigator.userAgent.indexOf("KHTML")>0){var iframe=document.createElement('iframe'); _proxy_jslib_assign('', iframe, 'src', '=', ("about:blank"));iframe.style.height="0px";iframe.style.width="0px";iframe.style.visibility="hidden";iframe.style.border="none";var textNode=document.createTextNode("This frame prevents back/forward cache problems in Safari.");iframe.appendChild(textNode);DOMScroll.getScrollRoot().appendChild(iframe);}
Recaptcha._finish_widget();},_finish_widget:function() {var $=Recaptcha.$;var $ST=RecaptchaState;var $OPT=RecaptchaOptions;var challengeField=document.createElement("input");challengeField.type="password"; _proxy_jslib_handle(challengeField, 'setAttribute', '', 1, 0)("autocomplete","off");challengeField.style.display="none";challengeField.name="recaptcha_challenge_field";challengeField.id="recaptcha_challenge_field";$('captcha_response').parentNode.insertBefore(challengeField,$('captcha_response')); _proxy_jslib_handle($('captcha_response'), 'setAttribute', '', 1, 0)("autocomplete","off");$('recaptcha_image').style.width='300px';$('recaptcha_image').style.height='57px';Recaptcha.should_focus=false;Recaptcha._set_challenge($ST.challenge,'image');if($OPT.tabindex){$('captcha_response').tabIndex=$OPT.tabindex;}
if(Recaptcha.widget){Recaptcha.widget.style.display='';}
if($OPT.callback){$OPT.callback();}},switch_type:function(new_type) {var $C=Recaptcha;$C.type=new_type;$C.reload($C.type=='audio'?'a':'v');},reload:function(reason) {var $C=Recaptcha;var $=$C.$;var $ST=RecaptchaState;if(typeof(reason)=="undefined")
reason='r';var scriptURL=$ST.server+"reload?c="+$ST.challenge+"&k="+$ST.site+"&reason="+reason+"&type="+$C.type;$C.should_focus=reason!='t';$C._add_script(scriptURL);},finish_reload:function(new_challenge,type) {RecaptchaState.is_incorrect=false;Recaptcha._set_challenge(new_challenge,type);},_set_challenge:function(new_challenge,type) {var $C=Recaptcha;var $ST=RecaptchaState;var $=$C.$;$ST.challenge=new_challenge;$C.type=type; _proxy_jslib_assign('', $('recaptcha_challenge_field'), 'value', '=', ($ST.challenge));$('recaptcha_challenge_field').defaultValue=$ST.challenge;$('recaptcha_image').innerHtml="";if(type=='audio'){var wavurl=$ST.server+"image?c="+$ST.challenge;var httpwavurl=wavurl;if(httpwavurl.indexOf("https://")==0){httpwavurl="http://"+httpwavurl.substring(8);}
var embedCode;if($C._is_ie()){embedCode='<object height="40" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" src="'+httpwavurl+'" ><param name="URL" value="'+httpwavurl+'"><param name="autoStart" value="true"><param name="uimode" value="mini"></object>';}else{embedCode='<EMBED SRC="'+wavurl+'" height="40" bgcolor="white" AUTOSTART="true"/>';}
var cantHearCode='<br/><a class="recaptcha_audio_cant_hear_link" target="_blank" href="'+httpwavurl+'">'+tx('rec13')+'</a>'; _proxy_jslib_assign('', $("recaptcha_image"), 'innerHTML', '=', (embedCode+cantHearCode));}else if(type=='image'){var imageurl=$ST.server+'image?c='+$ST.challenge; _proxy_jslib_assign('', $('recaptcha_image'), 'innerHTML', '=', ("<img style='display:block;' height='57' width='300' src='"+imageurl+"'/>"));}
Recaptcha._css_toggle("recaptcha_had_incorrect_sol","recaptcha_nothad_incorrect_sol",$ST.is_incorrect);Recaptcha._css_toggle("recaptcha_is_showing_audio","recaptcha_isnot_showing_audio",type=='audio');$C._clear_input();if($C.should_focus){$C.focus_response_field();}
$C._reset_timer();},_reset_timer:function() {var $ST=RecaptchaState;clearInterval(Recaptcha.timer_id);Recaptcha.timer_id= _proxy_jslib_handle(null, 'setInterval', setInterval, 1, 0)("Recaptcha.reload('t');",($ST.timeout-60*5)*1000);},_clear_input:function() {var resp=Recaptcha.$('captcha_response'); _proxy_jslib_assign('', resp, 'value', '=', (""));},_displayerror:function(msg) {var $=Recaptcha.$; _proxy_jslib_assign('', $('recaptcha_image'), 'innerHTML', '=', (''));$('recaptcha_image').appendChild(document.createTextNode(msg));},reloaderror:function(msg) {Recaptcha._displayerror(msg);},_is_ie:function() {return(navigator.userAgent.indexOf("MSIE")>0)&&!window.opera;},_css_toggle:function(classT,classF,isset) {var element=Recaptcha.widget;if(!element)
element= _proxy_jslib_handle(document, 'body', '', 0, 0);var classname=element.className;classname= _proxy_jslib_handle(classname, 'replace', '', 1, 0)(new (RegExp)("(^|\\s+)"+classT+"(\\s+|$)"),' ');classname= _proxy_jslib_handle(classname, 'replace', '', 1, 0)(new (RegExp)("(^|\\s+)"+classF+"(\\s+|$)"),' ');classname+=" "+(isset?classT:classF);element.className=classname;}};function captcha_whatsthis(obj) {var dialog=new (contextual_dialog)();dialog.set_context(obj);var provider_link='<a onclick="window.open(\'http://recaptcha.net/popuphelp/\',\'recaptcha_popup\',\'width=460,height=570,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes\')">'+'ReCaptcha</a>';var content='<div class="captcha_popup" style="padding: 5px;">'+
tx('rec16')+'<br/><br/>'+
tx('rec17',{'provider_link':provider_link})+'</div>';dialog.show_message(tx('rec18'), _proxy_jslib_handle(null, 'content', content, 0, 0));dialog.reset_iframe();}

function Megaboxx() {this._endpoint='/ajax/inbox/ajax.php';}
copy_properties(Megaboxx,{_instance:null,getInstance:function() {if(!Megaboxx._instance){Megaboxx._instance=new (Megaboxx)();}
return Megaboxx._instance;},needsInterstitialCheck:false});Megaboxx.prototype.select_dropdown_onchange=function(obj) {if( _proxy_jslib_handle(obj, 'value', '', 0, 0)=='^_^'){return false;}
var status= _proxy_jslib_handle(obj, 'value', '', 0, 0)? _proxy_jslib_handle(this, ('STATUS_'+ _proxy_jslib_handle(obj, 'value', '', 0, 0).toUpperCase()), 0, 0):this.STATUS_NONE;this.set_selection(status);}
Megaboxx.prototype.status_menu_onclick=function(obj,action,threads) {threads=threads?threads:this.get_selected_threads();if(!threads.length||(typeof obj=='object'&&obj.parentNode.className.indexOf('disabled')!=-1)){this.update_status_buttons();return false;}
this.reload_needed=false;var post={action: _proxy_jslib_handle(null, 'action', action, 0, 0),ids:threads,folder:megaboxx_data.folder,time:megaboxx_data.time};if( _proxy_jslib_handle(null, 'action', action, 0, 0)=='delete'){if(typeof obj=='boolean'&&obj){var boxx=ge('megaboxx');for(var i=0;i<threads.length;i++){var row= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('thread_'+ _proxy_jslib_handle(threads, (i), 0, 0));row.parentNode.removeChild(row);}
post.page=megaboxx_data.page;post.nav_base=megaboxx_data.nav_base;post.slice= _proxy_jslib_handle(boxx, 'getElementsByTagName', '', 1, 0)('tr').length;var loading=ge('loading_boxx');if(! _proxy_jslib_handle(boxx, 'getElementsByTagName', '', 1, 0)('tr').length){this.reload_needed=true;}
if(!loading){var loading=document.createElement('div'); _proxy_jslib_assign('', loading, 'innerHTML', '=', (['<table id="loading_boxx" class="',boxx.className,'"><tr><td></td></tr></table>'].join('')));loading= _proxy_jslib_handle(loading, 'getElementsByTagName', '', 1, 0)('table')[0];boxx.parentNode.insertBefore(loading,boxx.nextSibling);}else{loading.style.display='';}}else{var dialog=new (contextual_dialog)();dialog.set_context(obj);dialog.show_choice(((threads.length==1)?tx('inbox:are-you-sure-delete-single'):tx('inbox:are-you-sure-delete-plural')),tx('inbox:this-will-remove-messages'),tx('inbox:delete-button'),function() {this[0].status_menu_onclick(true, _proxy_jslib_handle(null, 'action', action, 0, 0),threads);this[1].hide()}.bind([this,dialog]),tx('sh:cancel-button'),function() {generic_dialog.get_dialog(this).hide()});return false;}}else{for(var i=0;i<threads.length;i++){var row= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('thread_'+ _proxy_jslib_handle(threads, (i), 0, 0));var status=this.get_status(row);if( _proxy_jslib_handle(null, 'action', action, 0, 0)=='toggle_read'){if(status==this.STATUS_UNREAD){ action= _proxy_jslib_assign_rval('', 'action', '=', ('mark_read'), action);}else{ action= _proxy_jslib_assign_rval('', 'action', '=', ('mark_unread'), action);}
 _proxy_jslib_assign('', post, 'action', '=', ( _proxy_jslib_handle(null, 'action', action, 0, 0)));}
if( _proxy_jslib_handle(null, 'action', action, 0, 0)=='mark_read'){row.className=trim( _proxy_jslib_handle(row.className, 'replace', '', 1, 0)('new_message',''));}else{row.className=trim( _proxy_jslib_handle(row.className, 'replace', '', 1, 0)(/ ?new_message ?|$/,' new_message '));}}}
new (AsyncRequest)().setHandler(this.ajax_callback.bind(this)).setData(post).setURI(this._endpoint).send();this.update_status_buttons();var message_selector=ge('message_selector');message_selector?message_selector.selectedIndex=0:false;return false;}
Megaboxx.prototype.ajax_callback=function(response) {var result=response.getPayload();if(typeof result=='undefined'){return;}
if(result=='refresh'||this.reload_needed){ _proxy_jslib_handle(document, 'location', '', 0, 0).reload();return;}
if(typeof(result.nav)!='undefined'&&(megabox_pager=ge('megabox_pager'))){ _proxy_jslib_assign('', $('megaboxx_pager'), 'innerHTML', '=', (result.nav));}
if(typeof(result.rows)!='undefined'){if(result.rows){var tbody=document.createElement('tbody');var boxx=ge('megaboxx');boxx.appendChild(tbody); _proxy_jslib_assign('', tbody, 'innerHTML', '=', (result.rows));var rows= _proxy_jslib_handle(tbody, 'getElementsByTagName', '', 1, 0)('tr');var first_tbody= _proxy_jslib_handle($('megaboxx'), 'getElementsByTagName', '', 1, 0)('tbody')[0];while(rows.length){first_tbody.appendChild(rows[0]);}
tbody.parentNode.removeChild(tbody);}
$('loading_boxx').style.display='none';}
if(typeof(result.top_nav)!='undefined'){ _proxy_jslib_assign('', $('nav_inbox'), 'innerHTML', '=', (result.top_nav));}}
Megaboxx.prototype.selection_onchange=function(obj) {this.update_status_buttons();}
Megaboxx.prototype.get_status=function(row) {if(row.className.indexOf('new_message')!=-1){return this.STATUS_UNREAD;}else{return this.STATUS_READ;}}
Megaboxx.prototype.get_thread_id=function(row) {return/thread_(\d+)/.exec(row.id)[1];}
Megaboxx.prototype.is_selected=function(row) {var inputs= _proxy_jslib_handle(row, 'getElementsByTagName', '', 1, 0)('input');return inputs.length&&inputs[0].checked;}
Megaboxx.prototype.get_selected_threads=function() {var rows= _proxy_jslib_handle($('megaboxx'), 'getElementsByTagName', '', 1, 0)('tr');var threads=[];for(var i=0;i<rows.length;i++){if(this.is_selected( _proxy_jslib_handle(rows, (i), 0, 0))){threads.push(this.get_thread_id( _proxy_jslib_handle(rows, (i), 0, 0)));}}
return threads;}
Megaboxx.prototype.set_selection=function(status) {var rows= _proxy_jslib_handle($('megaboxx'), 'getElementsByTagName', '', 1, 0)('tr');var threads=[];for(var i=0;i<rows.length;i++){if(!status||this.get_status( _proxy_jslib_handle(rows, (i), 0, 0))==status){threads.push(this.get_thread_id( _proxy_jslib_handle(rows, (i), 0, 0)));}}
this.select_threads(threads,true);}
Megaboxx.prototype.select_threads=function(threads,set) {var rows= _proxy_jslib_handle($('megaboxx'), 'getElementsByTagName', '', 1, 0)('tr');for(var i=0;i<rows.length;i++){if(threads.indexOf(this.get_thread_id( _proxy_jslib_handle(rows, (i), 0, 0)))!=-1){ _proxy_jslib_handle( _proxy_jslib_handle(rows, (i), 0, 0), 'getElementsByTagName', '', 1, 0)('input')[0].checked=true;}else if(set){ _proxy_jslib_handle( _proxy_jslib_handle(rows, (i), 0, 0), 'getElementsByTagName', '', 1, 0)('input')[0].checked=false;}}
this.update_status_buttons();}
Megaboxx.prototype.update_status_buttons=function() {var buttons=ge('inbox_status_buttons');if(!buttons){return;}
var threads=this.get_selected_threads();var unread_disabled=true;var read_disabled=true;for(var i=0;i<threads.length;i++){var status=this.get_status(ge('thread_'+ _proxy_jslib_handle(threads, (i), 0, 0)));if(status==this.STATUS_UNREAD){read_disabled=false;}else{unread_disabled=false;}}
var message_selector=ge('message_selector');if(!threads.length&&message_selector){message_selector.selectedIndex=0;}
var delete_disabled=read_disabled&&unread_disabled;var li= _proxy_jslib_handle(buttons, 'getElementsByTagName', '', 1, 0)('li');var loop=[{l:li[0],d:unread_disabled},{l:li[1],d:read_disabled},{l:li[2],d:delete_disabled}];for(var i=0;i<loop.length;i++){if( _proxy_jslib_handle(loop, (i), 0, 0).l){ _proxy_jslib_handle(loop, (i), 0, 0).l.className=trim( _proxy_jslib_handle( _proxy_jslib_handle(loop, (i), 0, 0).l.className, 'replace', '', 1, 0)('menu_disabled',''))+( _proxy_jslib_handle(loop, (i), 0, 0).d?' menu_disabled':'');}}}
Megaboxx.prototype.create_hidden_input_helper=function(name,value) {var new_input=document.createElement('input');new_input.name=name; _proxy_jslib_assign('', new_input, 'value', '=', ( _proxy_jslib_handle(null, 'value', value, 0, 0)));new_input.type='hidden';return new_input;}
Megaboxx.prototype.submit_prehook=function(obj,inline,captcha_input) {var form=ge('compose_message');var length=trim( _proxy_jslib_handle(form.message, 'value', '', 0, 0)).length;var error_text=null;var ids=ge('ids');var is_update=ge('fbpage_update');var empty_ok=inboxAttachments.attachment_added||(form.subject&&trim( _proxy_jslib_handle(form.subject, 'value', '', 0, 0)).length);if(length==0&&!empty_ok){error_text=tx('inbox:MSG_ERR_NO_BODY');}else if(length>10000){error_text=tx('inbox:MSG_ERR_TOO_LONG');}else if(!is_update&&ids&&tokenizer.is_empty(ids)){error_text=tx('inbox:MSG_ERR_NO_RECIP');}
if(error_text){var error=ge('error');if(error){error.parentNode.removeChild(error);}
error=document.createElement('div');error.id='error'; _proxy_jslib_assign('', error, 'innerHTML', '=', ('<h2>'+error_text+'</h2>'));form.insertBefore(error,form.firstChild);var conf=ge('conf');if(conf){conf.parentNode.removeChild(conf);}
return false;}
if(typeof display_captcha=='undefined'){display_captcha=false;}
if(document.getElementsByName('emails[]').length>0){display_captcha=may_captcha;}
if(!display_captcha&&Megaboxx.needsInterstitialCheck){if(!this.interstitialCaptchaPassed){if(!this.interstitialCaptchaData){var subject=form.subject? _proxy_jslib_handle(form.subject, 'value', '', 0, 0):'';this.doInterstitialCheck(subject, _proxy_jslib_handle(form.message, 'value', '', 0, 0));return false;}else{captcha_input=this.interstitialCaptchaData;}}}else if(typeof captcha_html!='undefined'&&!captcha_input&&display_captcha){var dialog=(new (pop_dialog)('captcha')).show_choice(tx('inbox:security-check'),captcha_html,tx('sh:submit-button'),function() {this.submit_prehook(obj,inline,get_all_form_inputs( _proxy_jslib_handle(dialog, 'content', '', 0, 0)));}.bind(this));var inputs= _proxy_jslib_handle( _proxy_jslib_handle(dialog, 'content', '', 0, 0), 'getElementsByTagName', '', 1, 0)('input');for(var i=0;i<inputs.length;i++){if( _proxy_jslib_handle(inputs, (i), 0, 0).type=='text'){ _proxy_jslib_handle(inputs, (i), 0, 0).focus();break;}}
create_captcha();return false;}
if( _proxy_jslib_handle(form.rand_id, 'value', '', 0, 0)==0){ _proxy_jslib_assign('', form.rand_id, 'value', '=', (Math.floor((Math.random()*100000000))));}
if(inboxAttachments){inboxAttachments.fix_app_inputs_on_send();}
if(inline){var form=obj.form;var post={action:'send_reply',id: _proxy_jslib_handle(form.thread, 'value', '', 0, 0),message: _proxy_jslib_handle(form.message, 'value', '', 0, 0)};if(captcha_input){for(var i=0;i<captcha_input.length;i++){ _proxy_jslib_assign('', post, ( _proxy_jslib_handle(captcha_input, (i), 0, 0).name), '=', ( _proxy_jslib_handle( _proxy_jslib_handle(captcha_input, (i), 0, 0), 'value', '', 0, 0)));}}
var attachment=ge(inboxAttachments.view_id);var inputs=[];if(attachment){inputs= _proxy_jslib_handle(attachment, 'getElementsByTagName', '', 1, 0)('input');for(var i=0;i<inputs.length;i++){ _proxy_jslib_assign('', post, ( _proxy_jslib_handle(inputs, (i), 0, 0).name), '=', ( _proxy_jslib_handle( _proxy_jslib_handle(inputs, (i), 0, 0), 'value', '', 0, 0)));}}
if(form.extra&&form.extra.checked){ _proxy_jslib_assign('', post, ('extra'), '=', ( _proxy_jslib_handle(form.extra, 'value', '', 0, 0)));}
new (AsyncRequest)().setURI(this._endpoint).setData(post).setStatusElement('message_post_status').setHandler(function(response) {var text=response.getPayload();var thread=ge('messages');var msg=document.createElement('div');thread.appendChild(msg);set_inner_html(msg,text); _proxy_jslib_assign('',  _proxy_jslib_handle(form, 'getElementsByTagName', '', 1, 0)('textarea')[0], 'value', '=', (''));var i=0;var msg=null;while(msg=ge('msg_'+(i++))){CSS.removeClass(msg,'unread');}
inboxAttachments.remove_attachment_view();this.enable_all_attachment_forms();var hidden_count=ge('hidden_count');if(hidden_count){ _proxy_jslib_assign('', hidden_count, 'innerHTML', '=', (parseInt( _proxy_jslib_handle(hidden_count, 'innerHTML', '', 0, 0),10)+1));var total_count=ge('total_count'); _proxy_jslib_assign('', total_count, 'innerHTML', '=', (parseInt( _proxy_jslib_handle(total_count, 'innerHTML', '', 0, 0),10)+1));}
var error=ge('error');if(error){error.parentNode.removeChild(error);}}.bind(this)).setErrorHandler(this.sendMessageErrorHandler.bind(this)).setFinallyHandler(function(response) {get_all_form_inputs(form).each(function(obj) {obj.disabled=false;});}).send();inputs=[ _proxy_jslib_handle(form, 'getElementsByTagName', '', 1, 0)('textarea')[0]];var form_inputs= _proxy_jslib_handle(form, 'getElementsByTagName', '', 1, 0)('input');for(var i=0;i<form_inputs.length;i++){if( _proxy_jslib_handle(form_inputs, (i), 0, 0).type=='button'){inputs.push( _proxy_jslib_handle(form_inputs, (i), 0, 0));}}
for(var i=0;i<inputs.length;i++){ _proxy_jslib_handle(inputs, (i), 0, 0).disabled=true;}}else if(captcha_input){var form=ge('compose_message');var span=document.createElement('span');var html=[];for(var i=0;i<captcha_input.length;i++){html.push('<input type="hidden" name="', _proxy_jslib_handle(captcha_input, (i), 0, 0).name,'" value="',htmlspecialchars( _proxy_jslib_handle( _proxy_jslib_handle(captcha_input, (i), 0, 0), 'value', '', 0, 0)),'" />');}
 _proxy_jslib_assign('', span, 'innerHTML', '=', (html.join('')));form.appendChild(span);form.onsubmit=null;form.submit();}
this.interstitialCaptchaPassed=false;this.interstitialCaptchaData=null;this.interstitialCaptchaHtml=null;return!inline;}
Megaboxx.prototype.sendMessageErrorHandler=function(response) {var error=ge('error');if(error){error.parentNode.removeChild(error);}
var status=DOM.scry($('content'),'#conf .status');if(status.length>0){status[0].parentNode.removeChild(status[0]);}
var thread=ge('messages');if(thread){var text=response.getPayload();var msg=document.createElement('div');set_inner_html(msg,text);thread.appendChild(msg);}}
Megaboxx.prototype.doInterstitialCheck=function(subject,message) {var data={'subject':subject,'message':message};if(this.interstitialCaptchaHtml){this.showInterstitialCaptcha();}else if(this.interstitialCaptchaPassed){$('send_button').click();}else{new (AsyncRequest)().setData(data).setHandler(this._interstitialCheckHandler.bind(this)).setURI('/ajax/inbox/verify.php').send();}}
Megaboxx.prototype._interstitialCheckHandler=function(asyncResponse) {var payload=asyncResponse.getPayload();if(payload===false){this.interstitialCaptchaPassed=true;$('send_button').click();}
var html= _proxy_jslib_handle(payload, ('html'), 0, 0)||null;if(html){this.interstitialCaptchaHtml=html;this.showInterstitialCaptcha();}}
Megaboxx.prototype.showInterstitialCaptcha=function() {var dialog=Dialog.createCaptchaDialog(this.interstitialCaptchaHtml).setHandler(this._interstitialCaptchaDialogHandler.bind(this)).show();}
Megaboxx.prototype._interstitialCaptchaDialogHandler=function() {this.interstitialCaptchaData=get_all_form_inputs($('captcha'));$('send_button').click();}
Megaboxx.prototype.submit_delete=function(obj) {(new (pop_dialog)).show_choice(tx('inbox:delete-thread-title'),tx('inbox:are-you-sure-delete-single'),tx('inbox:delete-button'),function() {var span=document.createElement('span'); _proxy_jslib_assign('', span, 'innerHTML', '=', ('<input name="delete" type="hidden" value="1" />'+'<input name="folder" type="hidden" value="'+megaboxx_data.folder+'" />'+'<input name="time" type="hidden" value="'+megaboxx_data.time+'" />'));obj.appendChild(span);var form= _proxy_jslib_handle(obj, 'getElementsByTagName', '', 1, 0)('input')[0].form;if(megaboxx_data.folder){ _proxy_jslib_assign('', form, 'action', '+=', ('?f=1'));}
form.submit();},tx('sh:cancel-button'),function() {generic_dialog.get_dialog(this).hide();});return false;}
Megaboxx.prototype.submit_forward_tps=function(obj) {(new (pop_dialog)).show_choice('Forward Thread to TPS','If you forward this thread to TPS, a ticket will be created for UO to work through with all of the correspondence thus far and you will send the user a message indicating you have forwarded their query to UO.<p>'+'Please note the user will not be able to see your profile due to any of the above, but if you "regular" reply they will be able to see your (limited) profile.</p>'+'<p>Finally, if you\'re corresponding with all Facebook employees, no ticket will be generated.  I think we can all agree that would be pretty silly.</p>','Forward to TPS',function() {var span=document.createElement('span'); _proxy_jslib_assign('', span, 'innerHTML', '=', ('<input name="forward_tps" type="hidden" value="1" />'+'<input name="folder" type="hidden" value="'+megaboxx_data.folder+'" />'+'<input name="time" type="hidden" value="'+megaboxx_data.time+'" />'));obj.appendChild(span);var form= _proxy_jslib_handle(obj, 'getElementsByTagName', '', 1, 0)('input')[0].form;if(megaboxx_data.folder){ _proxy_jslib_assign('', form, 'action', '+=', ('?f=1'));}
form.submit();},tx('sh:cancel-button'),function() {generic_dialog.get_dialog(this).hide();});return false;}
Megaboxx.prototype.toggle_all_attachment_forms=function(value) {( _proxy_jslib_handle(null, 'value', value, 0, 0)?hide:show)(ge('dd_attachment'));( _proxy_jslib_handle(null, 'value', value, 0, 0)?hide:show)(ge('dt_attachment'));}
Megaboxx.prototype.enable_all_attachment_forms=function() {this.toggle_all_attachment_forms(false);}
Megaboxx.prototype.disable_all_attachment_forms=function() {this.toggle_all_attachment_forms(true);}
Megaboxx.prototype.reset_rand_id=function() {var compose_form=ge('compose_message');if(!compose_form){return;}
 _proxy_jslib_assign('', compose_form.rand_id, 'value', '=', (0));}
Megaboxx.prototype.fetch_thread_history=function(count,notice) { _proxy_jslib_assign('', notice, 'innerHTML', '=', ('<span class="loading"><span>'+tx('sh:loading')+'</span></span>'));new (AsyncRequest)().setURI(this._endpoint).setData({id:megaboxx_data.thread_id,action:'history',count:count,folder:megaboxx_data.folder}).setHandler(function(response) {var messages=document.createElement('div');notice.parentNode.insertBefore(messages,notice);hide(notice);set_inner_html(messages,response.getPayload());}).send();}
Megaboxx.prototype.STATUS_ALL=0;Megaboxx.prototype.STATUS_READ=1;Megaboxx.prototype.STATUS_UNREAD=2;Megaboxx.prototype.STATUS_NONE=-1;if(typeof tokenizer!='undefined'){tokenizer.prototype.onselect=function() {Megaboxx.getInstance().reset_rand_id();}}
function inbox_search_typeahead(obj,source,properties) {this.anchor_block=true; _proxy_jslib_handle(this, 'parent', '', 0, 0).construct(this,obj,source,properties);}
inbox_search_typeahead.extend('typeaheadpro');inbox_search_typeahead.prototype.auto_select=false;inbox_search_typeahead.prototype.less_than_n_chars=true;inbox_search_typeahead.prototype.touch_fired=false;inbox_search_typeahead.prototype.show=function() {if(!this.less_than_n_chars){ _proxy_jslib_handle(this, 'parent', '', 0, 0).show();this.dropdown.style.width='200px';}else{this.hide();}}
inbox_search_typeahead.prototype.hide=function() { _proxy_jslib_handle(this, 'parent', '', 0, 0).hide();CSS.removeClass(ge('inbox_search'),'typeahead_border');}
inbox_search_typeahead.prototype.fireTouch=function() {if(!this.touch_fired){AsyncRequest.pingURI('/ajax/inbox/touch.php',{},false);this.touch_fired=true;}}
inbox_search_typeahead.prototype.found_suggestions=function(suggestions,text,fake_data) { _proxy_jslib_handle(this, 'parent', '', 0, 0).found_suggestions(suggestions,text,fake_data);if(this.list.firstChild&&this.list.firstChild.firstChild){CSS.addClass(this.list.firstChild.firstChild,'blue_top_border');CSS.removeClass(this.list,'no_border_list');CSS.addClass(this.list.lastChild.lastChild,'blue_bottom_border');CSS.addClass(ge('inbox_search'),'typeahead_border');}else{CSS.removeClass(ge('inbox_search'),'typeahead_border');CSS.removeClass(ge('inbox_search'),'typeahead_border');CSS.addClass(this.list,'no_border_list');}}
function inbox_search_friend_source(get_param) { _proxy_jslib_handle(this, 'parent', '', 0, 0).construct(this,get_param);new (AsyncRequest)().setMethod('GET').setReadOnly(true).setURI('/ajax/inbox/inbox_search.php?'+get_param).setErrorHandler(function() {}).setHandler(function(response) {this.values=response.getPayload().entries;this.build_index();}.bind(this)).send();}
inbox_search_friend_source.extend('static_source');inbox_search_friend_source.prototype.cache_results=true;inbox_search_friend_source.prototype.gen_html=function(friend,highlight) {return['<div>',typeahead_source.highlight_found(friend.t,highlight),'</div><div><small>',friend.n,'</small></div>'].join('');}
inbox_search_friend_source.prototype.search_value=function(text) {if(!this.is_ready){this.owner.less_than_n_chars=true;return[];}else if(text.length>=2){this.owner.fireTouch();this.owner.less_than_n_chars=false;return  _proxy_jslib_handle(this, 'parent', '', 0, 0).search_value(text);}
return[];}
function inbox_search_onsubmit(friend) {if(friend){goURI(friend.u);return false;}}
function inbox_search_note_close() {AsyncRequest.pingURI('/ajax/inbox/search_note_close.php',{},false);hide(ge('inbox_search_note'));}

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