Pager = function (cName)
{
	this.Total = 0;
	this.PageSize = 0;
	this.CurrentPage = 1;
	this.PageButtonNumber = 5;
	this.ShowPagerBar = function ()
	{
		this.PageCount = Math.ceil(this.Total/this.PageSize);
		this.CurrentPage = this.CurrentPage * 1;
		if (this.CurrentPage>this.PageCount) this.CurrentPage=this.PageCount;
		if (this.CurrentPage<1) this.CurrentPage=1;
		if (this.PageButtonNumber%2==0) this.PageButtonNumber++
		this.PageButtonNumber2 = (this.PageButtonNumber - 1) / 2;
		var Html = "<div class='pager'>";
		if (this.CurrentPage==1) Html += "<span>上一页</span>";
		else Html += "<span style='cursor:pointer;'  onclick=\"javascript:" +cName+ ".goPrePage()\">上一页</span>";
		//分三种情况
		if (this.CurrentPage<=this.PageButtonNumber2)
			for (var i=1; i<=this.PageButtonNumber; i++)
			{
				if (i>this.PageCount) break;
				if (i==this.CurrentPage)
				Html += "<span><font color=red>" +i+ "</font></span>";
				else
				Html += "<span style='cursor:pointer;'  onclick=\"javascript:" +cName+ ".goPage(" +i+ ")\">" +i+ "</span>";
			}
		else if (this.CurrentPage+this.PageButtonNumber2>this.PageCount)
			for (var i= (this.PageCount-this.PageButtonNumber+1 > 0 ? this.PageCount-this.PageButtonNumber+1 : 1); i<=this.PageCount; i++)
			{
				if (i>this.PageCount) break;
				if (i==this.CurrentPage)
				Html += "<span><font color=red>" +i+ "</font></span>";
				else
				Html += "<span style='cursor:pointer;'  onclick=\"javascript:" +cName+ ".goPage(" +i+ ")\">" +i+ "</span>";
			}
		else
			for (var i= (this.CurrentPage-this.PageButtonNumber2 > 0 ? this.CurrentPage-this.PageButtonNumber2 : 1); i<=this.CurrentPage+this.PageButtonNumber2; i++)
			{
				if (i>this.PageCount) break;
				if (i==this.CurrentPage)
				Html += "<span><font color=red>" +i+ "</font></span>";
				else
				Html += "<span style='cursor:pointer;'  onclick=\"javascript:" +cName+ ".goPage(" +i+ ")\">" +i+ "</span>";
			}
		if (this.CurrentPage==this.PageCount) Html+= "<span>下一页</span>";
		else Html += "<span style='cursor:pointer;'  onclick=\"javascript:" +cName+ ".goNextPage()\">下一页</span>";
		Html += "<span>" +this.CurrentPage+ "/" +this.PageCount+ "</span>"
		Html += "<input type=\"text\" class='f-text' size=\"3\" id=\"_DronFw_Pager_PagerInput\" onchange=\"" +cName+ ".goPage(document.getElementById(\'_DronFw_Pager_PagerInput\').value)\">";
		return Html + "</div>";
	}
}