/*    HTTP Host:  b.static.ak.fbcdn.net                                        */
/*    Generated:  February 9th 2010 10:32:05 AM PST                            */
/*      Machine:  10.16.140.107                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/7pi4hdgq6lc0880s.pkg.js r142676                           */
/*       Locale:  id_ID                                                        */
/*         Path:  js/7pi4hdgq6lc0880s.pkg.js                                   */

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


function pymkGrid(grid_id,show_explanation){copy_properties(this,{used_ids:[],boxes_displayed:0,payload_timeouts:0,grid_id:null,pymk_more_link:null,show_explanation:null});if(grid_id&&ge(grid_id)){this.show_explanation=!!show_explanation;this.grid_obj=$(grid_id);var id_divs=DOM.scry(this.grid_obj,'div.friend_grid_col');for(var i=0;i<id_divs.length;i++){this.used_ids.push(parseInt(id_divs[i].getAttribute('id').substring(3)));this.boxes_displayed++;}
var more_link=DOM.scry(this.grid_obj,'a.show_more');if(more_link){this.pymk_more_link=more_link[0];}}else{Util.error('pymkGrid: Either the grid you have specified is invalid or is not detectable in the DOM.');}}
copy_properties(pymkGrid.prototype,{addFriend:function(uid,page){this.modifyFriendship(uid,'add',null,page);return;},hideFriend:function(uid,page,pymk_score,is_from_whitelist){this.modifyFriendship(uid,'blacklist',null,page,pymk_score,is_from_whitelist);return;},modifyFriendship:function(uid,action_type,home_panel,page,pymk_score,is_from_whitelist){var friend_data=this.getGridData($('fg_'+uid));this._removeID(uid);var asyncData={used:this.used_ids,replace:uid,get:1,explanation:this.show_explanation,page:page};if(action_type=='blacklist'){asyncData.blacklist=true;asyncData.blacklist_type='blacklist';asyncData.pymk_score=pymk_score;asyncData.is_from_whitelist=is_from_whitelist;}
new AsyncRequest().setURI('/ajax/friend_guess.php').setData(asyncData).setHandler(bind(this,this.asyncHandleModify)).send();var friend_box=$('fg_'+uid);animation(friend_box).from('opacity',1).to('opacity',0).duration(300).go();if(home_panel){home_panel.addTo('outgoing',home_panel.constructGridItem(friend_data));}
return;},asyncHandleRefresh:function(async){payload=async.getPayload();if(payload.victim&&payload.victim.length>0){for(var i=0;i<payload.victim.length;i++){if(this.used_ids[i]){animation($('fg_'+this.used_ids[i])).from('opacity',1).to('opacity',0).duration(300).go();}}
for(var i=0;i<payload.victim.length;i++){if(this.used_ids[i]){this.replaceItem(this.used_ids[i],payload.victim[i]);}}
for(var i=0;i<payload.victim.length;i++){this.used_ids.unshift(payload.victim[i].uid);}}
if(!payload.more){this._hideMoreLink();}},asyncHandleModify:function(async){payload=async.getPayload();if(payload.victim&&payload.victim.length>0){this.replaceItem(payload.replace,payload.victim[0]);}else{this.hideItem(payload.replace);}
return;},replaceItem:function(replace,victim){var replace_id='fg_'+replace;var box_id='fg_'+victim.uid;if(!ge(box_id)){$(replace_id).setAttribute('id',box_id);$(box_id).innerHTML=victim.box_content;animation($(box_id)).from('opacity',0).to('opacity',1).duration(400).go();this.used_ids.push(victim.uid);}else{this.hideItem(replace);}},hideItem:function(replace){this.payload_timeouts++;var replace_id='fg_'+replace;var anim=null;var suggestions=$$('#home_sidebar .sidebar_item.pymk');if(1==suggestions.length&&1==$$('#pymk_ajax_grid .friend_grid_row').length){anim=animation(suggestions[0]);}else{hide('fg_add_'+replace);$(replace_id).unreplaceable=true;var pymkRow=$(replace_id).parentNode;var collapseRow=true;for(var i=0;i<pymkRow.childNodes.length;i++){if(!pymkRow.childNodes[i].unreplaceable){collapseRow=false;break;}}
if(collapseRow){anim=animation(pymkRow).ondone(DOM.remove.bind(null,pymkRow));}}
if(anim){anim.to('height',0).duration(550).hide().ease(animation.ease.end).go();}
this._hideMoreLink();},constructGridItem:function(grid_data){return this.constructRawGridItem(grid_data.uid,grid_data.content);},constructRawGridItem:function(uid,item_content){var gridItem=document.createElement('div');CSS.addClass(gridItem,'friend_grid_col');gridItem.setAttribute('id','friend_'+uid);gridItem.innerHTML=item_content;return gridItem;},getGridData:function(grid_object){if(CSS.hasClass(grid_object,'friend_grid_col')){var gridData={content:grid_object.innerHTML,uid:grid_object.getAttribute('id').toString().slice(3)}
return gridData;}},_removeID:function(uid){for(var i=0;i<this.used_ids.length;i++){if(this.used_ids[i]==uid){this.used_ids.splice(i,1);}}
return;},_hideMoreLink:function(){if(this.pymk_more_link){this.pymk_more_link.style.visibility='hidden';this.pymk_more_link=null;}}});function pymk_add_friend(uid,has_explanation,existingGrid,page){if(!existingGrid){existingGrid=new pymkGrid('pymk_ajax_grid',has_explanation||false);}
existingGrid.addFriend(uid,page);}
function pymk_hide_friend(uid,has_explanation,existingGrid,page,pymk_score,is_from_whitelist){if(!existingGrid){existingGrid=new pymkGrid('pymk_ajax_grid',has_explanation);}
if(!pymk_score){pymk_score=-1;}
if(!is_from_whitelist){is_from_whitelist=0;}
existingGrid.hideFriend(uid,page,pymk_score,is_from_whitelist);}

var FriendListManagerBootstrap={FRIEND_LISTS_CHANGED:'flm_friend_lists_changed',bootstrap:function(selectedList){var data={};if(selectedList){data['selected_list']=selectedList;}
var async=new AsyncRequest().setMethod('GET').setData(data).setReadOnly(true).setURI('/ajax/friend_lists/manager.php');new Dialog().setAsync(async).setButtons(Dialog.OK).setModal().show();return false;}}

