},getNextPage:function(){returnthis.hasNextPage()?this.getCurrentPage()+1:null;},hasPreviousPage:function(){return(this.getCurrentPage()>1);},getPreviousPage:function(){return(this.hasPreviousPage()?this.getCurrentPage()-1:1);},getPageRecords:function(E){if(!YAHOO.lang.isNumber(E)){E=this.getCurrentPage();}varD=this.get("rowsPerPage"),C=this.get("totalRecords"),F,B;if(!E||!D){returnnull;}F=(E-1)*D;if(C!==A.VALUE_UNLIMITED){if(F>=C){returnnull;}B=Math.min(F+D,C)-1;}else{B=F+D-1;}return[F,B];},setPage:function(C,B){if(this.hasPage(C)&&C!==this.getCurrentPage()){if(this.get("updateOnChange")||B){this.set("recordOffset",(C-1)*this.get("rowsPerPage"));}else{this.fireEvent("changeRequest",this.getState({"page":C}));}}},getRowsPerPage:function(){returnthis.get("rowsPerPage");},setRowsPerPage:function(C,B){if(A.isNumeric(C)&&+C>0&&+C!==this.get("rowsPerPage")){if(this.get("updateOnChange")||B){this.set("rowsPerPage",C);}else{this.fireEvent("changeRequest",this.getState({"rowsPerPage":+C}));}}},getTotalRecords:function(){returnthis.get("totalRecords");},setTotalRecords:function(C,B){if(A.isNumeric(C)&&+C>=0&&+C!==this.get("totalRecords")){if(this.get("updateOnChange")||B){this.set("totalRecords",C);}else{this.fireEvent("changeRequest",this.getState({"totalRecords":+C}));}}},getStartIndex:function(){returnthis.get("recordOffset");},setStartIndex:function(C,B){if(A.isNumeric(C)&&+C>=0&&+C!==this.get("recordOffset")){if(this.get("updateOnChange")||B){this.set("recordOffset",C);}else{this.fireEvent("changeRequest",this.getState({"recordOffset":+C}));}}},getState:function(H){varJ=A.VALUE_UNLIMITED,F=Math,G=F.max,I=F.ceil,D,B,E;functionC(M,K,L){if(M<=0||K===0){return0;}if(K===J||K>M){returnM-(M%L);}returnK-(K%L||L);}D={paginator:this,totalRecords:this.get("totalRecords"),rowsPerPage:this.get("rowsPerPage"),records:this.getPageRecords()};D.recordOffset=C(this.get("recordOffset"),D.totalRecords,D.rowsPerPage);D.page=I(D.recordOffset/D.rowsPerPage)+1;if(!H){returnD;}B={paginator:this,before:D,rowsPerPage:H.rowsPerPage||D.rowsPerPage,totalRecords:(A.isNumeric(H.totalRecords)?G(H.totalRecords,J):+D.totalRecords)};if(B.totalRecords===0){B.recordOffset=B.page=0;}else{E=A.isNumeric(H.page)?(H.page-1)*B.rowsPerPage:A.isNumeric(H.recordOffset)?+H.recordOffset:D.recordOffset;B.recordOffset=C(E,B.totalRecords,B.rowsPerPage);B.page=I(B.recordOffset/B.rowsPerPage)+1;}B.records=[B.recordOffset,B.recordOffset+B.rowsPerPage-1];if(B.totalRecords!==J&&B.recordOffset<B.totalRecords&&B.records&&B.records[1]>B.totalRecords-1){B.records[1]=B.totalRecords-1;}returnB;},setState:function(C){if(YAHOO.lang.isObject(C)){this._state=this.getState({});C={page:C.page,rowsPerPage:C.rowsPerPage,totalRecords:C.totalRecords,recordOffset:C.recordOffset};if(C.page&&C.recordOffset===undefined){C.recordOffset=(C.page-1)*(C.rowsPerPage||this.get("rowsPerPage"));}this._batch=true;this._pageChanged=false;for(varBinC){if(C.hasOwnProperty(B)){this.set(B,C[B]);}}this._batch=false;if(this._pageChanged){this._pageChanged=false;this._firePageChange(this.getState(this._state));}}}};YAHOO.lang.augmentProto(A,YAHOO.util.AttributeProvider);YAHOO.widget.Paginator=A;})();(function(){varB=YAHOO.widget.Paginator,A=YAHOO.lang;B.ui.CurrentPageReport=function(C){this.paginator=C;C.subscribe("recordOffsetChange",this.update,this,true);C.subscribe("rowsPerPageChange",this.update,this,true);C.subscribe("totalRecordsChange",this.update,this,true);C.subscribe("pageReportTemplateChange",this.update,this,true);C.subscribe("destroy",this.destroy,this,true);C.subscribe("pageReportClassChange",this.update,this,true);};B.ui.CurrentPageReport.init=function(C){C.setAttributeConfig("pageReportClass",{value:"yui-pg-current",validator:A.isString});C.setAttributeConfig("pageReportTemplate",{value:"({currentPage} of {totalPages})",validator:A.isString});C.setAttributeConfig("pageReportValueGenerator",{value:function(F){varE=F.getCurrentPage(),D=F.getPageRecords();return{"currentPage":D?E:0,"totalPages":F.getTotalPages(),"startIndex":D?D[0]:0,"endIndex":D?D[1]:0,"startRecord":D?D[0]+1:0,"endRe
this.link.id=D+"-next-link";this.link.href="#";this.link.className=G;this.link.innerHTML=C;YAHOO.util.Event.on(this.link,"click",this.onClick,this,true);this.span.id=D+"-next-span";this.span.className=G;this.span.innerHTML=C;this.current=F.getCurrentPage()===E?this.span:this.link;returnthis.current;},update:function(E){if(E&&E.prevValue===E.newValue){return;}varD=this.paginator.getTotalPages(),C=this.current?this.current.parentNode:null;if(this.paginator.getCurrentPage()!==D){if(C&&this.current===this.span){C.replaceChild(this.link,this.current);this.current=this.link;}}else{if(this.current===this.link){if(C){C.replaceChild(this.span,this.current);this.current=this.span;}}}},destroy:function(){YAHOO.util.Event.purgeElement(this.link);this.current.parentNode.removeChild(this.current);this.link=this.span=null;},onClick:function(C){YAHOO.util.Event.stopEvent(C);this.paginator.setPage(this.paginator.getNextPage());}};})();(function(){varB=YAHOO.widget.Paginator,A=YAHOO.lang;B.ui.PreviousPageLink=function(C){this.paginator=C;C.subscribe("recordOffsetChange",this.update,this,true);C.subscribe("rowsPerPageChange",this.update,this,true);C.subscribe("totalRecordsChange",this.update,this,true);C.subscribe("destroy",this.destroy,this,true);C.subscribe("previousPageLinkLabelChange",this.update,this,true);C.subscribe("previousPageLinkClassChange",this.update,this,true);};B.ui.PreviousPageLink.init=function(C){C.setAttributeConfig("previousPageLinkLabel",{value:"< prev",validator:A.isString});C.setAttributeConfig("previousPageLinkClass",{value:"yui-pg-previous",validator:A.isString});};B.ui.PreviousPageLink.prototype={current:null,link:null,span:null,render:function(D){varE=this.paginator,F=E.get("previousPageLinkClass"),C=E.get("previousPageLinkLabel");this.link=document.createElement("a");this.span=document.createElement("span");this.link.id=D+"-prev-link";this.link.href="#";this.link.className=F;this.link.innerHTML=C;YAHOO.util.Event.on(this.link,"click",this.onClick,this,true);this.span.id=D+"-prev-span";this.span.className=F;this.span.innerHTML=C;this.current=E.getCurrentPage()>1?this.link:this.span;returnthis.current;},update:function(D){if(D&&D.prevValue===D.newValue){return;}varC=this.current?this.current.parentNode:null;if(this.paginator.getCurrentPage()>1){if(C&&this.current===this.span){C.replaceChild(this.link,this.current);this.current=this.link;}}else{if(C&&this.current===this.link){C.replaceChild(this.span,this.current);this.current=this.span;}}},destroy:function(){YAHOO.util.Event.purgeElement(this.link);this.current.parentNode.removeChild(this.current);this.link=this.span=null;},onClick:function(C){YAHOO.util.Event.stopEvent(C);this.paginator.setPage(this.paginator.getPreviousPage());}};})();(function(){varB=YAHOO.widget.Paginator,A=YAHOO.lang;B.ui.RowsPerPageDropdown=function(C){this.paginator=C;C.subscribe("rowsPerPageChange",this.update,this,true);C.subscribe("rowsPerPageOptionsChange",this.rebuild,this,true);C.subscribe("totalRecordsChange",this._handleTotalRecordsChange,this,true);C.subscribe("destroy",this.destroy,this,true);C.subscribe("rowsPerPageDropdownClassChange",this.rebuild,this,true);};B.ui.RowsPerPageDropdown.init=function(C){C.setAttributeConfig("rowsPerPageOptions",{value:[],validator:A.isArray});C.setAttributeConfig("rowsPerPageDropdownClass",{value:"yui-pg-rpp-options",validator:A.isString});};B.ui.RowsPerPageDropdown.prototype={select:null,all:null,render:function(C){this.select=document.createElement("select");this.select.id=C+"-rpp";this.select.className=this.paginator.get("rowsPerPageDropdownClass");this.select.title="Rows per page";YAHOO.util.Event.on(this.select,"change",this.onChange,this,true);this.rebuild();returnthis.select;},rebuild:function(J){varC=this.paginator,E=this.select,K=C.get("rowsPerPageOptions"),D,I,F,G,H;this.all=null;for(G=0,H=K.length;G<H;++G){I=K[G];D=E.options[G]||E.appendChild(document.createElement("option"));F=A.isValue(I.value)?I.value:I;D.innerHTML=A.isValue(I.text)?I.text:I;if(A.isString(F)&&F.toLowerCase()==="all"){this.all=D;D.value=C.get("total