public void setTotal(int total) {
		this.total = total;
		int pages = total / size;
		boolean hasMore = (0 != total % size);
		if (0 == pages) {
			totalPage = 1;
		} else {
			if (hasMore) {
				totalPage = pages + 1;
			} else {
				totalPage = pages;
			}
		}
		if (curpage > totalPage) {
			curpage = totalPage;
		}
		if (curpage < 1) {
			curpage = 1;
		}
	}