var HomepageBookmarks={appIDs:{},numShown:6,init:function(appIDs){this._initSortables(appIDs);if(typeof ApplicationDock!=='undefined'){var arbiterToken=Arbiter.subscribe(ApplicationDock.BOOKMARKS_CHANGED,this._bookmarksChanged.bind(this));onunloadRegister(Arbiter.unsubscribe.bind(Arbiter,arbiterToken));}},_initSortables:function(appIDs){var extendedAppIDs=[];this.sortableGroupRoot=$('home_bookmarked_apps');if(appIDs.length>this.numShown){extendedAppIDs=appIDs.slice(this.numShown);appIDs=appIDs.slice(0,this.numShown);}
this.sortableGroup=new SortableGroup();if(extendedAppIDs.length){this.extendedSortableGroup=new SortableGroup();this.sortableGroup.link(this.extendedSortableGroup);this.extendedSortableGroupRoot=$('home_bookmarked_apps_more');}
this.sortableGroup.setLinkJumpHandler(this._onsortableLinkJump.bind(this));this._setupSortables(this.sortableGroup,appIDs);if(extendedAppIDs.length){this._setupSortables(this.extendedSortableGroup,extendedAppIDs);}
this.sortableGroup.setOrderChangeHandler(this._saveBookmarksOrder.bind(this));if(extendedAppIDs.length){this.extendedSortableGroup.setOrderChangeHandler(this._saveBookmarksOrder.bind(this));}},_setupSortables:function(sortableGroup,appIDs){for(var i=0;i<appIDs.length;i++){var appID=appIDs[i];var obj=$('bookmarked_app_'+appID);var handle=DOM.scry(obj,'a')[0];sortableGroup.addSortable(appID,obj,handle);if(typeof(handle)!='undefined'){handle.listen('click',this._onclickHandler);}
this.appIDs[appID]=obj;}},_onclickHandler:function(event){if(this.activeDrag){return Event.kill(event);}},_onsortableLinkJump:function(key){var order=this.sortableGroup.getOrder(),migrateKey=null;if(order.length>this.numShown){for(var i=order.length-1;i>=0;i--){if(order[i]!=key){migrateKey=order[i];break;}}
this.extendedSortableGroupRoot.insertBefore(this.appIDs[migrateKey],this.extendedSortableGroupRoot.firstChild);this.extendedSortableGroup.migrateLinkedSortable(migrateKey);}else if(order.length<this.numShown){order=this.extendedSortableGroup.getOrder();for(var i=0;i<order.length;i++){if(order[i]!=key){migrateKey=order[i];break;}}
DOM.appendContent(this.sortableGroupRoot,this.appIDs[migrateKey]);this.sortableGroup.migrateLinkedSortable(migrateKey);}},_getCurrentOrder:function(){var order=this.sortableGroup.getOrder();if(this.extendedSortableGroup){order=order.concat(this.extendedSortableGroup.getOrder());}
return mapToInt(order);},_saveBookmarksOrder:function(){var order=this._getCurrentOrder();new AsyncRequest().setURI('/ajax/edit_app_settings.php').setData({reorder_bookmarks:1,app_ids:order}).setHandler(bagofholding).send();},_bookmarksChanged:function(type,data){var newList=data.applications;var currentList=this._getCurrentOrder();if(are_equal(newList,currentList)){return;}
new AsyncRequest().setURI('ajax/home/refresh_bookmarks.php').setMethod('GET').setReadOnly(true).setHandler(this._asyncHandler.bind(this,newList)).setOption('suppressErrorHandlerWarning',true).send();},_asyncHandler:function(appIDs,asyncResponse){var payload=asyncResponse.getPayload();this.sortableGroup.destroy();if(this.extendedSortableGroup){this.extendedSortableGroup.destroy();}
set_inner_html($('home_bookmarks_container'),payload.markup);this._initSortables(appIDs);},toggle:function(){if($('more_bookmarks').offsetHeight>1){animation($('homepage_bookmarks_show_more')).to('height','auto').from('0px').to('opacity',1).from(0).blind().show().duration(300).ease(animation.ease.end).go();animation($('more_bookmarks')).to('height','0px').to('opacity',0).from(1).blind().hide().ease(animation.ease.end).duration(300).go();}else{animation($('homepage_bookmarks_show_more')).to('height','0px').to('opacity',0).from(1).blind().hide().duration(10).go();animation($('more_bookmarks')).to('height','auto').from('0px').to('opacity',1).from(0).blind().show().ease(animation.ease.end).duration(300).go();}}}
var HomepageFriendLists={init:function(){this.scrollarea_id='feed_header_section_friend_lists';this.content_id='feed_content_section_friend_lists';var arbiterToken=Arbiter.subscribe(FriendListManagerBootstrap.FRIEND_LISTS_CHANGED,this._onFriendListSave.bind(this));onunloadRegister(Arbiter.unsubscribe.bind(Arbiter,arbiterToken));},_onFriendListSave:function(type,data){new AsyncRequest().setURI('/ajax/home/refresh_friendlists.php').setMethod('GET').setReadOnly(true).setHandler(this._asyncHandler.bind(this)).setOption('suppressErrorHandlerWarning',true).send();},_asyncHandler:function(asyncResponse){var payload=asyncResponse.getPayload();set_inner_html($(this.content_id),payload.markup);if(typeof ScrollArea!=='undefined'){ScrollArea.getInnerInstance(this.scrollarea_id).update();}}};function clearFriendFinder(){AsyncRequest.pingURI('ajax/hide_prefs_ajax.php',{'e':'home_friend_finder','h':1},false);hide('findfriends');return false;}
function show_event_rsvp_dialog(update_id,eid,status,join){var title=(join?_tx("Tambahkan ke Acara Saya"):_tx("Konfirmasi Kehadiran"));var att_sel=(status=='Attending'?' checked="checked"':'');var maybe_sel=(status=='Maybe Attending'?' checked="checked"':'');var not_sel=(status=='Not Attending'?' checked="checked"':'');var error_id='rsvp_error_'+eid;var body='<div class="rsvp_buttons clearfix">'
+'<div><input type="radio" name="rsvp" value="Attending" id="rsvp_att_'+eid+'"'+att_sel+' />'
+'<label for="rsvp_att_'+eid+'">'+_tx("Menghadiri")+'</label></div>'
+'<div><input type="radio" name="rsvp" value="Maybe Attending" id="rsvp_maybe_'+eid+'"'+maybe_sel+' />'
+'<label for="rsvp_maybe_'+eid+'">'+_tx("Mungkin Hadir")+'</label></div>'
+'<div><input type="radio" name="rsvp" value="Not Attending" id="rsvp_not_'+eid+'"'+not_sel+' />'
+'<label for="rsvp_not_'+eid+'">'+_tx("Tidak Hadir")+'</label></div>'
+'<input type="hidden" name="eid" value="'+eid+'" />'
+'</div>'
+'<div id="'+error_id+'" style="display:none;"><div id="error">'+_tx("Silakan pilih opsi Konfirmasi Kehadiran.")+'</div></div>';var rsvp_handler=function(update_id,eid,join,error_id,button){var rsvp_response_handler=function(update_id,asyncResponse){payload=asyncResponse.payload;if(payload){ge(update_id).innerHTML=payload;}}.bind(null,update_id);var el_att=ge('rsvp_att_'+eid);var el_maybe=ge('rsvp_maybe_'+eid);var el_not=ge('rsvp_not_'+eid);var rsvp;if(el_att.checked){rsvp=el_att.value;}else if(el_maybe.checked){rsvp=el_maybe.value;}else if(el_not.checked){rsvp=el_not.value;}else{ge(error_id).style.display='block';return false;}
var data={'eid':eid,'rsvp':rsvp};if(join){data['join']=1;}
new AsyncRequest().setURI('/ajax/event_actions_ajax.php').setData(data).setHandler(rsvp_response_handler).send();}.bind(null,update_id,eid,join,error_id);var label=(join?_tx("Tambahkan"):_tx("Konfirmasi Kehadiran"));new Dialog().setTitle(title).setBody(body).setButtons([{name:'rsvp',label:label,handler:rsvp_handler},Dialog.CANCEL]).show();}
function calendar_fuzzy_time_change(){if(this.value=='more'){goURI('/calendar/?specific_time');}}
function feedback_async_handler(story_id,asyncResponse){var payload=asyncResponse.getPayload();if(payload.html){var story_el=ge(story_id);if(story_el){var wrapper_id=story_id+'__wrapper';var wrapper_el=ge(wrapper_id);if(!wrapper_el){wrapper_el=document.createElement('div');wrapper_el.id=wrapper_id;story_el.parentNode.insertBefore(wrapper_el,story_el);}
wrapper_el.innerHTML=payload.html;}}}
function feedback_add_friend_to_pri_bucket(pri,friend_id,story_id,link_data_str){new AsyncRequest().setURI('/ajax/feedprefs_ajax.php').setData({'cls':pri,'id':friend_id,'shift':1,'home':1,'lds':link_data_str}).setMethod('POST').setHandler(feedback_async_handler.bind(null,story_id)).send();}
function feedback_modify_event_weight(event_type,up_down,story_id,link_data_str){new AsyncRequest().setURI('/ajax/feedprefs_ajax.php').setData({'et':event_type,'updown':up_down,'home':1,'lds':link_data_str}).setMethod('POST').setHandler(feedback_async_handler.bind(null,story_id)).send();}

