var kkpager={pagerid:"kkpager",mode:"link",pno:1,total:1,totalRecords:0,isShowFirstPageBtn:true,isShowLastPageBtn:true,isShowPrePageBtn:true,isShowNextPageBtn:true,isShowTotalPage:true,isShowCurrPage:true,isShowTotalRecords:true,isGoPage:true,isWrapedPageBtns:true,isWrapedInfoTextAndGoPageBtn:true,hrefFormer:"",hrefLatter:"",gopageWrapId:"kkpager_gopage_wrap",gopageButtonId:"kkpager_btn_go",gopageTextboxId:"kkpager_btn_go_input",lang:{firstPageText:"首页",firstPageTipText:"首页",lastPageText:"尾页",lastPageTipText:"尾页",prePageText:"上一页",prePageTipText:"上一页",nextPageText:"下一页",nextPageTipText:"下一页",totalPageBeforeText:"共",totalPageAfterText:"页",currPageBeforeText:"当前第",currPageAfterText:"页",totalInfoSplitStr:"/",totalRecordsBeforeText:"共",totalRecordsAfterText:"条数据",gopageBeforeText:" 转到",gopageButtonOkText:"确定",gopageAfterText:"页",buttonTipBeforeText:"第",buttonTipAfterText:"页"},getLink:function(n){if(n==1){return this.hrefFormer+this.hrefLatter}return this.hrefFormer+"_"+n+this.hrefLatter},click:function(n){return false},getHref:function(n){return"#"},focus_gopage:function(){var btnGo=$("#"+this.gopageButtonId);$("#"+this.gopageTextboxId).attr("hideFocus",true);btnGo.show();btnGo.css("left","10px");$("#"+this.gopageTextboxId).addClass("focus");btnGo.animate({left:"+=30"},50)},blur_gopage:function(){var _this=this;setTimeout(function(){var btnGo=$("#"+_this.gopageButtonId);btnGo.animate({left:"-=25"},100,function(){btnGo.hide();$("#"+_this.gopageTextboxId).removeClass("focus")})},400)},keypress_gopage:function(){var event=arguments[0]||window.event;var code=event.keyCode||event.charCode;if(code==8){return true}if(code==13){kkpager.gopage();return false}if(event.ctrlKey&&(code==99||code==118)){return true}if(code<48||code>57){return false}return true},gopage:function(){var str_page=$("#"+this.gopageTextboxId).val();if(isNaN(str_page)){$("#"+this.gopageTextboxId).val(this.next);return}var n=parseInt(str_page);if(n<1){n=1}if(n>this.total){n=this.total}if(this.mode=="click"){this._clickHandler(n)}else{window.location=this.getLink(n)}},selectPage:function(n){this._config["pno"]=n;this.generPageHtml(this._config,true)},generPageHtml:function(config,enforceInit){if(enforceInit||!this.inited){this.init(config)}var str_first="",str_prv="",str_next="",str_last="";if(this.isShowFirstPageBtn){if(this.hasPrv){str_first="'+this.lang.firstPageText+""}else{str_first=''+this.lang.firstPageText+""}}if(this.isShowPrePageBtn){if(this.hasPrv){str_prv="'+this.lang.prePageText+""}else{str_prv=''+this.lang.prePageText+""}}if(this.isShowNextPageBtn){if(this.hasNext){str_next="'+this.lang.nextPageText+""}else{str_next=''+this.lang.nextPageText+""}}if(this.isShowLastPageBtn){if(this.hasNext){str_last="'+this.lang.lastPageText+""}else{str_last=''+this.lang.lastPageText+""}}var str="";var dot='...';var total_info='';var total_info_splitstr=''+this.lang.totalInfoSplitStr+"";if(this.isShowCurrPage){total_info+=this.lang.currPageBeforeText+''+this.pno+""+this.lang.currPageAfterText;if(this.isShowTotalPage){total_info+=total_info_splitstr;total_info+=this.lang.totalPageBeforeText+''+this.total+""+this.lang.totalPageAfterText}else{if(this.isShowTotalRecords){total_info+=total_info_splitstr;total_info+=this.lang.totalRecordsBeforeText+''+this.totalRecords+""+this.lang.totalRecordsAfterText}}}else{if(this.isShowTotalPage){total_info+=this.lang.totalPageBeforeText+''+this.total+""+this.lang.totalPageAfterText;if(this.isShowTotalRecords){total_info+=total_info_splitstr;total_info+=this.lang.totalRecordsBeforeText+''+this.totalRecords+""+this.lang.totalRecordsAfterText}}else{if(this.isShowTotalRecords){total_info+=this.lang.totalRecordsBeforeText+''+this.totalRecords+""+this.lang.totalRecordsAfterText}}}total_info+="";var gopage_info="";if(this.isGoPage){gopage_info=''+this.lang.gopageBeforeText+''+''+''+this.lang.gopageAfterText+"" }if(this.total<=8){for(var i=1;i<=this.total;i++){if(this.pno==i){str+=''+i+""}else{str+="'+i+""}}}else{if(this.pno<=5){for(var i=1;i<=7;i++){if(this.pno==i){str+=''+i+""}else{str+="'+i+""}}str+=dot}else{str+="1';str+="2';str+=dot;var begin=this.pno-2;var end=this.pno+2;if(end>this.total){end=this.total;begin=end-4;if(this.pno-begin<2){begin=begin-1}}else{if(end+1==this.total){end=this.total}}for(var i=begin;i<=end;i++){if(this.pno==i){str+=''+i+""}else{str+="'+i+""}}if(end!=this.total){str+=dot}}}var pagerHtml="