	  var page=1;
      var pageCount=1;
      var PageRecord=20;
      var recordTotal=0;
      
      function getPageCountValue(recordCount)
      {
       recordTotal=recordCount;
       var pageCounts;
       if(recordCount%PageRecord==0)
       {
        pageCounts=parseInt(recordCount/PageRecord);
       }else{
        pageCounts=parseInt(recordCount/PageRecord)+1;
       } 
        pageCount=pageCounts;
       var obj=document.getElementById("totalPage");
       obj.innerHTML=pageCount;
       var obj2=document.getElementById("totalRecord");
       obj2.innerHTML=recordTotal;
       
       
      }
      function first(){
      	 GetPages.getFirst(1,callback);
      }
      
      function next()
      {
       if(page>=pageCount)
       {
         alert("已经是最后一页！");
         return;
       }
       GetPages.getNext(page,callback);
      }
      function up()
      {
       if(page==1)
       {
         alert("已经是第一页！！");
         return;
       }
       GetPages.getUp(page,callback);
      }
      function last()
      {
       GetPages.getLast(pageCount,callback);
      }
      function jumping(){
       var oldpage=page;
       page=document.getElementById("jumpPage").value;
       if(page>pageCount)
       {
         page=oldpage;
         alert("输入的页码大于最大页码，请重新输入！");
         return;
       }
       if(page<=0)
       {
        page=oldpage;
        alert("请输入大于0的页码数！");
        return;
       }
       if(!isNumber(page))
       {
        page=oldpage;
        alert("页码输入不正确！");
        return;
       }
       GetPages.jumping(page,callback);
	  }
	  
function isNumber(str){       
	var reg = /\D/;     
	return str.match(reg)==null;     
}
