﻿<!--
function StonePage()
{
	this.Uri = '?';
	this.RecordCount = 0;
	this.PageCount = 0;
	this.PageSize = 0;
	this.PageNo = 0;
	this.Border = 1;
	
	this.Show = function()
	{
		var sign = this.Uri.substr(this.Uri.length-1);
		if(sign!='?' && sign!='&') this.Uri += '&';
		this.Uri = this.Uri.replace("'", "%27");
		document.write('<table width="100%" border="'+this.Border+'" cellspacing="1" cellpadding="1" style="border-collapse:collapse;">');
		document.write('<tr height="21">');
		document.write('<td style="font-size:12px;">');
		document.write('总数 <strong>'+this.RecordCount+'</strong>，');
		document.write('页数 <strong>'+this.PageCount+'</strong>，');
		document.write('每页 <strong>'+this.PageSize+'</strong>');
		document.write('</td>');
		document.write('<td width="100" align="right" style="font-size:12px;">第 <strong>'+this.PageNo+'</strong> 页</td>');
		document.write('</tr>');
		document.write('<tr height="21">');
		document.write('<td style="font-size:12px;">页次：');

		var M = parseInt((this.PageCount-1) / 10, 10);
		var N = parseInt((this.PageNo-1) / 10, 10);
		var E = 0;

		if(N > 0)
		{
			document.write('<span onclick="window.location=\''+this.Uri+'PageNo=1\'" style="font-family:webdings;cursor:hand;" title="首页">7</span>');
			document.write('&nbsp;<span onclick="window.location=\''+this.Uri+'PageNo='+(N*10)+'\'" style="font-family:webdings;cursor:hand;" title="上十页">3</span>');
		}

		for (var I=1; I<=10; I++)
		{
			E = N * 10 + I;
			if(E > this.PageCount) break;
			if(E == this.PageNo)
			{
				document.write('&nbsp;<B><U>'+E+'</U></B>');
			}
			else
			{
				document.write('&nbsp;<span onclick="window.location=\''+this.Uri+'PageNo='+E+'\'" style="cursor:hand;"><B>'+E+'</B></span>');
			}
		}

		if(N < M)
		{
			document.write('&nbsp;<span onclick="window.location=\''+this.Uri+'PageNo='+(N*10+11)+'\'" style="font-family:webdings;cursor:hand;" title="下十页">4</span>');
			document.write('&nbsp;<span onclick="window.location=\''+this.Uri+'PageNo='+this.PageCount+'\'" style="font-family:webdings;cursor:hand;" title="尾页">8</span>');
		}

		document.write('</td>');
		document.write('<form method="post" onSubmit="window.location=\''+this.Uri+'PageNo=\'+PageNo.value; return false;">');
		document.write('<td align="right">');
		document.write('<strong>GO</strong> <input type="text" name="PageNo" value="'+this.PageNo+'" maxlength="8" style="width:36px;height:12px;border-left:0px;border-right:0px;border-top:0px;border-bottom:1px solid #666666;">');
		document.write('</td>');
		document.write('</form>');
		document.write('</tr>');
		document.write('</table>');
	};
	
	this.toString = function()
	{
		return '[class StonePage]';
	};
}
//-->