function HomeFeed(newestStoryTime,oldestStoryTime,autoRefresh,tabset,tabIds,nonTabId,logMode,showLogModeOption,embeddedWidget){HomeFeed.instance=this;this.resetState();this.oldestStoryTime=oldestStoryTime||0;this.newestStoryTime=newestStoryTime||0;this.lastNewestStoryTime=0;this.lastLocalNewestTime=(new Date()).getTime();this.cdnTimeSyncFrequency=0;this.submenuShown=false;this.requestCount=0;this.akamaiRequestCount=0;this.akamaiTotalLatency=0;this.akamaiTotalStories=0;this.sendTime=0;this.requestLastSeen=0;this.currentDelay=HomeFeed.defaultDelay;this.supportsCdn=false;this.enableLoadtestCdn=false;this.logModeOptionShown=showLogModeOption;this.logMode=logMode;this.resetRefreshCount();this.setAutoRefresh(autoRefresh);this.tabset=tabset;this.nonTabId=nonTabId;this.tabIds=tabIds;this.timerHandle=null;this.newStoriesClass=null;this.widgetAppId=null;this.widgetApiKey=null;this.feedbackTargets={};this.gmtOffsetMinutes=null;this.liveCommentUpdating=false;this.maxStoriesInDom=null;this.suspendCdnTillAfterRequestNum=0;this.showLoggedOutError=true;this.embeddedWidget=embeddedWidget;this.widgetLocale=null;if(this.embeddedWidget){LinkController.registerHandler(HomeFeed.newWindowLinkController);}
PageTransitions.registerHandler(HomeFeed.pageTransitionHandler);}
HomeFeed.getInstance=function(){return HomeFeed.instance;}
HomeFeed.defaultDelay=10*1000;HomeFeed.inactiveDelay=300*1000;HomeFeed.defaultRefreshes=90;HomeFeed.intermittentDelay=7*1000;HomeFeed.LOC_REPLACE=1;HomeFeed.LOC_PREPEND=2;HomeFeed.LOC_APPEND=3;HomeFeed.TAB_TOP_STORIES=1;HomeFeed.TAB_LIVE_FEED=2;HomeFeed.TAB_STATUS=3;HomeFeed.TAB_PHOTOS=4;HomeFeed.TAB_POSTED_ITEMS=5;HomeFeed.TAB_LIVEWIDGET_FRIENDS=7;HomeFeed.TAB_LIVEWIDGET_EVERYONE=8;HomeFeed.pageTransitionHandler=function(uri){var inst=HomeFeed.getInstance();if(uri.getPath()=='/home.php'||uri.getPath()=='/widgets/livefeed.php'){var query=uri.getQueryData();if(inst){inst.clearFeedbackTargets();if('logged_out'in query||'login'in query){return false;}
if('tab'in query){inst.resetState();inst.setTab(query.tab);if(query.tab==HomeFeed.TAB_LIVE_FEED){inst.setAutoRefresh(true);inst.showLogModeOption(true);inst.refreshLogMode(inst.logMode);}else if(query.tab==HomeFeed.TAB_LIVEWIDGET_FRIENDS||query.tab==HomeFeed.TAB_LIVEWIDGET_EVERYONE){inst.setAutoRefresh(true);}else{inst.refreshLogMode(false);}
if(inst.tabset){inst.tabset.selectTab(inst.tabIds[query.tab]);}
if(inst.nonTabId){CSS.removeClass($(inst.nonTabId),'HomeFeed_selected');}
inst.refresh(HomeFeed.LOC_REPLACE,{'new_request':1},true,true);return true;}else{var app=query.app_id||0;var friendList=query.fl||0;if(app||friendList){if(inst.tabset){inst.tabset.unselect();}
if(inst.nonTabId){CSS.addClass($(inst.nonTabId),'HomeFeed_selected');}
inst.resetState();inst.refreshLogMode(false);inst.showLogModeOption(false);if(app){inst.setApp(app);}
if(friendList){inst.setFriendList(friendList);}
inst.refresh(HomeFeed.LOC_REPLACE,{'new_request':1},true,true);return true;}}}}
return false;}
HomeFeed.newWindowLinkController=function(link){var uri=new URI(link.href);var path=uri.getPath();if(path!='/home.php'&&path!='/widgets/livefeed.php'&&path!='/logout.php'){window.open(uri);return false;}
return true;}
HomeFeed.setDefaultRefreshes=function(refreshes){HomeFeed.defaultRefreshes=refreshes;}
HomeFeed.prototype.openLiveWidgetLoginPopup=function(loginUrl){if(!loginUrl){loginUrl='/login.php';}
var uri=new URI(loginUrl);uri.addQueryData({'api_key':this.widgetApiKey,'fbconnect':1,'iframe_widget':1});var target='iframe_widget_login';var args='toolbar=0,status=0,resizable=0,width=500,height=430';window.open(uri.toString(),target,args);}
HomeFeed.prototype.resetState=function(){this.apps=[];this.friendLists=[];this.tabId=null;this.oldestStoryTime=0;this.newestStoryTime=0;this.lastNewestStoryTime=0;if(this.timerSet){clearTimeout(this.timerHandle);}
this.timerSet=false;this.timerHandle=null;this.storyQueue=[];this.queueTimerHandle=null;this.newStoriesClass=null;this.supportsCdn=false;this.clearStoryQueue();this.resetRefreshCount();this.setAutoRefresh(false);return this;}
HomeFeed.prototype.resetRefreshCount=function(){this.currentRefreshes=HomeFeed.defaultRefreshes;return this;}
HomeFeed.prototype.setLogMode=function(status,fireSignal){this.logMode=status;this.refreshLogMode(status);if(fireSignal){var data={'log_mode_pref':status?1:0,'log_mode_save':1};new AsyncSignal('/ajax/feedprefs_ajax.php',data).send();}
return this;}
HomeFeed.prototype.refreshLogMode=function(logModeStatus){var wrapperEl=$('newsfeed_wrapper');if(logModeStatus){CSS.addClass(wrapperEl,'log_mode');CSS.removeClass(wrapperEl,'full_mode');}else{CSS.addClass(wrapperEl,'full_mode');CSS.removeClass(wrapperEl,'log_mode');}
return this;}
HomeFeed.prototype.addApp=function(appId){if(appId){if(this.apps.indexOf(appId)==-1){this.apps.push(appId);}}
return this;}
HomeFeed.prototype.removeApp=function(appId){if(this.apps.indexOf(appId)!=-1){this.apps.remove(appId);}
return this;}
HomeFeed.prototype.clearApps=function(){if(this.apps.length>0){this.apps=[];}
return this;}
HomeFeed.prototype.setApp=function(appId){this.clearApps().addApp(appId);return this;}
HomeFeed.prototype.setWidgetApp=function(appId){this.widgetAppId=appId;return this;}
HomeFeed.prototype.setWidgetApiKey=function(widgetApiKey){this.widgetApiKey=widgetApiKey;return this;}
HomeFeed.prototype.addFriendList=function(flId){if(this.friendLists.indexOf(flId)==-1){this.friendLists.push(flId);}
return this;}
HomeFeed.prototype.removeFriendList=function(flId){if(this.friendLists.indexOf(flId)!=-1){this.friendLists.remove(flId);}
return this;}
HomeFeed.prototype.clearFriendLists=function(){this.friendLists=[];return this;}
HomeFeed.prototype.setFriendList=function(flId){this.clearFriendLists().addFriendList(flId);return this;}
HomeFeed.prototype.setTab=function(tabId){this.tabId=tabId;return this;}
HomeFeed.prototype.getTab=function(){return this.tabId;}
HomeFeed.prototype.clearTab=function(){this.tabId=null;return this;}
HomeFeed.prototype.setLiveCommentUpdating=function(enabled){this.liveCommentUpdating=enabled;return this;}
HomeFeed.prototype.setWidgetLocale=function(widgetLocale){this.widgetLocale=widgetLocale;return this;}
HomeFeed.prototype.setReloadVersion=function(reloadVersion){this.reloadVersion=reloadVersion;return this;}
HomeFeed.prototype.setGmtOffsetMinutes=function(offset){this.gmtOffsetMinutes=offset;return this;}
HomeFeed.prototype.registerfeedbackTarget=function(itemId,targetFbid,actor,typeId,assocObjId,commentsHash,hasHiddenComments){var feedbackTarget={'item_id':itemId,'target_fbid':targetFbid,'actor':actor,'type_id':typeId,'assoc_obj_id':assocObjId,'comments_hash':commentsHash,'has_hidden_comments':hasHiddenComments};var key=itemId+':'+targetFbid;this.feedbackTargets[key]=feedbackTarget;return this;}
HomeFeed.prototype.clearFeedbackTargets=function(){this.feedbackTargets={};return this;}
HomeFeed.prototype.updatefeedbackTargetHash=function(itemId,targetFbid,newCommentsHash){var key=itemId+':'+targetFbid;if(this.feedbackTargets[key]){this.feedbackTargets[key]['comments_hash']=newCommentsHash;}
return this;}
HomeFeed.prototype.updateFeedbackTargetHiddenStatus=function(itemId,targetFbid,hasHidden){var key=itemId+':'+targetFbid;if(this.feedbackTargets[key]){this.feedbackTargets[key]['has_hidden_comments']=hasHidden;}
return this;}
HomeFeed.prototype.updateCommentsFromPayload=function(comments_payload,source){for(var i=0;i<comments_payload.length;i++){var modified_target=comments_payload[i];var item_id=modified_target.item_id;var target_fbid=modified_target.target_fbid;feedcomment_sync_with_markup(target_fbid,item_id,modified_target.markup,modified_target.comment_count,source);this.updatefeedbackTargetHash(item_id,target_fbid,modified_target.comments_hash);}}
HomeFeed.prototype.getFeedbackTargets=function(){return this.feedbackTargets;}
HomeFeed.prototype.showSubmenu=function(text){set_inner_html($('newsfeed_submenu_content'),text);if(!this.submenuShown){$('newsfeed_submenu').removeClass('hidden_elem');}
this.submenuShown=true;this.refreshLogModeOption();return this;}
HomeFeed.prototype.hideSubmenu=function(){if(this.submenuShown){$('newsfeed_submenu').addClass('hidden_elem');}
this.submenuShown=false;return this;}
HomeFeed.prototype.showLogModeOption=function(status){this.logModeOptionShown=status;return this;}
HomeFeed.prototype.refreshLogModeOption=function(){var logModeOptionEl=ge('newsfeed_submenu_log_mode_option');var logModeSelectedClass='log_mode_selected';var newsfeed_submenu_headlines_only=ge('newsfeed_submenu_headlines_only');var newsfeed_submenu_full_stories=ge('newsfeed_submenu_full_stories');if(newsfeed_submenu_headlines_only&&newsfeed_submenu_full_stories){if(this.logMode){newsfeed_submenu_headlines_only.addClass(logModeSelectedClass);newsfeed_submenu_full_stories.removeClass(logModeSelectedClass);}else{newsfeed_submenu_headlines_only.removeClass(logModeSelectedClass);newsfeed_submenu_full_stories.addClass(logModeSelectedClass);}}
if(logModeOptionEl){if(this.logModeOptionShown){logModeOptionEl.removeClass('hidden_elem');}else{logModeOptionEl.addClass('hidden_elem');}}
return this;}
HomeFeed.prototype.loadOlder=function(){var extraData={'oldest':this.oldestStoryTime};this.refresh(HomeFeed.LOC_APPEND,extraData,true,false);return this;}
HomeFeed.prototype.loadNewer=function(){var extraData={'newest':this.newestStoryTime};if(this.supportsCdn){if(this.newestStoryTime==this.lastNewestStoryTime){var now=(new Date()).getTime();var delta=parseInt((now-this.lastLocalNewestTime)/1000);this.newestStoryTime+=delta;this.lastLocalNewestTime=now;}
this.lastNewestStoryTime=this.newestStoryTime;}
this.refresh(HomeFeed.LOC_PREPEND,extraData,false,false);return this;}
HomeFeed.prototype.setCdnTimeSyncFrequency=function(frequency){this.cdnTimeSyncFrequency=parseInt(frequency);return this;}
HomeFeed.prototype.temporarilySuspendCdn=function(numRequests){this.suspendCdnTillAfterRequestNum=this.requestCount+numRequests;return this;}
HomeFeed.prototype.isCdnEnabled=function(){var enabled=this.supportsCdn&&this.requestCount>this.suspendCdnTillAfterRequestNum;return enabled;}
HomeFeed.prototype.syncNewestStoryTime=function(loadTest){var postData={};postData['widget_app_id']=this.widgetAppId;if(loadTest){postData['load_test']=true;}
postData['ak_r_ct']=this.akamaiRequestCount;if(this.akamaiRequestCount>0){postData['ak_av_lat']=parseInt(this.akamaiTotalLatency/this.akamaiRequestCount);postData['ak_av_stor']=parseInt(this.akamaiTotalStories/this.akamaiRequestCount);}
this.akamaiRequestCount=0;this.akamaiTotalLatency=0;this.akamaiTotalStories=0;var updateTimeHandler=function(asyncReponse){var payload=asyncReponse.getPayload();if(payload&&'lastestTime'in payload){this.newestStoryTime=parseInt(payload['lastestTime']);this.lastLocalNewestTime=(new Date()).getTime();}
if(payload&&'cdnSyncFrequency'in payload){this.setCdnTimeSyncFrequency(payload['cdnSyncFrequency']);}};var noopHandler=function(asyncReponse){};var async=new AsyncRequest().setReadOnly(true).setOption('retries',0).setMethod('GET').setData(postData).setHandler(bind(this,updateTimeHandler)).setErrorHandler(noopHandler).setTransportErrorHandler(noopHandler).setURI('/ajax/live_feed_last_action.php').send();}
HomeFeed.prototype.loadMore=function(story_keys){var extraData={'story_keys':story_keys};this.refresh(HomeFeed.LOC_APPEND,extraData,false,false);return this;}
HomeFeed.prototype.autoRefreshFire=function(){this.timerSet=false;this.timerHandle=null;if(!this.autoRefresh){return;}
this.loadNewer();}
HomeFeed.prototype.autoRefreshHandler=function(){if(!this.autoRefresh||this.timerSet||!this.currentDelay){return;}
var delay=this.currentDelay;if(this.currentRefreshes<=0){delay=HomeFeed.inactiveDelay;}else{this.currentRefreshes--;}
if(!this.supportsCdn){delay=parseInt(delay*(0.75+0.5*Math.random()));}
this.timerSet=true;this.timerHandle=setTimeout(this.autoRefreshFire.bind(this),delay);}
HomeFeed.prototype.setAutoRefresh=function(status){if(!status&&this.timerSet){clearTimeout(this.timerHandle);this.timerHandle=null;}
this.autoRefresh=status;this.autoRefreshHandler();return this;}
HomeFeed.prototype.refresh=function(location,extraData,showIndicator,isTransition){var isAutoRefresh=this.autoRefresh;location=location||HomeFeed.LOC_REPLACE;showIndicator=(showIndicator===undefined)?true:showIndicator;isTransition=isTransition||false;var animOnDone=function(animObj){if(showIndicator&&!ge('feed_loading_image')){var loadEl=document.createElement('img');loadEl.src="/images/loaders/indicator_blue_large.gif";loadEl.id="feed_loading_image";var wrapperEl=$('newsfeed_wrapper');if(location==HomeFeed.LOC_APPEND){wrapperEl.parentNode.appendChild(loadEl);}else{wrapperEl.parentNode.insertBefore(loadEl,wrapperEl);}}
this.requestCount++;var requestNumber=this.requestCount;var loadStoriesHandler=function(asyncResponse){var payload=asyncResponse.getPayload();if(payload){if('newDelay'in payload){this.currentDelay=payload.newDelay;}
if('newRefreshCount'in payload){HomeFeed.defaultRefreshes=payload.newRefreshCount;}
if('newStoriesClass'in payload){this.newStoriesClass=payload.newStoriesClass;}
this.supportsCdn=false;if('enableCdn'in payload){this.supportsCdn=payload.enableCdn;if(this.requestCount&&this.cdnTimeSyncFrequency&&(this.requestCount%this.cdnTimeSyncFrequency)==0){this.syncNewestStoryTime(false);}
if('n_stories'in payload){this.akamaiTotalStories+=payload.n_stories;}}
if(this.sendTime){this.akamaiTotalLatency+=(new Date()).getTime()-this.sendTime;this.sendTime=0;}
if(requestNumber!=this.requestCount){return;}
this.removeLoadingImage();this.removeErrorMessage();this.updateLastSeen(requestNumber);var wrapperEl=$('newsfeed_wrapper');var html=payload['html']||null;var stories=payload['stories']||[];if(html||(stories&&stories.length)){if('newestStoryTime'in payload&&payload['newestStoryTime']>this.newestStoryTime){this.newestStoryTime=payload['newestStoryTime'];this.lastLocalNewestTime=(new Date()).getTime();}
if('lastestTime'in payload){this.lastestTime=parseInt(payload['lastestTime']);}
if('oldestStoryTime'in payload&&(this.oldestStoryTime==0||payload['oldestStoryTime']<this.oldestStoryTime)){this.oldestStoryTime=payload['oldestStoryTime'];}
if('submenuText'in payload){this.showSubmenu(payload.submenuText);}else{this.hideSubmenu();}
this.refreshLogModeOption();if(stories&&stories.length){this._addStoriesToQueue(stories);}else if(html){this.updateStoriesHTML(html,this.newStoriesClass,location);}}
if('storiesCount'in payload&&payload['storiesCount']){var standardStatus=ge('standard_status');if(standardStatus){hide(standardStatus);}}
if('livefeedBottomMessage'in payload){var text=payload['livefeedBottomMessage'];var bottom_message=ge('livefeed_bottom_message');if(bottom_message){bottom_message.setContent(text);}
if(text.length>=70){CSS.addClass(bottom_message,'long_bottom_message');}else{CSS.removeClass(bottom_message,'long_bottom_message');}
var livefeed=ge('livefeed_main_item');if(livefeed){if(text.length>0){CSS.addClass(livefeed,'with_bottom_message');}else{CSS.removeClass(livefeed,'with_bottom_message');}}}
if('modified_comments'in payload){var sources=feedcomment_get_feedback_sources();var source=sources['FEEDBACK_SOURCE_NEWS_FEED']
this.updateCommentsFromPayload(payload.modified_comments,source);}
if('maxStoriesInDom'in payload&&payload.maxStoriesInDom){this.maxStoriesInDom=payload.maxStoriesInDom;this.truncateStories();}
if(this.reloadVersion&&'reloadVersion'in payload&&payload['reloadVersion']>this.reloadVersion&&'reloadRangeInSeconds'in payload){this.setReloadVersion(payload['reloadVersion']);var reloadTime=Math.max(10000,Math.random()*1000*payload['reloadRangeInSeconds']);setTimeout(function(){window.location.reload()},reloadTime);}}
if(isAutoRefresh){this.autoRefreshHandler();}}.bind(this);if(location!=HomeFeed.LOC_PREPEND){var bottomEl=ge('feed_bottom_links');if(bottomEl){bottomEl.parentNode.removeChild(bottomEl);}}
var postData=(typeof extraData=='object')?extraData:{};if(this.apps.length){postData['apps']=this.apps;}
if(this.friendLists.length){postData['fl']=this.friendLists;}
if(this.tabId){postData['tab']=this.tabId;}
var method='GET';if(this.feedbackTargets&&this.liveCommentUpdating){var feedbackTargetArray=values(this.feedbackTargets);if(feedbackTargetArray.length){postData['feedback_targets']=JSON.encode(feedbackTargetArray);method='POST';}}
if(this.widgetAppId){postData['widget_app_id']=this.widgetAppId;}
if(this.tabId==HomeFeed.TAB_LIVEWIDGET_EVERYONE&&this.widgetLocale){postData['locale']=this.widgetLocale;}
if(this.reloadVersion){postData['reload_version']=this.reloadVersion;}
if(this.gmtOffsetMinutes!=null){postData['gmt_offset_minutes']=this.gmtOffsetMinutes;}
var async=new AsyncRequest().setReadOnly(true).setOption('retries',0).setMethod(method).setData(postData).setHandler(loadStoriesHandler).setErrorHandler(bind(this,this._refreshErrorHandler,location,requestNumber)).setTransportErrorHandler(bind(this,this._refreshErrorHandler,location,requestNumber)).setFinallyHandler(function(){if(isTransition){PageTransitions.transitionComplete();}});if(this.isCdnEnabled()){this.akamaiRequestCount++;async.setOption('jsonp',true);postData['jsonp']=true;async.setURI('http://livefeed.facebook.com/ajax/feed.php');this.sendTime=(new Date()).getTime();}
else{async.setURI('/ajax/feed.php');}
if(this.tabset){async.setContextData('src_tab_name',this.tabset.lastSelected).setContextData('dst_tab_name',this.tabset.selectedId);}
async.send();}.bind(this);var wrapperEl=$('newsfeed_wrapper');if(location==HomeFeed.LOC_REPLACE){set_inner_html(wrapperEl,'');}
animOnDone();}
HomeFeed.prototype.truncateStories=function(){if(this.maxStoriesInDom){var wrapperEl=$('newsfeed_wrapper');var feedItems=DOM.scry(wrapperEl,'div.feed_item');for(var i=feedItems.length-1;i>=this.maxStoriesInDom;i--){var feedItem=feedItems[i];feedItem.parentNode.removeChild(feedItem);}
var targetKeys=keys(this.feedbackTargets);var targetsToTrim=targetKeys.length-this.maxStoriesInDom;for(var i=0;i<targetsToTrim;i++){var key=targetKeys[i];delete this.feedbackTargets[key];}}}
HomeFeed.prototype.liveWidgetLoadTest=function(tabId,delay,newest,isFullRequest){if(this.tabId!=HomeFeed.TAB_TOP_STORIES){return this;}
var runLoadTest=function(){var postData={};postData['tab']=tabId;postData['widget_load_test']=1;postData['widget_app_id']=this.widgetAppId;if(!isFullRequest){postData['newest']=newest;}
var method='GET';if(this.feedbackTargets){var feedbackTargetArray=values(this.feedbackTargets);if(feedbackTargetArray.length){postData['feedback_targets']=JSON.encode(feedbackTargetArray);method='POST';}}
var noopHandler=function(asyncReponse){};var homefeed=this;homefeed.requestCount++;var loadTestHandler=function(asyncResponse){var payload=asyncResponse.getPayload();if('newDelay'in payload){delay=parseInt(payload.newDelay/1000);}
if('isFullRequest'in payload){isFullRequest=payload['isFullRequest'];}
if('newestStoryTime'in payload){homefeed.newestStoryTime=payload['newestStoryTime'];}
if('modified_comments'in payload){for(var i=0;i<payload.modified_comments.length;i++){var modified_target=payload.modified_comments[i];var item_id=modified_target.item_id;var target_fbid=modified_target.target_fbid;homefeed.updatefeedbackTargetHash(item_id,target_fbid,modified_target.comments_hash);}}
homefeed.enableLoadtestCdn=false;if('enableCdn'in payload){homefeed.enableLoadtestCdn=payload.enableCdn;if(homefeed.cdnTimeSyncFrequency&&(homefeed.requestCount%homefeed.cdnTimeSyncFrequency)==0){homefeed.syncNewestStoryTime(true);}
if('n_stories'in payload){homefeed.akamaiTotalStories+=payload.n_stories;}}
if(homefeed.sendTime){homefeed.akamaiTotalLatency+=(new Date()).getTime()-homefeed.sendTime;homefeed.sendTime=0;}
if('continueLoadTest'in payload){newest=homefeed.newestStoryTime;homefeed.loadTimerHandle=setTimeout(homefeed.liveWidgetLoadTest.bind(homefeed,tabId,delay,newest,isFullRequest),delay*1000);}};var async=new AsyncRequest().setReadOnly(true).setOption('retries',0).setMethod(method).setData(postData).setHandler(loadTestHandler).setErrorHandler(noopHandler).setTransportErrorHandler(noopHandler);if(this.enableLoadtestCdn&&!isFullRequest){this.akamaiRequestCount++;async.setOption('jsonp',true);postData['jsonp']=true;async.setURI('http://livefeed.facebook.com/ajax/feed.php');homefeed.sendTime=(new Date()).getTime();}else{async.setURI('/ajax/feed.php');}
async.send();}.bind(this);runLoadTest();return this;}
HomeFeed.prototype.removeLoadingImage=function(){this._removeElementWithId('feed_loading_image');return this;}
HomeFeed.prototype.removeErrorMessage=function(){this._removeElementWithId('feed_error_wrapper');return this;}
HomeFeed.prototype._removeElementWithId=function(id){var el=ge(id);if(el){el.parentNode.removeChild(el);}
return this;}
HomeFeed.prototype.updateLastSeen=function(requestNumber){if(this.requestLastSeen<requestNumber){this.requestLastSeen=requestNumber;}}
HomeFeed.prototype._addStoriesToQueue=function(stories){this.storyQueue=this.storyQueue.concat(stories);this.startStoryQueue();}
HomeFeed.prototype.startStoryQueue=function(){if(this.queueTimerHandle){return;}
this._handleStoryQueue();}
HomeFeed.prototype.clearStoryQueue=function(){if(this.queueTimerHandle){clearTimeout(this.queueTimerHandle);}
this.storyQueue=[];}
HomeFeed.prototype._handleStoryQueue=function(){if(this.storyQueue.length){var len=this.storyQueue.length;var storiesToShow=Math.ceil(len/3);var stories=this.storyQueue.splice(0,storiesToShow);var html=stories.join('');var newDiv=document.createElement('div');set_inner_html(newDiv,html);newDiv.style.overflow='hidden';CSS.addClass(newDiv,this.newStoriesClass);this.updateWrapper(HomeFeed.LOC_PREPEND,newDiv,true);this.queueTimerHandle=null;if(this.storyQueue.length>0){this.queueTimerHandle=setTimeout(this._handleStoryQueue.bind(this),HomeFeed.intermittentDelay);}}}
HomeFeed.prototype._refreshErrorHandler=function(location,requestNumber,response){if(requestNumber!=this.requestCount){return;}
this.removeLoadingImage();this.updateLastSeen(requestNumber);var error=response.getError();var loginMarkup;if(this.embeddedWidget){var onclick='HomeFeed.getInstance().openLiveWidgetLoginPopup();'
loginMarkup='<a href="#" onClick="'+onclick+'">'+_tx("login ")+'</a>';}else{loginMarkup='<a href="'+login_url+'">'+_tx("login ")+'</a>';}
if(error==kError_Async_NotLoggedIn){var title=_tx("Masukan salah");var msg=_tx("Sesi Anda telah mencapai batas waktu. Silakan {login}.",{'login':loginMarkup});new ErrorDialog().showError(title,msg);return;}
if(location==HomeFeed.LOC_PREPEND){return;}
var errorDiv=document.createElement('div');errorDiv.id='error';CSS.addClass(errorDiv,'error');set_inner_html(errorDiv,_tx("Terjadi kesalahan saat mengambil umpan ini. Cobalah lagi."));var newDiv=document.createElement('div');newDiv.id='feed_error_wrapper';newDiv.appendChild(errorDiv);this.updateWrapper(location,newDiv,false);return;}
HomeFeed.prototype.updateWrapper=function(location,element,animate){var wrapperEl=$('newsfeed_wrapper');if(location==HomeFeed.LOC_APPEND){wrapperEl.appendContent(element);}else if(location==HomeFeed.LOC_PREPEND){wrapperEl.prependContent(element);var startColor='#FFF9D7';var pauseColor='#FFFBE7';if(animate){animation(element).to('background',startColor).from(startColor).to('height','auto').from(0).ease(animation.ease.both).show().duration(500).to('opacity',0).from(0).checkpoint().to('opacity',1).from(0).ease(animation.ease.both).duration(750).checkpoint().to('background',pauseColor).from(startColor).duration(5000).checkpoint().duration(20000).checkpoint().to('background','#fff').from(pauseColor).duration(5000).go();}else{show(element);}}else{wrapperEl.setContent(element);}
return this;}
HomeFeed.prototype.updateStoriesHTML=function(html,story_class,location){this.newStoriesClass=story_class;if(typeof(location)=='undefined'){location=HomeFeed.LOC_APPEND}
var newDiv=document.createElement('div');set_inner_html(newDiv,html);newDiv.style.overflow='hidden';CSS.addClass(newDiv,story_class);this.updateWrapper(location,newDiv,false);}
onloadRegister(function(){var fn=function(){var inst=HomeFeed.getInstance();if(inst){inst.resetRefreshCount();inst.setAutoRefresh(inst.autoRefresh);}};window.onfocus=chain(window.onfocus,fn);window.onclick=chain(window.onclick,fn);window.onmouseover=chain(window.onmouseover,fn);});

