/*
HTTP Host: static.ak.fbcdn.net
Generated: March 20th 2010 2:40:26 AM PDT
Machine: 10.16.139.107
Locale: nu_ll
Path: js/87h9t70yp1s8gwc0.pkg.js
*/

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

function send_error_signal(a,b){if(window.Env&&window.Env.error_uri)new AsyncSignal(window.Env.error_uri,{c:a,m:b}).send();}
Arbiter.inform("template\/registerTemplate", {"name":"\/templates\/UIPager.tmpl","template":"\n<span class=\"UIPager\" bindPoint =\"root\">\n  <span class=\"UIPager_PageNum\" bindPoint=\"pageNumber\"><\/span>\n  <span class=\"UIPager_ButtonWrapper\" bindPoint=\"backWrapper\">\n    <a class=\"UIPager_Button UIPager_ButtonBack\" bindPoint=\"backRoot\" href=\"#\"><\/a>\n  <\/span>\n  <span class=\"UIPager_ButtonWrapper\" bindPoint=\"forwardWrapper\">\n    <a class=\"UIPager_Button UIPager_ButtonForward\" bindPoint=\"forwardRoot\" href=\"#\"><\/a>\n  <\/span>\n<\/span>\n"}, Arbiter.BEHAVIOR_PERSISTENT);
function UIPager(d,b,c,a){copy_properties(this,{_rm:new RenderManager(this),_callback:a||bagofholding,_backHandler:null,_forwardHandler:null,_maxPerPage:b,_total:d,_offset:c,_isDisabled:false,root:null,backRoot:null,forwardRoot:null,pageNumber:null,backWrapper:null,fowardWrapper:null});this.parent.construct(this,URI('/templates/UIPager.tmpl'));this._summaryTextHandler=this._getSummaryText;this._rm.dirty();this._setupHandlers();return this;}UIPager.extend('TemplateObject');UIPager.prototype._setupHandlers=function(){this._backHandler=Event.listen(this.backRoot,'click',this._handleClick.bind(this,'back'));this._forwardHandler=Event.listen(this.forwardRoot,'click',this._handleClick.bind(this,'forward'));};UIPager.prototype._handleClick=function(b){var c;var a;if(b=='forward'){c=this.forwardWrapper;a=1;}else{c=this.backWrapper;a=-1;}if(!CSS.hasClass(c,'UIPager_ButtonDisabled')){this._offset=this._offset+(a*this._maxPerPage);this._callback(this._offset,a);this._rm.dirty();}return false;};UIPager.prototype._getSummaryText=function(a,e,b){if(e==0)return '';if(e<=b){if(e==1){return _tx("\u05ea\u05d5\u05e6\u05d0\u05d4 \u05d0\u05d7\u05ea");}else return _tx("{number_of_results} \u05ea\u05d5\u05e6\u05d0\u05d5\u05ea",{number_of_results:e});}else{if(a+b<e){var c=((a/b+1)*b);}else var c=e;if(e>500){var d=_tx("{starting_offset}-{ending_offset} \u05de\u05ea\u05d5\u05da \u05d9\u05d5\u05ea\u05e8 \u05de-{number_of_results} \u05ea\u05d5\u05e6\u05d0\u05d5\u05ea",{starting_offset:(a+1),ending_offset:c,number_of_results:500});}else var d=_tx("{starting_offset}-{ending_offset} \u05de\u05ea\u05d5\u05da {number_of_results} \u05ea\u05d5\u05e6\u05d0\u05d5\u05ea",{starting_offset:(a+1),ending_offset:c,number_of_results:e});return d;}};UIPager.prototype.setCallback=function(a){this._callback=a;return this;};UIPager.prototype.setMaxPerPage=function(a){this._maxPerPage=Math.max(a,0);this._rm.dirty();return this;};UIPager.prototype.setTotal=function(a){this._total=Math.max(a,0);this._rm.dirty();return this;};UIPager.prototype.setOffset=function(a){this._offset=Math.max(a,0);this._rm.dirty();return this;};UIPager.prototype.setPage=function(a){this._offset=Math.max(a-1,0)*this._maxPerPage;this._rm.dirty();return this;};UIPager.prototype.setDisabled=function(a){this._isDisabled=a;this._rm.dirty();return this;};UIPager.prototype.setVertical=function(a){CSS.conditionClass(this.root,'UIPager_Vertical',a);this._rm.dirty();return this;};UIPager.prototype._getCurrentPage=function(){return this._offset/this._maxPerPage+1;};UIPager.prototype._getPageCount=function(){return Math.ceil(this._total/this._maxPerPage);};UIPager.prototype.setSummaryTextHandler=function(a){this._summaryTextHandler=a;this._rm.dirty();return this;};UIPager.prototype._setDisabled=function(a,c){var b;if(a=="back"){b=this.backWrapper;}else if(a=="forward")b=this.forwardWrapper;CSS.conditionClass(b,'UIPager_ButtonDisabled',c);return this;};UIPager.prototype.paint=function(){if(this._offset==0||this._isDisabled){this._setDisabled("back",true);}else this._setDisabled("back",false);if((this._offset+this._maxPerPage)>=this._total||this._isDisabled){this._setDisabled("forward",true);}else this._setDisabled("forward",false);var a=this._summaryTextHandler(this._offset,this._total,this._maxPerPage);if(a){DOM.setContent(this.pageNumber,a);}else hide(this.pageNumber);};UIPager.prototype.resetPager=function(d,b,c,a){this.setOffset(c);this.setTotal(d);this.setMaxPerPage(b);if(a)this._callback=a;this._rm.dirty();};UIPager.prototype.getRoot=function(){return this.root;};UIPager.prototype.setHidden=function(a){CSS.conditionClass(this.root,'hidden_elem',a);return this;};UIPager.prototype.getHidden=function(){return CSS.hasClass(this.root,'hidden_elem');};

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