(function(){Type.registerNamespace("Telerik.Web.UI");
var a=Telerik.Web.UI;
$telerik.findDataPager=$find;
$telerik.toDataPager=function(b){return b;
};
a.RadDataPager=function(b){var c=["dataPagerCreating","dataPagerCreated","dataPagerDestroying","pageIndexChanging","pageSizeChanging"];
this._initializeEvents(c);
a.RadDataPager.initializeBase(this,[b]);
this._startRowIndex=0;
this._pageSize=10;
this._totalRowCount=-1;
this._currentPageIndex=1;
this._pageCount=1;
this._uniqueID=null;
this._postBackFunction="__doPostBack('{0}','{1}')";
parseInteger=function(d){if(typeof(d)=="number"){return d;
}else{if(typeof(d)=="string"){return parseInt(d,10);
}}};
};
a.RadDataPager._executePostBackEvent=function(){var b=Array.prototype.slice.call(arguments);
this._postBackFunction=this._postBackFunction.replace("{0}",this.get_uniqueID());
this._postBackFunction=this._postBackFunction.replace("{1}",b);
eval(this._postBackFunction);
};
a.RadDataPager.prototype={initialize:function(){a.RadDataPager.callBaseMethod(this,"initialize");
this.raise_dataPagerCreating(new Sys.EventArgs());
this.raise_dataPagerCreated(new Sys.EventArgs());
},dispose:function(){this.raise_dataPagerDestroying(new Sys.EventArgs());
$clearHandlers(this.get_element());
a.RadDataPager.callBaseMethod(this,"dispose");
},get_uniqueID:function(){return this._uniqueID;
},get_pageCount:function(){return this._pageCount;
},get_startRowIndex:function(){return this._startRowIndex;
},get_pageSize:function(){return this._pageSize;
},get_totalRowCount:function(){return this._totalRowCount;
},get_currentPageIndex:function(){return this._currentPageIndex;
},set_currentPageIndex:function(b){var d=new a.DataPagerPageIndexChangingEventArgs(this._currentPageIndex,b);
this.raise_pageIndexChanging(d);
if(d.get_cancel()){return;
}var c=parseInteger(d.get_newPageIndex());
if(isNaN(c)||(this._currentPageIndex==c)){return;
}this._currentPageIndex=c;
this.fireCommand("Page",this._currentPageIndex);
},set_pageSize:function(b){var d=new a.DataPagerPageSizeChangingEventArgs(this._pageSize,b);
this.raise_pageSizeChanging(d);
if(d.get_cancel()){return;
}var c=parseInteger(d.get_newPageSize());
if(isNaN(c)||(this._pageSize==c)){return;
}this._pageSize=c;
this.fireCommand("PageSizeChange",this._pageSize);
},fireCommand:function(b,c){a.RadDataPager._executePostBackEvent.call(this,this._constructPostBackData(b,c));
},_constructPostBackData:function(c,b){return String.format("FireCommand:{0}|;{1}|;",c,b);
},_initializeEvents:function(d){if(d){var f=this;
for(var b=0,c=d.length;
b<c;
b++){var e=d[b];
this["add_"+e]=function(g){return function(h){this.get_events().addHandler(g,h);
};
}(e);
this["remove_"+e]=function(g){return function(h){this.get_events().removeHandler(g,h);
};
}(e);
this["raise_"+e]=function(g){return function(h){this.raiseEvent(g,h);
};
}(e);
}}}};
a.RadDataPager.registerClass("Telerik.Web.UI.RadDataPager",a.RadWebControl);
a.DataPagerPageIndexChangingEventArgs=function(b,c){a.DataPagerPageIndexChangingEventArgs.initializeBase(this);
this._newPageIndex=c;
this._oldPageIndex=b;
};
a.DataPagerPageIndexChangingEventArgs.prototype={get_oldPageIndex:function(){return this._oldPageIndex;
},get_newPageIndex:function(){return this._newPageIndex;
},set_newPageIndex:function(b){this._newPageIndex=b;
}};
a.DataPagerPageIndexChangingEventArgs.registerClass("Telerik.Web.UI.DataPagerPageIndexChangingEventArgs",Sys.CancelEventArgs);
a.DataPagerPageSizeChangingEventArgs=function(b,c){a.DataPagerPageSizeChangingEventArgs.initializeBase(this);
this._newPageSize=c;
this._oldPageSize=b;
};
a.DataPagerPageSizeChangingEventArgs.prototype={get_oldPageSize:function(){return this._oldPageSize;
},get_newPageSize:function(){return this._newPageSize;
},set_newPageSize:function(b){this._newPageSize=b;
}};
a.DataPagerPageSizeChangingEventArgs.registerClass("Telerik.Web.UI.DataPagerPageSizeChangingEventArgs",Sys.CancelEventArgs);
})();

