/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 8th 2010 9:58:48 PM PST                             */
/*      Machine:  10.16.140.104                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/4zf3af2d9v4sgwcc.pkg.js h:3bp9cdj8                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/4zf3af2d9v4sgwcc.pkg.js                                   */

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

function delay_add_class(_L0,evt){var _L2='hovered';var _L3=250;var _L4=null;var _L5=null;var _L6=function(e){if(!DOM.contains(_L0,e.getTarget())){clearTimeout(_L4);CSS.removeClass(_L0,_L2);_L5&&_L5.remove();}};var add=function(){_L4=setTimeout(CSS.addClass.bind(null,_L0,_L2),_L3||0);_L5=Event.listen(document,'mousemove',_L6);};Event.listen(_L0,'mouseenter',add);if(DOM.contains(_L0,$E(evt).getTarget()))add();}
function editor_two_level_change(_L0,_L1,_L2){_L0=ge(_L0);if(_L0.getAttribute("typefor"))subselector=ge(_L0.getAttribute("typefor"));if(_L0&&subselector){subselector.options.length=1;type_value=_L0.options[_L0.selectedIndex].value;if(type_value=="")type_value=-1;index=1;suboptions=_L1[type_value];if(typeof(suboptions)!="undefined")for(var key in suboptions)subselector.options[index++]=new Option(suboptions[key],key);if(_L2)if(_L2[type_value]){subselector.options[0]=new Option(_L2[type_value],"");subselector.options[0].selected=true;}else{subselector.options[0]=new Option("---","");subselector.options[0].selected=true;}subselector.disabled=subselector.options.length<=1;}}function editor_two_level_set_subselector(_L0,_L1){_L0=ge(_L0);if(_L0){opts=_L0.options;for(var _L2=0;_L2<opts.length;_L2++)if((opts[_L2].value==_L1)||(_L1===null&&opts[_L2].value==''))_L0.selectedIndex=_L2;}}function editor_network_change(_L0,_L1,_L2){_L0=ge(_L0);if(_L0&&_L0.value>0){show('display_network_message');}else hide('display_network_message');}function editor_rel_change(_L0,_L1,_L2){_L0=ge(_L0);for(var _L3=2;_L3<=6;_L3++)if(_L3==_L0.value){show(_L1+'_new_partner_'+_L3);}else hide(_L1+'_new_partner_'+_L3);if(_L0&&ge(_L1+'_new_partner'))if((_L0.value>=2)&&(_L0.value<=6)){show(_L1+'_new_partner');}else hide(_L1+'_new_partner');if(_L0&&ge(_L1+'_rel_uncancel'))if(_L0.value>=2&&_L0.value<=6){editor_rel_uncancel(_L0,_L1,_L0.value);}else editor_rel_cancel(_L0,_L1);_editor_rel_toggle_awaiting(_L0,_L1,_L2);}function rel_typeahead_onsubmit(){return false;}function rel_typeahead_onselect(_L0){if(!_L0)return;$('new_partner').value=_L0.i;show($('relationship_warning'));set_inner_html($('relationshipee'),htmlize(_L0.t));}function _editor_rel_toggle_awaiting(_L0,_L1,_L2){_L0=ge(_L0);if(_L0&&ge(_L1+'_rel_required'))if(_L0.value==_L2){hide(_L1+'_rel_required');show(_L1+'_rel_awaiting');}else{show(_L1+'_rel_required');hide(_L1+'_rel_awaiting');}}function editor_rel_cancel(_L0,_L1){if(ge(_L1+'_rel_uncancel'))show(_L1+'_rel_uncancel');if(ge(_L1+'_rel_cancel'))hide(_L1+'_rel_cancel');_L0=ge(_L0);if(ge(_L0)&&$(_L0).selectedIndex>1)_editor_rel_set_value(_L0,1);}function editor_rel_cancel_new(_L0,_L1,_L2){hide($('relationship_warning'));$('new_partner').value='';$('relationship_typeahead').typeahead.clear();_editor_rel_set_value($(_L0),_L2);editor_rel_change($(_L0),_L1,_L2);}function editor_rel_uncancel(_L0,_L1,_L2){if(ge(_L1+'_rel_uncancel'))hide(_L1+'_rel_uncancel');if(ge(_L1+'_rel_cancel'))show(_L1+'_rel_cancel');if(_L2==4||_L2==5){hide(_L1+'_rel_with');show(_L1+'_rel_to');}else if(_L2>=2&&_L2<=6){show(_L1+'_rel_with');hide(_L1+'_rel_to');}if(ge(_L0)&&$(_L0).selectedIndex<=1)_editor_rel_set_value(_L0,_L2);_editor_rel_toggle_awaiting(_L0,_L1,_L2);}function editor_autocomplete_onselect(_L0){var _L1=/(.*)_/.exec(this.obj.name);if(_L1){var _L2=ge(_L1[1]+'_id');if(_L0){_L2.value=_L0.i==null?_L0.t:_L0.i;}else _L2.value=-1;}}function _editor_rel_set_value(_L0,_L1){_L0=ge(_L0);if(_L0){opts=_L0.options;opts_length=opts.length;for(var _L2=0;_L2<opts_length;_L2++)if((opts[_L2].value==_L1)||(_L1===null&&opts[_L2].value==''))_L0.selectedIndex=_L2;}}function enableDisable(_L0,_L1){_L1=ge(_L1);if(_L1){if(_L1.value)_L1.value="";if(_L1.selectedIndex)_L1.selectedIndex=0;}}function show_editor_error(_L0,_L1){$('editor_error_text').innerHTML=_L0;$('editor_error_explanation').innerHTML=_L1;show('error');}function make_explanation_list(_L0,num){var exp='';if(num==1){exp=_tx("{thing-1} is required.",{'thing-1':_L0[0]});}else if(num==2){exp=_tx("{thing-1} and {thing-2} are required.",{'thing-1':_L0[0],'thing-2':_L0[1]});}else if(num==3){exp=_tx("{thing-1}, {thing-2}, and {thing-3} are required.",{'thing-1':_L0[0],'thing-2':_L0[1],'thing-3':_L0[2]});}else if(num==4){exp=_tx("{thing-1}, {thing-2}, {thing-3}, and {thing-4} are required.",{'thing-1':_L0[0],'thing-2':_L0[1],'thing-3':_L0[2],'thing-4':_L0[3]});}else if(num>4)exp=_tx("{thing-1}, {thing-2}, {thing-3}, and {num} other fields are required.",{'thing-1':_L0[0],'thing-2':_L0[1],'thing-3':_L0[2],'num':num-3});return exp;}function TimeSpan(_L0,_L1,_L2,_L3){this.get_start_ts=function(){return _L17(_L4,_L5,_L7,_L6,_L8,_L9);};this.get_end_ts=function(){var _L1c=_L17(_L4,_L5,_L7,_L6,_L8,_L9);var _L1d=_L17(_La,_Lb,_Lc,_Ld,_Le,_Lf);if(_L1c>_L1d&&!(_L7&&_Lc)){var _L1e=new Date();_L1e.setTime(_L1d);_L1e.setFullYear(_L1e.getFullYear()+1);return _L1e.getTime();}else return _L1d;};var _L4=$(_L0+'_month');var _L5=$(_L0+'_day');var _L6=$(_L0+'_hour');var _L7=ge(_L0+'_year');var _L8=$(_L0+'_min');var _L9=$(_L0+'_ampm');var _La=$(_L1+'_month');var _Lb=$(_L1+'_day');var _Lc=ge(_L1+'_year');var _Ld=$(_L1+'_hour');var _Le=$(_L1+'_min');var _Lf=$(_L1+'_ampm');var _L10=_L2*60000;var _L11=function(){var _L1c=_Lc.options;var _L1d=[];for(var i=0;i<_L1c.length;i++){var _L1f=_L1c[i];if(_L1f.text!="Year:"&&_L1f.value!="-1")_L1d.push(parseInt(_L1f.value));}_L1d=_L1d.sort();return _L1d[_L1d.length-1];};var _L12=_L11();var _L13=function(){var _L1c=_L17(_L4,_L5,_L7,_L6,_L8,_L9);var _L1d=_L17(_La,_Lb,_Lc,_Ld,_Le,_Lf);_L10=_L1d-_L1c;};var _L14=function(){if(_L3===true)_L16(_L4,_L5,_L7,_L6,_L8,_L9);};var _L15=function(){_L13();};var _L16=function(){var _L1c=_L17(_L4,_L5,_L7,_L6,_L8,_L9);var _L1d=_L1c+_L10;_L18(_L1d,_La,_Lb,_Lc,_Ld,_Le,_Lf);var _L1e=_Lc.options;var _L1f=new Date(_L1d);if(_L1f.getFullYear()>_L12){_L1e.value=_L12;_L15();}};var _L17=function(m,d,y,h,min,ampm){var _L22=new Date();var _L23=_L22.getDate();var _L24=_L22.getMonth();var _L25=_L22.getFullYear();var _L26=m.value-1;var date=d.value;var hour;var _L29=min.value;var year;hour=parseInt(h.value);if(ampm.value!=''){if(hour==12)hour=0;if(ampm.value=='pm')hour=hour+12;}if(!y){if(_L26<_L24){year=_L25+1;}else if(_L26==_L24&&date<_L23){year=_L25+1;}else year=_L25;}else year=y.value;var _L2b=new Date(year,_L26,date,hour,_L29,0,0);var ts=_L2b.getTime();return ts;};var _L18=function(ts,m,d,y,h,min,ampm){var _L23=new Date();_L23.setTime(ts);var _L24=m.value;var _L25=_L23.getMonth()+1;var _L26=_L23.getDate();var _L27=_L23.getHours();var _L28=_L23.getMinutes();var _L29=_L23.getFullYear();var _L2a;if(ampm.value!=''){if(_L27>11){_L2a='pm';if(_L27>12)_L27=_L27-12;}else{if(_L27==0)_L27=12;_L2a='am';}}else _L2a='';if(_L28<10)_L28="0"+_L28;m.value=_L25;d.value=_L26;if(y)y.value=_L29;h.value=_L27;min.value=_L28;ampm.value=_L2a;if(_L24!=_L25)editor_date_month_change(m,d,y?y:false);};var _L19=function(){editor_date_month_change(_L4,_L5,_L7?_L7:false);_L14();_L13();};var _L1a=function(){editor_date_month_change(_La,_Lb,_Lc?_Lc:false);_L15();};var _L1b=function(){_L15();var _L1c=_L17(_L4,_L5,_L7,_L6,_L8,_L9);var _L1d=_L17(_La,_Lb,_Lc,_Ld,_Le,_Lf);if(_L1d<_L1c){var _L1e=12*60*60000;_L1d+=parseInt((_L1c-_L1d+_L1e-1)/_L1e)*_L1e;_L18(_L1d,_La,_Lb,_Lc,_Ld,_Le,_Lf);}};_L4.onchange=_L19;_L5.onchange=_L14;if(_L7)_L7.onchange=_L14;_L6.onchange=_L14;_L8.onchange=_L14;_L9.onchange=_L14;_La.onchange=_L1a;_Lb.onchange=_L15;if(_Lc)_Lc.onchange=_L15;_Ld.onchange=_L1b;_Le.onchange=_L15;_Lf.onchange=_L15;}function editor_date_month_change(_L0,_L1,_L2){var _L0=ge(_L0);var _L1=ge(_L1);var _L2=_L2?ge(_L2):false;var _L3=parseInt(_L1.value);var _L4=false;if(_L2&&_L2.value&&_L2.value!=-1)_L4=_L2.value;var _L5=_month_get_num_days(_L0.value,_L4);var b=_L1.options[0].value==-1?1:0;for(var i=_L1.options.length;i>_L5+b;i--)DOM.remove(_L1.options[i-1]);for(var i=_L1.options.length;i<_L5+b;i++)_L1.options[i]=new Option(i+(b?0:1),i+(b?0:1));if(_L5<_L3){_L1.value=_L1.options.length;if(typeof _L1.onchange==='function')_L1.onchange();}}function _month_get_num_days(_L0,_L1){var _L2;if(_L0==-1)return 31;_L2=new Date(_L1?_L1:1912,_L0,0);return _L2.getDate();}function toggleEndWorkSpan(_L0){if(shown(_L0+'_endspan')){hide(_L0+'_endspan');show(_L0+'_present');}else{show(_L0+'_endspan');hide(_L0+'_present');}}function regionCountryChange(_L0,_L1,_L2,_L3){switch(_L1){case '326':show(_L2);$(_L0).innerHTML=_L3+_tx("Province");break;case '398':show(_L2);$(_L0).innerHTML=_L3+_tx("State");break;default:$(_L0).innerHTML=_L3+_tx("Country");hide(_L2);break;}}function regionCountryChange_twoLabels(_L0,_L1,_L2,_L3,_L4){show(_L0);$(_L0).innerHTML=_L4+_tx("Country");switch(_L2){case '326':show(_L3);show(_L1);$(_L1).innerHTML=_L4+_tx("Province");break;case '':case '398':show(_L3);show(_L1);$(_L1).innerHTML=_L4+_tx("State");break;default:$(_L1).innerHTML=_L4+_tx("State");$(_L3).disabled=true;break;}}function regionCountyChange_setUSifStateChosen(_L0,_L1){region_select=ge(_L1);country_select=ge(_L0);if(region_select.value!=''&&country_select.value=='')country_select.value=398;}function regionCountryChange_restrictions(_L0,_L1){country_select=ge(_L0);if(country_select.value==398){country_select.value='';}else if(country_select.value==326){region_select=ge(_L1);if(region_select.value)country_select.value='';}}function mobile_phone_nag(_L0,obj,_L2){var _L3=false;var _L4=function(){if(_L3)return;for(var i=0;i<_L0.length;i++)if((new RegExp('\\b'+_L0[i]+'\\b','i')).test(obj.value)){_L3=true;(new AsyncRequest()).setURI('/ajax/mobile_phone_nag.php').setHandler(function(_L6){var _L7=_L6.getPayload();if(_L7){var div=document.createElement('div');div.innerHTML=_L7;CSS.setClass(div,'mobile_nag');div.style.display='none';_L2.parentNode.insertBefore(div,_L2);animation(div).blind().show().from('height',0).to('height','auto').go();}}).setReadOnly(true).setOption('suppressErrorHandlerWarning',true).send();break;}};addEventBase(obj,'keyup',_L4);addEventBase(obj,'change',_L4);}function mobile_phone_nag_hide(obj){while(obj.parentNode&&obj.className!='mobile_nag')obj=obj.parentNode;obj.parentNode.removeChild(obj);}

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