/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  July 3rd 2009 5:28:28 PM PDT                                 */
/*      Machine:  10.16.140.107                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/profile.js.pkg.php r122901                                */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/profile.js.pkg.php                                        */


var REMOVE_BOX_ONLY=1;var REMOVE_ENTIRE_APP=2;var REMOVE_LINK_ONLY=3;var REMOVE_INTERACTIONS_ONLY=4;function _remove_app(remove_type,app_id,ref){var error_message;if(remove_type==REMOVE_BOX_ONLY){error_message=tx('prf:error-box');_remove_app_box_from_page(app_id);_remove_app_icon_from_page_profile(app_id);}else if(remove_type==REMOVE_ENTIRE_APP){error_message=tx('prf:error-app');_remove_app_box_from_page(app_id);_remove_app_icon_from_page_profile(app_id);remove_app_link_from_side_nav(app_id);}
ajax_remove_application(app_id,PROFILE_FBID,remove_type,ref,error_message);}
function ajax_remove_application(app_id,profile_fbid,remove_type,ref,error_message){if(!error_message){error_message=tx('prf:error-app');}
new AsyncRequest().setURI('/ajax/profile_boxes.php').setMethod('POST').setData({profile_fbid:profile_fbid,app_id:app_id,remove_type:remove_type,ref:ref}).setHandler(function(resp){if(!(resp.getPayload()).success){Util.error(error_message+'for app %d.',app_id);aiert(error_message);}}).setErrorHandler(function(){Util.error(error_message+'for app %d.',app_id);aiert(error_message);}).send();}
function _remove_app_box_from_page(app_id){var box=ge('box_app_'+app_id);if(box){box.parentNode.removeChild(box);}}
function remove_app_link_from_side_nav(app_id){app_id=String(app_id);if(ge(app_id)){$(''+app_id).style.display='none';}}
function _remove_app_icon_from_page_profile(app_id){var app_icon_id='icon_app'+app_id;if(ge(app_icon_id)){$(app_icon_id).style.display='none';}}
function removeBox(obj,application_name,app_id){var dialog=new contextual_dialog();dialog.set_context(obj);buttons='<div class="dialog_buttons">'+'<input class="inputsubmit" type="button" value="'+tx('prf:remove-app')+'" />'+'<input class="inputsubmit" type="button" value="'+tx('prf:remove-box')+'" />'+'<input class="inputsubmit" type="button" value="'+tx('sh:cancel-button')+'" />'+'</div>';var remove_prompt=tx('prf05');dialog.show_prompt(tx('prf06',{'application-name':application_name}),dialog.content_to_markup(remove_prompt)+buttons);CSS.addClass(obj,'box_remove_selected');dialog_options=dialog.obj.getElementsByTagName('input');dialog_options[0].onclick=function(){_remove_app(REMOVE_ENTIRE_APP,app_id,'prb');dialog.hide();}
dialog_options[1].onclick=function(){_remove_app(REMOVE_BOX_ONLY,app_id,'prb');dialog.hide();}
dialog_options[2].onclick=function(){dialog.hide();CSS.removeClass(obj,'box_remove_selected');}
return false;}
var mf_uninstalled_apps={};function minifeed_hide(clicked_element,story_id,agg_story_ids,fbpage_name,app_id,installed,hash,story_type,source_id,template_id,non_user,approved){var minifeed_dialog_handle=new contextual_dialog();minifeed_dialog_handle.set_context(clicked_element);CSS.addClass(clicked_element,'arrow_highlight');var title=tx('prf07');var message=tx('prf08');var hide_story=function(){if(source_id){_minifeed_hide_click(story_id,agg_story_ids,source_id,false,false);}else{_minifeed_hide_click(story_id,agg_story_ids,null,false,false,story_type,app_id,template_id,hash);}
CSS.removeClass(clicked_element,'arrow_highlight');generic_dialog.get_dialog(this).fade_out(100);};var hide_inaccurate_app_story=function(){if(source_id){_minifeed_hide_click(story_id,agg_story_ids,source_id,false,true);}else{_minifeed_hide_click(story_id,agg_story_ids,null,null,true,story_type,app_id,template_id,hash);}
generic_dialog.get_dialog(this).fade_out(100);CSS.removeClass(clicked_element,'arrow_highlight');};var hide_story_and_remove_app=function(){if(source_id){_minifeed_hide_click(story_id,agg_story_ids,source_id,true,true);mf_uninstalled_apps[source_id]=true;}else{_minifeed_hide_click(story_id,agg_story_ids,null,null,true,story_type,app_id,template_id,hash);_remove_app(REMOVE_ENTIRE_APP,app_id,'mf');mf_uninstalled_apps[app_id]=true;}
generic_dialog.get_dialog(this).fade_out(100);CSS.removeClass(clicked_element,'arrow_highlight');};var hide_story_and_block_app=function(){mf_uninstalled_apps[app_id]=true;_remove_app(REMOVE_INTERACTIONS_ONLY,app_id,'mf');_minifeed_hide_click(story_id,agg_story_ids,null,null,true,story_type,app_id,template_id,hash);generic_dialog.get_dialog(this).fade_out(100);}
var cancel=function(){generic_dialog.get_dialog(this).fade_out(100);CSS.removeClass(clicked_element,'arrow_highlight');};var inaccurate_installed_app=function(){var uninstall_title=source_id?tx('ua03'):tx('prf09');var uninstall_message=source_id?tx('ua04'):tx('prf10');var remove_button_text=source_id?tx('ua:block-source'):tx('prf:remove-app');minifeed_dialog_handle.show_choice(uninstall_title,uninstall_message,tx('prf:just-hide-story'),hide_inaccurate_app_story,remove_button_text,hide_story_and_remove_app,'',tx('sh:cancel-button'),cancel);var dialog_popup=minifeed_dialog_handle.obj.firstChild;dialog_popup.className='remove_app_dialog_popup '+dialog_popup.className;};if(app_id&&non_user&&!approved){message+=' '+tx('prf33');minifeed_dialog_handle.show_choice(title,message,tx('prf:hide-story'),hide_story,tx('prf:dont-want'),hide_story_and_block_app,'',tx('sh:cancel-button'),cancel);}else if((app_id||source_id)&&!approved){message+=' '+tx('prf11');var inaccurate_function;if(installed&&(source_id&&!mf_uninstalled_apps[source_id])||(app_id&&!mf_uninstalled_apps[app_id])){inaccurate_function=inaccurate_installed_app;}else{inaccurate_function=hide_inaccurate_app_story;}
minifeed_dialog_handle.show_choice(title,message,tx('prf:hide-story'),hide_story,tx('prf:didnt-do'),inaccurate_function,'',tx('sh:cancel-button'),cancel);}else{minifeed_dialog_handle.show_choice(title,message,tx('prf:hide-story'),hide_story,tx('sh:cancel-button'),cancel);}
return false;}
function _minifeed_hide_click(hide_id,agg_story_ids,source_id,block_source,inaccurate,story_type,app_id,template_id,hash){var post={'ministory_key':hide_id,'extra_hide_story_keys':agg_story_ids,'profile_fbid':PROFILE_FBID};if(app_id){post['app_id']=app_id;post['hash']=hash;if(template_id){post['template_id']=template_id;}}
if(inaccurate){post['inaccurate']=1;post['story_type']=story_type;}
if(source_id){post['source_id']=source_id;if(block_source){post['block_source']=true;}}
new AsyncRequest().setURI('/ajax/minifeed.php').setMethod('POST').setData(post).setHandler(function(resp){var feed=typeof FeedWall!='undefined'&&FeedWall.getInstance();if(feed){var post=new FeedWallPost(FeedWall.getInstance(),$('minifeed_'+hide_id));feed.removeChild(post);}else{var story=ge('story_'+hide_id);if(story){if(CSS.hasClass(story.previousSibling,'date_divider')&&story.nextSibling.className.indexOf('story')==-1){DOM.remove(story.previousSibling);}else if(CSS.hasClass(story.previousSibling.className,'date_divider')){CSS.addClass(story.nextSibling,' no_border');}
DOM.remove(story);_minifeed_decrement_story_count();}}}).setErrorHandler(function(){aiert(tx('prf:error-hide-mf'));}).send();}
function _minifeed_decrement_story_count(){var text;var count_el=ge('mf_story_count_string');if(!count_el)return;var count=parseInt(count_el.getAttribute('story_count'));count=count-1;if(count==1){text=tx('prf12');}else{text=tx('prf13',{'count':count});}
count_el.innerHTML=text;count_el.setAttribute('story_count',count);}
function save_box_orders(){var moveable_wide=ge('moveable_wide');var hidden_wide=ge('hidden_apps_wide');var i,j;var moveable_wide_list='';for(i=0;i<moveable_wide.childNodes.length;i++){if(i!=0){moveable_wide_list+=':';}
moveable_wide_list+=moveable_wide.childNodes[i].id;}
var apps_wide_cutoff=i;if(hidden_wide){for(j=0;j<hidden_wide.childNodes.length;j++){if(i!=0){moveable_wide_list+=':';}
moveable_wide_list+=hidden_wide.childNodes[j].id;}}
var moveable_narrow=ge('moveable_narrow');var hidden_narrow=ge('hidden_apps_narrow');var moveable_narrow_list='';for(i=0;i<moveable_narrow.childNodes.length;i++){if(i!=0){moveable_narrow_list+=':';}
moveable_narrow_list+=moveable_narrow.childNodes[i].id;}
var apps_narrow_cutoff=i;if(hidden_narrow){for(j=0;j<hidden_narrow.childNodes.length;j++){if(i!=0){moveable_narrow_list+=':';}
moveable_narrow_list+=hidden_narrow.childNodes[j].id;}}
new AsyncRequest().setURI('/ajax/profile_boxes.php').setMethod('POST').setData({'profile_fbid':PROFILE_FBID,'moveable_wide_list':moveable_wide_list,'moveable_narrow_list':moveable_narrow_list,'apps_wide_cutoff':apps_wide_cutoff,'apps_narrow_cutoff':apps_narrow_cutoff}).send();}
function show_profile_layout_dialog(){var dialog=new pop_dialog();dialog.show_message(tx('prf14'),tx('prf15'));}
function show_public_profile_dialog(url){var dialog=new pop_dialog();dialog.show_message(tx('prf17'),tx('prf18')
+'<br/><br/>'
+'<span style="color: #3b5998; border: 1px solid #ccc; padding: 5px; margin: 5px;">'
+url
+'</span>'
+'<br/><br/>'
+tx('prf20',{'search-privacy-link':'<a href="/privacy.php?view=search">'+tx('prf21')+'</a>'}));}
function profile_icon_hover(icon_link){var tooltip=icon_link.previousSibling;tooltip.style.display='block';tooltip.style.zindex=1;if(CSS.hasClass(tooltip,'loaded_tooltip')){visible_tooltip=tooltip;return;}
var offsetWidth=tooltip.childNodes[0].offsetWidth;tooltip.style.width=offsetWidth+'px';tooltip.style.left=-((offsetWidth-22)/2)+'px';tooltip.style.top=-24+'px';CSS.addClass(tooltip,'loaded_tooltip');visible_tooltip=tooltip;}
function clear_tooltip(icon_link){var tooltip=icon_link.previousSibling;tooltip.style.display='none';}
function boxFlexToggle(el){var userprofile=ge('userprofile');if(CSS.hasClass(userprofile,'collapsed_mode')){CSS.removeClass(userprofile,'collapsed_mode');CSS.removeClass(el,'flex_shut');CSS.addClass(el,'flex_open');_animate_scroll_to_id(el.id,5);_profileBoxFlexAjax(el.id,0);return;}
if(CSS.hasClass(el,'flex_open')){CSS.removeClass(el,'flex_open');CSS.addClass(el,'flex_shut');_profileBoxFlexAjax(el.id,1);}else{CSS.removeClass(el,'flex_shut');CSS.addClass(el,'flex_open');_profileBoxFlexAjax(el.id,0);}
el.blur();return false;}
function _profileBoxFlexAjax(elId,val){new AsyncSignal('/ajax/profile_box_flex_ajax.php',{'app_id':elId,'value':val}).send();}
function _boxFlexSet(el,open){if(open==true&&CSS.hasClass(el,'flex_shut')){CSS.removeClass(el,'flex_shut');CSS.addClass(el,'flex_open');}else if(open==false&&CSS.hasClass(el,'flex_open')){CSS.removeClass(el,'flex_open');CSS.addClass(el,'flex_shut');}}
function profile_app_switcher_select(scroll_element_id,app_id){_boxFlexSet(app_container,1);var box_head=$('box_head_'+app_id);if(box_head){var app_container=box_head.parentNode;if(app_container.parentNode.id.indexOf('moveable')==-1){toggle_profile_apps_link(true);}
_make_header_blue(app_id);_animate_scroll_to_id(scroll_element_id,app_id);}else{ProfileHiddenBoxes.singleton.ensureHiddenContents(function(){box_head=$('box_head_'+app_id);if(box_head){profile_app_switcher_select(scroll_element_id,app_id);}});}
AsyncRequest.pingURI('/ajax/profile_boxes_log.php',{'log_scroll':1,'profile_fbid':window.PROFILE_OWNER_ID,'app_id':app_id},false);return false;}
var ANI_SCROLL_STEP_AMOUNT=250;var ANI_SCROLL_SLOWING_WINDOW=750;var ANI_SCROLL_STOP_WINDOW=13;var ANI_MAX_SLOWDOWN_AMOUNT=120;var ANI_CALLBACK_PAUSE_TIME=200;function _animate_scroll_to_id(scroll_element_id,app_id){var element=(typeof app_id!='undefined')?ge('box_app_'+app_id):ge(scroll_element_id);var target_height=elementY(element);var target_bottom=target_height+element.offsetHeight;if(target_height>pageScrollY()&&target_bottom<pageScrollY()+getViewportHeight()){setTimeout("_fade_header("+app_id+")",ANI_CALLBACK_PAUSE_TIME+400);}else{_animate_scroll_to_id_helper(scroll_element_id,20,app_id,pageScrollY(),'_fade_header');}}
function _animate_scroll_to_id_no_fade(scroll_element_id,app_id){var element=(typeof app_id!='undefined')?ge('box_app_'+app_id):ge(scroll_element_id);var target_height=elementY(element);var target_bottom=target_height+element.offsetHeight;_animate_scroll_to_id_helper(scroll_element_id,20,app_id,pageScrollY(),'');}
function _animate_scroll_to_id_helper(scroll_element_id,scroll_speed,app_id,scroll_height,scroll_complete_callback){var element=ge(scroll_element_id);var target_height=elementY(element);var page_scroll_height=pageScrollY();var scroll_dir=1;if(target_height<page_scroll_height){scroll_dir=-1;}
var scroll_amount=0;if(scroll_height!=page_scroll_height){if(scroll_complete_callback){setTimeout(scroll_complete_callback+"("+app_id+")",ANI_CALLBACK_PAUSE_TIME);}
return;}
if(!(page_scroll_height>target_height-ANI_SCROLL_SLOWING_WINDOW&&page_scroll_height<target_height+ANI_SCROLL_SLOWING_WINDOW)){scroll_amount=ANI_SCROLL_STEP_AMOUNT;}else if(!(page_scroll_height>target_height-ANI_SCROLL_STOP_WINDOW&&page_scroll_height<target_height+ANI_SCROLL_STOP_WINDOW)){scroll_amount=parseInt(Math.abs(page_scroll_height-target_height)/ANI_SCROLL_SLOWING_WINDOW*ANI_MAX_SLOWDOWN_AMOUNT);}
if(scroll_amount!=0){var expected_page_scroll_height=pageScrollY()+scroll_dir*scroll_amount;window.scrollBy(0,scroll_dir*scroll_amount);setTimeout("_animate_scroll_to_id_helper('"+
scroll_element_id+"',"+
scroll_speed+","+
app_id+","+
expected_page_scroll_height+",'"+
scroll_complete_callback+"')",scroll_speed);}else{window.scrollTo(0,target_height-ANI_SCROLL_STOP_WINDOW);if(scroll_complete_callback){setTimeout(scroll_complete_callback+"("+app_id+")",ANI_CALLBACK_PAUSE_TIME);}}}
function _fade_header(id){var box_header=ge('box_head_'+id);CSS.removeClass(box_header,'box_head_highlight');var box=ge('box_head_'+id);if(!box){return;}
CSS.removeClass(box.parentNode,'box_outline');var old_border=ge('scroll_highlight_border');old_border.parentNode.removeChild(old_border);if(id==2719290516){$('wall_text').focus();}}
function make_try_app_header(app_id,callback){_animate_scroll_to_id_no_fade("a_"+app_id,app_id);var newBorder=document.createElement('div');newBorder.id='scroll_highlight_border';newBorder.className="temp_box_highlight_outline";var box=$('box_head_'+app_id).parentNode;newBorder.style.top=elementY(ge('box_head_'+app_id))-10+'px';newBorder.style.left=elementX(ge('box_head_'+app_id))-10+'px';newBorder.style.width=box.offsetWidth+15+'px';newBorder.style.height=box.offsetHeight+30+'px';var newForm=document.createElement('form');newForm.style.position='relative';newForm.style.textalign='center';newForm.style.top=box.offsetHeight+'px';var keep_app=function(){var data={'profile_fbid':PROFILE_FBID,'app_id':app_id,'add':true};new AsyncRequest().setURI('/ajax/profile_boxes.php').setData(data).setHandler(function(){document.location=callback;}).send();};var _remove_app=function(){_remove_app_box_from_page(app_id);document.location=callback;};var keepButton=document.createElement('input');keepButton.type='button';keepButton.className='inputsubmit';keepButton.value=tx('prf30');keepButton.onclick=keep_app;var remButton=document.createElement('input');remButton.type='button';remButton.className='inputsubmit';remButton.value=tx('sh:remove');remButton.onclick=_remove_app;newForm.appendChild(keepButton);newForm.appendChild(remButton);newBorder.appendChild(newForm);DOMScroll.getScrollRoot().appendChild(newBorder);}
function _make_header_blue(id){var newBorder=document.createElement('div');newBorder.id='scroll_highlight_border';newBorder.className="box_highlight_outline";var box=$('box_head_'+id).parentNode;newBorder.style.top=elementY(ge('box_head_'+id))-10+'px';newBorder.style.left=elementX(ge('box_head_'+id))-10+'px';newBorder.style.width=box.offsetWidth+15+'px';newBorder.style.height=box.offsetHeight+5+'px';DOMScroll.getScrollRoot().appendChild(newBorder);var box_header=ge('box_head_'+id);}
function show_wall_tour(){CSS.toggleClass(ge('wall_tour'),'extended');$('wall_tour_link').innerHTML=(shown('wall_tour_extended')?tx('prf23'):tx('prf24'));toggle('wall_tour_extended');}
function write_on_your_own_wall(){CSS.toggleClass(ge('wall_tour'),'borderless_attachment');toggle('inline_wall_post');if(shown('inline_wall_post')){_animate_scroll_to_id('inline_wall_post')}}
var COLS_INDEX=['wide','narrow'];function toggle_profile_apps_link(force_more,force_less){for(var i=0;i<COLS_INDEX.length;i++){var toggle_boxes_link=ge('toggle_boxes_link_content_'+COLS_INDEX[i]);if(!force_less&&(toggle_boxes_link.className=='see_more_arrow'||force_more)){ProfileHiddenBoxes.singleton.ensureHiddenContents(null);toggle_boxes_link.className='see_less_arrow';toggle_boxes_link.innerHTML=tx('prf02');var hidden_portion=ge('hidden_apps_'+COLS_INDEX[i]);if(hidden_portion.childNodes.length){hidden_portion.style.display='block';if(PROFILE_FBID==PROFILE_OWNER_ID){show('more_apps_divider_'+COLS_INDEX[i]);}}}else{toggle_boxes_link.className='see_more_arrow';toggle_boxes_link.innerHTML=tx('prf01');hide('hidden_apps_narrow');hide('hidden_apps_wide');hide('more_apps_divider_'+COLS_INDEX[i]);}}}
function remove_profile_app_rooster(rooster_obj,moved_boxes){if(!rooster_obj){rooster_obj=ge('profile_rooster_notice');}
if(rooster_obj){if(moved_boxes){rooster_obj.className='profile_top_status';rooster_obj.innerHTML='<h2>'+tx('prf28')+'</h2><br>'+tx('prf29',{'edit_extended_profile_link':'<a href="#" onclick="edit_profile_expand_section_dialog(); return false">'+
tx('prf25')+'</a>'});}else{hide(rooster_obj);}}
save_box_orders();return false;}
function move_to_hidden(options_obj){function _move_app_to_more_section(app,col_str){var section=ge('hidden_apps_'+col_str);if(section.childNodes.length>0){section.insertBefore(app,section.firstChild);}else{section.appendChild(app);}}
function _move_app_to_display_section(app,col_str){var section=ge('moveable_'+col_str);section.appendChild(app);}
var i;var boxes_to_hide=[];var boxes_to_show=[];for(i=0;i<options_obj.childNodes.length;i++){var child_option=options_obj.childNodes[i];var inputs=child_option.getElementsByTagName('input');var j;for(j=0;j<inputs.length;j++){if(inputs[j].checked){boxes_to_hide.push(inputs[j].value);}else{boxes_to_show.push(inputs[j].value);}}}
var more_apps=Array();if(boxes_to_hide.length>0){for(j=boxes_to_hide.length-1;j>=0;j--){var app=ge('box_app_'+boxes_to_hide[j]);if(app.parentNode.id.indexOf('moveable')!=-1){var col=app.parentNode.id.replace('moveable_','');more_apps[col]=true;_move_app_to_more_section(app,col);}}}else{more_apps={'wide':false,'narrow':false};}
if(boxes_to_show.length>0){for(j=boxes_to_show.length-1;j>=0;j--){var app=ge('box_app_'+boxes_to_show[j]);if(app.parentNode.id.indexOf('hidden_apps_')!=-1){var col=app.parentNode.id.replace('hidden_apps_','');_move_app_to_display_section(app,col);}}}
for(col in more_apps){if(more_apps[col]==true){show('toggle_profile_apps_link_'+col);}else{hide('toggle_profile_apps_link_'+col);}}
save_box_orders();return false;}
var MAX_APPS_PER_COL=5;var SPECIAL_APPS={2719290516:1,2297529396:1,2327158227:1};function edit_profile_expand_section_dialog(){ProfileHiddenBoxes.singleton.ensureHiddenContents(function(){var dialog=new pop_dialog('app_expander_dialog');var options={'display':Array(),'hidden':Array()};var sections=[ge('moveable_wide'),ge('moveable_narrow'),ge('hidden_apps_wide'),ge('hidden_apps_narrow')];var section,list,app_id,i,j;var count_apps=0;for(i=0;i<sections.length;i++){section=sections[i];for(j=0;j<section.childNodes.length;j++){app_id=section.childNodes[j].id.replace('box_app_','');if(SPECIAL_APPS[app_id])continue;if(section.id.indexOf('moveable_')==0){options['display'][app_id]=$('title_app_'+app_id).innerHTML;}else{options['hidden'][app_id]=$('title_app_'+app_id).innerHTML;}}
count_apps+=j;}
var cols=1;if(count_apps>=MAX_APPS_PER_COL&&count_apps<=MAX_APPS_PER_COL*2){cols=2;}else if(count_apps>MAX_APPS_PER_COL*2){cols=3;}
var per_col=count_apps/cols;var edit_profile_expander=tx('prf27',{'count':count_apps})+'<br/><br/>';edit_profile_expander+='<div class="collapse_options clearfix" id="hide_expand_app_list">';edit_profile_expander+='<div class="column_'+cols+'">';j=0;for(option_type in options){var checked='';if(option_type=='hidden')checked=' checked="true"';for(app_id in options[option_type]){if(j>=per_col){edit_profile_expander+='</div><div class="column_'+cols+'">';j=0;}
if(parseInt(app_id)){edit_profile_expander+='<input type="checkbox" id="checkbox_app_id_'+app_id+'" class="inputcheckbox" value="'+app_id+'"'+checked+'/>'+'<label for="checkbox_app_id_'+app_id+'">'+options[option_type][app_id]+'</label><br/>';j++;}}}
edit_profile_expander+='</div></div>';dialog.show_choice(tx('prf25'),edit_profile_expander,tx('prf26'),function(){move_to_hidden(ge('hide_expand_app_list'));dialog.fade_out(100);},tx('sh:cancel-button'),function(){dialog.fade_out(100);});});}
function ProfileHiddenBoxes(){}
ProfileHiddenBoxes.prototype={ensureHiddenContents:function(onCompletedCallback){if(this.delayedBoxes&&!this.areContentFetched){var boxesToFetch=[];for(var i=0;i<this.delayedBoxes.length;i++){var delayed_box=this.delayedBoxes[i];if(delayed_box.section_html===undefined){boxesToFetch.push(delayed_box);}
else{var hidden_box_id='hidden_box_'+delayed_box.app_id;var hidden_box=ge(hidden_box_id);if(hidden_box){delayed_box.section_html=hidden_box.innerHTML;}}}
var hidden_box_container=ge('profile_hidden_htmls');if(hidden_box_container){hidden_box_container.parentNode.removeChild(hidden_box_container);}
if(boxesToFetch.length>0){var request=new AsyncRequest()
request.setURI('/ajax/profile_boxes_fetch.php');request.setData({owner_id:PROFILE_OWNER_ID,profile_boxes:JSON.encode(boxesToFetch)});request.setHandler(bind(this,function(asyncResponse){var payload=asyncResponse.payload;var style=payload.style;if(style){var style_container=ge('style_container_for_hidden_boxes');style_container.innerHTML='<span style="display:none">&nbsp;</span><style>'+style+'</style>';}
var htmls=payload.htmls;var length=this.delayedBoxes.length;for(var i=0;i<length;i++){var delayedBox=this.delayedBoxes[i];var appId=delayedBox.app_id;var section_html=htmls[appId];if(section_html!==undefined){delayedBox.section_html=section_html;}}
this.render(onCompletedCallback);}));request.setErrorHandler(bind(this,'onError'))
request.send();}
else{this.render(onCompletedCallback);}
this.areContentFetched=true;}
else{if(onCompletedCallback){onCompletedCallback();}}},onError:function(){Util.error('Sorry, profile box could not be loaded at this time. Please refresh');},render:function(onCompletedCallback){var length=this.delayedBoxes.length;var narrow_html='';var wide_html='';for(var i=0;i<length;i++){var delayedBox=this.delayedBoxes[i];if(delayedBox.section_html){if(delayedBox.profile_box_column==1){narrow_html+=delayedBox.section_html;}else{wide_html+=delayedBox.section_html;}}}
var hidden_apps_narrow=ge('hidden_apps_narrow');if(hidden_apps_narrow){set_inner_html(hidden_apps_narrow,narrow_html);}
var hidden_apps_wide=ge('hidden_apps_wide');if(hidden_apps_wide){set_inner_html(hidden_apps_wide,wide_html);}
var profile_loading_narrow=ge('profile_loading_narrow');if(profile_loading_narrow){profile_loading_narrow.parentNode.removeChild(profile_loading_narrow);}
var profile_loading_wide=ge('profile_loading_wide');if(profile_loading_wide){profile_loading_wide.parentNode.removeChild(profile_loading_wide);}
if(onCompletedCallback){window.setTimeout(function(){onCompletedCallback();},0);}},init:function(delayedBoxes){this.delayedBoxes=delayedBoxes;},areContentFetched:false,delayedBoxes:null}
ProfileHiddenBoxes.singleton=new ProfileHiddenBoxes();function NetworksController(element,id){element.onresponse=function(response){var data=response.getPayload().data;set_inner_html($("nwf_full"),data);}
element.onclick=function(){hide($("nwf_short"));show($("nwf_full"));new AsyncRequest().setURI('/ajax/profile_networks.php').setReadOnly(true).setData({profile_id:id}).setHandler(element.onresponse.bind(element)).send();return false;}}
function profile_log_friend_click(friend_ids,position){new AsyncSignal('/ajax/log_friends.php',{'friend_ids':friend_ids,'position':position}).send();return true;}
function profile_pic_cam_dialog(){var async=new AsyncRequest().setMethod('GET').setReadOnly(true).setURI('/camera/dialog.php?profile&ref=profile_no_photo');new Dialog().setAsync(async).setClassName('camera').setModal().show();}