function privacy_view_public_listing_pop_message(){var body=_tx("Daftar pencarian publik Anda adalah hasil pencarian versi Anda yang tersedia bagi orang-orang yang mencari Anda walaupun mereka tidak masuk ke Facebook.")+'<br/><br/>'+
_tx("Hasil pencarian yang anda temukan melalui daftar pencarian publik juga bisa ditemukan pada mesin pencari atau pada halaman publik Facebook .Untuk keterangan lebih lanjut, lihat{=Facebook Privacy Policy}.",{'=Facebook Privacy Policy':'<a href="/policy.php">'+
_tx("Kebijakan Privasi Facebook")+'</a>'});new Dialog().setTitle(_tx("Daftar Pencarian Publik")).setBody(body).setButtons([Dialog.CLOSE]).show();}
function privacy_user_unblock(elm,user_id){new AsyncRequest().setURI('/privacy/ajax/block.php').setData({unblock:user_id}).setHandler(function(response){if(response.getErrorIsWarning()){ErrorDialog.showAsyncError(response);}
DOM.remove($(elm).parentNode);}.bind(this)).send();return false;}
function privacy_platform_disable_all_cb(){var platform_options_list=ge('platform_options_list1');for(var i=0;i<platform_options_list.childNodes.length;i++){platform_options_list.childNodes[i].childNodes[0].disabled=true;}
platform_options_list.style.color='gray';platform_options_list=ge('platform_options_list2');for(i=0;i<platform_options_list.childNodes.length;i++){platform_options_list.childNodes[i].childNodes[0].disabled=true;}
platform_options_list.style.color='gray';}
function privacy_platform_enable_all_cb(){var platform_options_list=ge('platform_options_list1');for(var i=0;i<platform_options_list.childNodes.length;i++){platform_options_list.childNodes[i].childNodes[0].disabled=false;}
platform_options_list.style.color='black';platform_options_list=ge('platform_options_list2');for(i=0;i<platform_options_list.childNodes.length;i++){platform_options_list.childNodes[i].childNodes[0].disabled=false;}
platform_options_list.style.color='black';}
function privacy_platform_undo_unblock_app(app_id){var blocked_hidden=ge(app_id+'_app_blocked');if(blocked_hidden!=null){blocked_hidden.value=1;hide(app_id+'_unblocked_div');show(app_id+'_blocked_div');}}
function privacy_platform_show_learn_search_dialog(){new Dialog().setTitle($('learn_search_dialog_title').innerHTML).setBody($('learn_search_dialog_text').innerHTML).setButtons([Dialog.OK]).show();}
function privacy_platform_show_learn_apps_privacy_dialog(){new Dialog().setTitle($('learn_apps_privacy_dialog_title').innerHTML).setBody($('learn_apps_privacy_dialog_text').innerHTML).setButtons([Dialog.OK]).show();}
function privacy_platform_show_basic_info_dialog(){new Dialog().setTitle($('basic_info_dialog_title').innerHTML).setBody($('basic_info_dialog_text').innerHTML).setButtons([Dialog.OK]).show();}
function privacy_platform_select_share_radio(){privacy_platform_enable_all_cb();var base_hidden=ge('base_permission');if(base_hidden!=null){base_hidden.value=1;}}
function privacy_platform_select_noshare_radio(){privacy_platform_disable_all_cb();var base_hidden=ge('base_permission');if(base_hidden!=null){base_hidden.value=0;}}
function privacy_platform_show_disabled_noshare_dialog(){new Dialog().setTitle($('noshare_dialog_title').innerHTML).setBody($('noshare_dialog_text').innerHTML).setButtons([Dialog.OK]).show();}
var PrivacyPlatform={remove:function(elem,app_id){return PrivacyPlatform._generic({'remove':app_id},function(r){CSS.addClass(elem.parentNode.parentNode,'removed');});},add:function(elem,app_id){return PrivacyPlatform._generic({'add':app_id},function(r){CSS.removeClass(elem.parentNode.parentNode,'removed');});},block:function(elem,app_id){return PrivacyPlatform._generic({'block':app_id},function(r){CSS.removeClass(elem.parentNode.parentNode,'unblocked');});},unblock:function(elem,app_id){return PrivacyPlatform._generic({'unblock':app_id},function(r){CSS.addClass(elem.parentNode.parentNode,'unblocked');});},_generic:function(data,handler){new AsyncRequest().setURI('/privacy/ajax/platform.php').setData(data).setHandler(handler).send();return false;}};var PrivacyPlatformRequestBlocking={unblock:function(blockee_uid){var elem=$('blocked_user_'+blockee_uid);return PrivacyPlatformRequestBlocking._generic('unblock=1&blockee_uid='+blockee_uid,{'confirm':1},function(r){CSS.removeClass(elem,'blocked');CSS.addClass(elem,'unblocked');});},block:function(blockee_uid){var elem=$('blocked_user_'+blockee_uid);return PrivacyPlatformRequestBlocking._generic('blockee_uid='+blockee_uid,{'confirm':1},function(r){CSS.removeClass(elem,'unblocked');CSS.addClass(elem,'blocked');});},_generic:function(params,data,handler){new AsyncRequest().setURI('/ajax/block_user_requests.php?'+params).setData(data).setHandler(handler).send();return false;}};function privacy_toggle_public_listing_display_controls(obj){if(obj.checked){show(ge('public_search_subcontrol'));}else{hide(ge('public_search_subcontrol'));}}

function tz_calculate(timestamp){var d=new Date();var raw_offset=d.getTimezoneOffset()/30;var time_sec=d.getTime()/1000;var time_diff=Math.round((timestamp-time_sec)/1800);var rounded_offset=Math.round(raw_offset+time_diff)%48;if(rounded_offset==0){return 0;}else if(rounded_offset>24){rounded_offset-=Math.ceil(rounded_offset/48)*48;}else if(rounded_offset<-28){rounded_offset+=Math.ceil(rounded_offset/-48)*48;}
return rounded_offset*30;}
function ajax_tz_set(tzForm){var timestamp=tzForm.time.value;var gmt_off=-tz_calculate(timestamp);var cur_gmt_off=tzForm.tz_gmt_off.value;if(gmt_off!=cur_gmt_off){var ajaxUrl='/ajax/autoset_timezone_ajax.php';new AsyncSignal(ajaxUrl,{user:tzForm.user.value,gmt_off:gmt_off}).send();}}
function tz_autoset(){var tz_form=ge('tz_autoset_form');if(tz_form){ajax_tz_set(tz_form);}}

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