var scrollDelay=null;var saved_message_timeout=null;var SCROLL_AMOUNT=10;var SCROLL_SPEED=50;var SCROLL_THRESHOLD=35;var SCROLL_MULTIPLIER=3;var SCROLL_DECAY=7;var MOVING_THRESHOLD=10;function _is_left_click(e){if(e.which==null){if(e.button<2)return true;}else{if(e.which<2)return true;}
return false;}
function track_moveable_box(header_obj,container_obj,possible_wide,possible_narrow){this.possible_wide=possible_wide;this.possible_narrow=possible_narrow;this.listContainer=container_obj;this.headerObj=header_obj;this.listContainer.onmousedown=function(e){return this._onclick(e?e:window.event);}.bind(this);}
track_moveable_box.prototype._onclick=function(e){this.clickMouseY=mouseY(e);this.clickMouseX=mouseX(e);if(!_is_left_click(e))return false;document.onselectstart=function(e){return false;};document.onmousemove=function(e){return this._track_move(e?e:window.event)}.bind(this);document.onmouseup=function(e){this._track_drop(e?e:window.event)}.bind(this);return false;}
track_moveable_box.prototype._track_move=function(e){if(Math.abs(mouseY(e)-this.clickMouseY)>MOVING_THRESHOLD||Math.abs(mouseX(e)-this.clickMouseX)>MOVING_THRESHOLD){var moveable=new moveable_box(this.listContainer,this.possible_wide,this.possible_narrow);moveable._onclick(null,this.clickMouseY,this.clickMouseX);this.headerObj.onclick=null;}}
track_moveable_box.prototype._track_drop=function(e){document.onmouseout=document.onmouseup=document.onmousemove=document.onclick=null;if(!this.headerObj.onclick){boxFlexToggle(this.listContainer);}}
function moveable_box(obj,possible_wide,possible_narrow){this.obj=obj;this.obj.possible_positions=new Array();this.obj.possible_positions['wide']=possible_wide;this.obj.possible_positions['narrow']=possible_narrow;this.obj.onmousedown=function(e){return this._onclick(e?e:window.event);}.bind(this);}
moveable_box.prototype._onclick=function(e,mouseY,mouseX){if(e&&!_is_left_click(e))return false;document.moving_box=this;document.isScrolling=false;this.cols=new Array();this.cols['wide']=ge('moveable_wide');this.cols['narrow']=ge('moveable_narrow');this.cols_y=new Array();this.cols_y['wide']=new Array();this.cols_y['narrow']=new Array();this.cols_y['wide']['top']=elementY(this.cols['wide']);this.cols_y['narrow']['top']=elementY(this.cols['wide']);this.cols_y['wide']['bottom']=this.cols_y['wide']['top']+this.cols['wide'].offsetHeight;this.cols_y['narrow']['bottom']=this.cols_y['narrow']['top']+this.cols['narrow'].offsetHeight;if(elementX(this.cols['narrow'])<elementX(this.cols['wide'])){this.target_left="narrow";this.container_left="moveable_narrow";this.target_right="wide";this.container_right="moveable_wide";}else{this.target_left="wide";this.container_left="moveable_wide";this.target_right="narrow";this.container_right="moveable_narrow";}
this.dividers=null;this.dividers_y=null;this.more_sections=null;if(ge('hidden_apps_wide')||ge('hidden_apps_narrow')){this.has_hidden_sections=true;var wide_div=ge('more_apps_divider_wide');var narrow_div=ge('more_apps_divider_narrow');this.dividers={'wide':{'obj':wide_div,'y':0},'narrow':{'obj':narrow_div,'y':0}};this.more_sections=new Array();this.more_sections={'wide':ge('hidden_apps_wide'),'narrow':ge('hidden_apps_narrow')};this.empty_state={'wide':null,'narrow':null};this.is_unhideable_box=SPECIAL_APPS[this.obj.id.replace('box_app_','')];if(this.obj.parentNode.id.indexOf('hidden_apps_')!=-1){this.is_unhideable_box=false;}
if(this.is_unhideable_box){toggle_profile_apps_link(false,true);}
if(ge('toggle_boxes_link_content_narrow')&&!this.is_unhideable_box){var more_arrow=ge('toggle_boxes_link_content_narrow');if(more_arrow.style.display!='none'&&more_arrow.className=='see_more_arrow'){this.more_sections_expanded=false;}else{this.more_sections_expanded=true;}
for(var i=0;i<COLS_INDEX.length;i++){var col=COLS_INDEX[i];if(!this.more_sections[col].childNodes.length){this.dividers[col]['obj'].style.display='block';var hidden_state=create_hidden_section_empty_state();this.more_sections[col].parentNode.insertBefore(hidden_state,this.more_sections[col]);this.empty_state[col]=hidden_state;}}
if(this.more_sections_expanded){this._merge_display_more_section();}}}
this.obj.position=get_obj_coordinates(this.obj);this.obj.old_col_id=this.obj.parentNode.id;this.obj.handle=this.obj.childNodes[1];this.cur_col_id=this.obj.old_col_id;this.col_index=this.cur_col_id.replace('moveable_','');CSS.addClass(this.obj,'floating_box');CSS.addClass(this.obj,'explicit_width_'+this.cur_col_id);this.obj.style.top=this.obj.position['top']+'px';this.obj.style.left=this.obj.position['left']+'px';this.mouseOffsetY=(mouseY?mouseY:mouseY(e))-this.obj.position['top'];this.mouseOffsetX=(mouseX?mouseX:mouseX(e))-this.obj.position['left'];var childNodes=this.obj.childNodes;this.childNodesClassOld=new Array();for(var i=0;i<childNodes.length;i++){this.childNodesClassOld[i]=childNodes[i].className;if(childNodes[i].id!='box_handle'){childNodes[i].className+=' float_opacity';}}
this.placeholder=document.createElement('div');this.placeholder.id="placeholder";this.placeholder.className='placeholder ph_'+this.obj.parentNodeid;this.placeholder.style.height=(200<(this.obj.offsetHeight-15)?200:(this.obj.offsetHeight-15))+'px';this.obj.parentNode.insertBefore(this.placeholder,this.obj);this._color_placeholder(this.col_index);this.obj.parentNode.parentNode.appendChild(this.obj);this.elements_y_side_col=this._get_elements_y(this.target_left,this.obj);this.elements_y_main_col=this._get_elements_y(this.target_right,this.obj);this.elements_x_threshold=elementX(this.cols[this.target_right]);this._calculate_divider_y();document.onmousemove=function(e){return this._move(e?e:window.event,0,0)}.bind(this);document.onmouseup=function(e){this._drop()}.bind(this);return false;}
function create_hidden_section_empty_state(){var empty_state=document.createElement('div');empty_state.className='hidden_section_empty_state';empty_state.innerHTML=tx('mb03');return empty_state;}
function print_elements_y(elements_y)
{var output=null;for(var i=0;i<elements_y.length;i++)
if(elements_y[i]!=null)
output=output+' '+elements_y[i]['top'];else
output=output+' null';}
moveable_box.prototype._get_elements_y=function(column_id){var col=this.cols[column_id];var elements=new Array();for(var i=0;i<col.childNodes.length;i++){if(col.childNodes[i].id=="placeholder"){this.obj.cur_index=i;}
elements[i]=new Array();elements[i]['top']=elementY(col.childNodes[i]);elements[i]['bottom']=elements[i]['top']+col.childNodes[i].offsetHeight;}
return elements;}
moveable_box.prototype._move=function(e){if(e){this.obj.mouse_left=mouseX(e);this.obj.position=get_obj_coordinates(this.obj,mouseY(e)-this.mouseOffsetY,mouseX(e)-this.mouseOffsetX);}
var windowScroll=false;if(document.isScrolling){if(pageScrollY()>0||this.scrollYAmount>0){this.obj.position=get_obj_coordinates(this.obj,this.obj.position['top']+this.scrollYAmount,this.obj.position['left']+this.scrollXAmount);windowScroll=true;}}
this._calculate_placeholder();this.obj.style.top=this.obj.position['top']+'px';this.obj.style.left=this.obj.position['left']+'px';if(windowScroll){window.scrollBy(this.scrollXAmount,this.scrollYAmount);}
var scrollDown=false;var distance_from_top=this.obj.position['top']-pageScrollY();var distance_from_bottom=pageScrollY()+getViewportHeight()-this.obj.position['top'];if((scrollDown=distance_from_bottom<=SCROLL_THRESHOLD)||distance_from_top<=SCROLL_THRESHOLD){clearTimeout(scrollDelay);document.isScrolling=true;var distance_from_edge=scrollDown?distance_from_bottom:distance_from_top;distance_from_edge=distance_from_edge<0?0:distance_from_edge;var distance_fraction=(1-(distance_from_edge*1.0)/SCROLL_THRESHOLD);var scrollY=Math.round(SCROLL_AMOUNT+SCROLL_AMOUNT*SCROLL_MULTIPLIER*power(distance_fraction,SCROLL_DECAY));this.scrollXAmount=0;this.scrollYAmount=scrollDown?scrollY:-1*scrollY;scrollDelay=window.setTimeout(function(){if(document.isScrolling){document.moving_box._move(null);}},SCROLL_SPEED);}else{document.isScrolling=false;}}
function power(x,y){if(x==0){return 0;}
var power=1;for(var i=0;i<y;i++){power*=x;}
return power;}
moveable_box.prototype._calculate_placeholder=function(){if(this.obj.mouse_left<this.elements_x_threshold){if(this.placeholder.parentNode.id!=this.container_left){this._move_placeholder_to_other_column(this.target_left,this.elements_y_side_col);}else{this._move_placeholder_in_column(this.elements_y_side_col);}}else{if(this.placeholder.parentNode.id!=this.container_right){this._move_placeholder_to_other_column(this.target_right,this.elements_y_main_col);}else{this._move_placeholder_in_column(this.elements_y_main_col);}}}
moveable_box.prototype._calculate_divider_y=function(){if(this.has_hidden_sections){this.dividers['wide']['y']=elementY(this.dividers['wide']['obj']);this.dividers['narrow']['y']=elementY(this.dividers['narrow']['obj']);}}
moveable_box.prototype._move_placeholder_in_column=function(elements_y){var oldIndex=null;var childIndex=null;var upperBounds=null;var outOfBounds=false;var top=false;if(this.obj.cur_index<elements_y.length-1){var next_object_top=elements_y[this.obj.cur_index+1]['top'];next_object_threshold=elements_y[this.obj.cur_index+1]['bottom']-100;upperBounds=next_object_top>next_object_threshold?next_object_top:next_object_threshold;}
if(this.has_hidden_sections&&!this.more_sections_expanded&&!this.is_unhideable_box){if(this._should_expand_more_section()){toggle_profile_apps_link(true);this._merge_display_more_section();this.more_sections_expanded=true;this.dividers['wide']['obj'].style.display='block';this.dividers['narrow']['obj'].style.display='block';this.elements_y_side_col=this._get_elements_y(this.target_left,this.obj);this.elements_y_main_col=this._get_elements_y(this.target_right,this.obj);return;}}
if(upperBounds!=null&&this.obj.position['top']>upperBounds&&in_window_bounds(upperBounds,30)){oldIndex=this.obj.cur_index;this.obj.cur_index+=1;childIndex=this.obj.cur_index+1;}else
if(this.obj.cur_index>0&&this.obj.position['top']<elements_y[this.obj.cur_index-1]['top']+
Math.min(40,elements_y[this.obj.cur_index-1]['bottom']-elements_y[this.obj.cur_index-1]['top']-5)){oldIndex=this.obj.cur_index;this.obj.cur_index--;childIndex=this.obj.cur_index;}else
if((top=this.obj.position['top']<(elementY(this.placeholder.parentNode)-150))){var message=tx('mb01');display_error_message(this.obj,message,this.obj.position['top']);}else{hide(has_child(this.obj,'floating_error'));}
if(oldIndex!=null){if(this.obj.cur_index<elements_y.length-1){this.placeholder.parentNode.insertBefore(this.placeholder,this.placeholder.parentNode.childNodes[childIndex]);}else{this.placeholder.parentNode.appendChild(this.placeholder);}
if(this.has_hidden_sections){if(this.dividers[this.col_index]['obj'].previousSibling&&this.dividers[this.col_index]['obj'].previousSibling==this.placeholder){this._make_placeholder_blue();this._calculate_divider_y();}
if(this.dividers[this.col_index]['obj'].nextSibling&&this.dividers[this.col_index]['obj'].nextSibling==this.placeholder){this._make_placeholder_gray();var empty_state=this.empty_state[this.col_index];if(empty_state){empty_state.parentNode.removeChild(empty_state);this.empty_state[this.col_index]=null;}
this._calculate_divider_y();}}
var col=this.placeholder.parentNode;elements_y[oldIndex]=new Array();elements_y[oldIndex]['top']=elementY(col.childNodes[oldIndex]);elements_y[oldIndex]['bottom']=elements_y[oldIndex]['top']+col.childNodes[oldIndex].offsetHeight;elements_y[this.obj.cur_index]=new Array();elements_y[this.obj.cur_index]['top']=elementY(this.placeholder);elements_y[this.obj.cur_index]['bottom']=elements_y[this.obj.cur_index]['top']+this.placeholder.offsetHeight;}}
moveable_box.prototype._should_expand_more_section=function(){var more_apps_y=elementY(ge('toggle_profile_apps_link_'+this.col_index));var should_move=(this.obj.position.bottom>more_apps_y+100||this.obj.position.top+50>more_apps_y);return should_move;}
moveable_box.prototype.check_column_bounds=function(column){col=column.id.replace("moveable_","");if((this.obj.position['top']<this.cols_y[col]['top']-50)||(column.nextSibling&&this.obj.position['top']>this.cols_y[col]['bottom']-50)||(!column.nextSibling&&!in_window_bounds(this.cols_y[col]['bottom'],20))){return true;}
return false;}
function display_saved_message(message,xPos,yPos){var saved_message=document.createElement('div');saved_message.className='saved_message';saved_message.innerHTML=message;saved_message.style.left=xPos+'px';saved_message.style.top=yPos+'px';saved_message.id='floating_saved_message';$('content').appendChild(saved_message);}
function display_error_message(obj,message,obj_top){var error_message=false;if(!(error_message=has_child(obj,'floating_error'))){error_message=document.createElement('div');error_message.id='floating_error';obj.insertBefore(error_message,obj.firstChild);}
if(!in_window_bounds(obj_top,50)&&obj_top>=pageScrollY()+getViewportHeight()-50){error_message.className='floating_error error_above';}else{error_message.className='floating_error error_below';}
error_message.innerHTML=message;show(error_message);}
function in_window_bounds(top,window_offset){if(top>pageScrollY()+window_offset&&top<pageScrollY()+getViewportHeight()-window_offset)
return true;return false;}
moveable_box.prototype._color_placeholder=function(col_index){if(this.has_hidden_sections){for(var i=0;i<this.cols[col_index].childNodes.length;i++){if(this.cols[col_index].childNodes[i]==this.dividers[col_index]['obj']){this._make_placeholder_gray();return;}
if(this.cols[col_index].childNodes[i]==this.placeholder){this._make_placeholder_blue();return;}}}}
moveable_box.prototype._make_placeholder_blue=function(){CSS.addClass(this.placeholder,'placeholder_blue');CSS.removeClass(this.placeholder,'placeholder_gray');this.placeholder.innerHTML='';}
moveable_box.prototype._make_placeholder_gray=function(){CSS.removeClass(this.placeholder,'placeholder_blue');CSS.addClass(this.placeholder,'placeholder_gray');this.placeholder.innerHTML=tx('mb04');}
moveable_box.prototype._move_placeholder_to_other_column=function(column_id,elements_y){if(this.obj.possible_positions[column_id]!=true){display_error_message(this.obj,tx('mb02'),this.obj.position['top']);return;}
hide(has_child(this.obj,'floating_error'));var col=this.cols[column_id];var index=0;for(var i=0;i<elements_y.length;i++){if(this.obj.position['top']&&this.obj.position['top']<=elements_y[i]['top']){if(this.obj.position['top']+150<=elements_y[i]['top']||!in_window_bounds(elements_y[i]['top'],20)){if(i==0){display_error_message(this.obj,tx('mb01'),this.obj.position['top']);}
return;}
else
break;}else index++;}
if(index==0&&col.childNodes.length==0){var column_top=elementY(this.cols[column_id]);if(this.obj.position['top']<column_top-30)
return;}
var lastChildBottom=elements_y.length>0?elements_y[elements_y.length-1]['bottom']:column_top;if(index<elements_y.length){col.insertBefore(this.placeholder,col.childNodes[index]);}else{col.appendChild(this.placeholder);}
this.elements_y_side_col=this._get_elements_y(this.target_left,this.obj);this.elements_y_main_col=this._get_elements_y(this.target_right,this.obj);this.cur_col_id='moveable_'+column_id;this.col_index=column_id;if(this.has_hidden_sections){this._calculate_divider_y();this._color_placeholder(column_id);}}
function has_child(element,child_id){for(var i=0;i<element.childNodes.length;i++){if(element.childNodes[i].id==child_id){return element.childNodes[i];}}
return false;}
function get_type_from_id(col_id){return col_id.replace('moveable_','');}
moveable_box.prototype._merge_display_more_section=function(){this.cols['wide'].appendChild(this.dividers['wide']['obj']);this.cols['narrow'].appendChild(this.dividers['narrow']['obj']);while(this.more_sections['wide'].firstChild){this.cols['wide'].appendChild(this.more_sections['wide'].firstChild);}
while(this.more_sections['narrow'].firstChild){this.cols['narrow'].appendChild(this.more_sections['narrow'].firstChild);}}
moveable_box.prototype._drop=function(){document.isScrolling=false;var switched_cols=this.cur_col_id!=this.obj.old_col_id;var cur_col_type=get_type_from_id(this.cur_col_id);var placeholderYPos=elementY(this.placeholder)+40;var placeholderXPos=elementX(this.placeholder)+(this.placeholder.offsetWidth-130)/2;this.obj.style.width=this.cols[cur_col_type].offsetWidth+'px';if(switched_cols){this.obj.style.height=this.placeholder.offsetHeight+'px';var box_content=null;var header=null;for(var i=0;i<this.obj.childNodes.length;i++){if(this.obj.childNodes[i].id&&this.obj.childNodes[i].id.indexOf('box_subheader_')==0){header=this.obj.childNodes[i];}else if(this.obj.childNodes[i].id&&this.obj.childNodes[i].id.indexOf('app_content_')==0){box_content=this.obj.childNodes[i];}}
if(header)header.innerHTML="";box_content.innerHTML=tx('sh:loading');new AsyncRequest().setURI('/ajax/profile_boxes.php').setMethod('POST').setData({'profile_fbid':PROFILE_FBID,'app_id':this.obj.id,'new_col_type':cur_col_type}).setHandler(function(resp){this.markup=(resp.getPayload()).markup;if(!this.markup){return;}
this.obj.style.height=null;set_inner_html(this.obj,this.markup);this.obj.parentNode.replaceChild(this.obj.firstChild,this.obj);}.bind(this)).send();}
if(error_message=has_child(this.obj,'floating_error')){error_message.parentNode.removeChild(error_message);}
var childNodes=this.obj.childNodes;for(var i=0;i<childNodes.length;i++){childNodes[i].className=this.childNodesClassOld[i];}
this.obj.handle.className='handle_invisible';CSS.removeClass(this.obj,'floating_box')
this.obj.style.top=null;this.placeholder.parentNode.replaceChild(this.obj,this.placeholder);if(this.has_hidden_sections&&this.more_sections_expanded){for(col in this.empty_state){if(this.empty_state[col]){this.empty_state[col].parentNode.removeChild(this.empty_state[col]);this.empty_state[col]=null;}}
this._separate_display_more_section();this._reset_more_links();}
save_box_orders();document.moving_box=false;this.obj.onmousedown=null;document.onmouseout=document.onmouseup=document.onmousemove=window.onscroll=null;}
moveable_box.prototype._reset_more_links=function(){for(var i=0;i<COLS_INDEX.length;i++){if(this.more_sections[COLS_INDEX[i]].childNodes.length){show('toggle_profile_apps_link_'+COLS_INDEX[i]);}else{hide('toggle_profile_apps_link_'+COLS_INDEX[i]);this.dividers[COLS_INDEX[i]]['obj'].style.display='none';}}}
moveable_box.prototype._separate_display_more_section=function(){while(this.dividers['wide']['obj'].nextSibling){this.more_sections['wide'].appendChild(this.dividers['wide']['obj'].nextSibling);}
this.cols['wide'].parentNode.insertBefore(this.dividers['wide']['obj'],this.more_sections['wide']);while(this.dividers['narrow']['obj'].nextSibling){this.more_sections['narrow'].appendChild(this.dividers['narrow']['obj'].nextSibling);}
this.cols['narrow'].parentNode.insertBefore(this.dividers['narrow']['obj'],this.more_sections['narrow']);this.more_sections['narrow'].style.display='';this.more_sections['wide'].style.display='';}
function handle(obj,col_id,allow_both){if((obj.parentNode.parentNode.id=='moveable_narrow'||obj.parentNode.parentNode.id=='moveable_wide')&&!document.moving_box){this.obj=obj;var arrow_class=(allow_both?'movearrow':'updownarrow');this.obj.nextSibling.className='handle_'+col_id+' handle '+arrow_class;this.obj.onmouseout=function(e){return this._removearrow(e?e:window.event);}.bind(this);}}
handle.prototype._removearrow=function(){if(this.obj.parentNode.parentNode.id=='moveable_narrow'||this.obj.parentNode.parentNode.id=='moveable_wide')
this.obj.nextSibling.className='handle_invisible';}
function get_obj_coordinates(obj,y,x){if(y==null&&x==null){y=elementY(obj);x=elementX(obj);}
return{'top':y,'bottom':y+obj.offsetHeight,'left':x,'right':x+obj.offsetWidth};}

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