//显示方式三
//页码选择列表
//Output=Output+"<td align=right bgcolor=#f0faff>";
//Output=Output+Article_PageNav(0,Page);
//Output=Output+"</td>";
Output=Output+"</tr>";
Output=Output+"<tr>";
Output=Output+"<td height=1 background=Images/DotLine.gif></td>";
Output=Output+"</tr>";
Output=Output+"</table>";
//显示正文
if(Page==0) {
//不分页
tempText=Text;
}
else{
//分页
if (flag==1)
//自动分页
{
tempText=Text.substring(PageNum[Page-1],PageNum[Page]);
}
else{
//手动分页
if (PageTitle[Page-1].length==0)
{
tempText=Text.substring(PageNum[Page-1]+10,PageNum[Page]);
}
else{
tempText=Text.substring(PageNum[Page-1]+11+PageTitle[Page-1].length,PageNum[Page]);
}
}
}
//布置内容
Output=Output+"<div align=center>";
Output=Output+Article_PageNav(TopShowStyle,Page);
Output=Output+"</div>";
Output=Output+"<div id=world>";
Output=Output+tempText;
Output=Output+"</div>";
Output=Output+"<br>";
Output=Output+"<div align=center>";
Output=Output+Article_PageNav(DownShowStyle,Page);
Output=Output+"</div>";
article.innerHTML = Output;
if (Page>1)
{
document.location.href='#top';
}
eval(document.all.keys).value=key;
if (key!=""){searchkey();}
}
function searchkey(){
//正文查找函数
h="<font class=keyworld>";
f="</font>";
keyset=new Array();
key=document.all.keys.value;
if (key==""){
alert("请输入关键字!");
return;
}
else{
keyset[0]=tempText.indexOf(key,0);
if (keyset[0]<0){
return;
}else
temp=tempText.substring(0,keyset[0]);
temp=temp+h+key+f;
temp2=tempText.substring(keyset[0]+key.length,tempText.length);
for (i=1;i<tempText.length;i++) {
keyset[i]=tempText.indexOf(key,keyset[i-1]+key.length);
if(keyset[i]<0){
temp=temp+tempText.substring(keyset[i-1]+key.length,tempText.length);
break;
}else{
temp=temp+tempText.substring(keyset[i-1]+key.length,keyset[i])+h+key+f;
}
}
world.innerHTML = temp;
}
}
function Article_PageNav(ShowStyle,Page){
//分页码显示函数
//参数为调用样式,0=简单样式,1=标准样式
var temp="";
if (ShowStyle==0)
//简单样式
{
tempPage=Page;
if(TotalByte>PageSize){
if (Page-4<=1){
temp=temp+"<font face=webdings color=#999999>9</font>";
if (Page<=1){temp=temp+"<font face=webdings color=#999999>7</font>";}else{temp=temp+"<a href=javascript:text_pagination("+(Page-1)+")><font face=webdings>7</font></a>";}
if (PageCount>10){
for(i=1;i<8;i++){
if (i==Page){
temp=temp+"<font color=red>"+i+"</font> ";
}else{
temp=temp+"<a href=javascript:text_pagination("+i+") >"+i+"</a>"+" ";
}
}
temp=temp+" ...";
}
else{
for(i=1;i<PageCount+1;i++){
if (i==Page){
temp=temp+"<font color=red>"+i+"</font> ";
}
else{
temp=temp+"<a href=javascript:text_pagination("+i+") >"+i+"</a>"+" ";
}
}
}
if (Page==PageCount){temp=temp+"<font face=webdings color=#999999>8</font>";}else{temp=temp+"<a href=javascript:text_pagination("+(Page+1)+")><font face=webdings>8</font></a>";}
if(PageCount<10){temp=temp+"<font face=webdings color=#999999>:</font>";}else{temp=temp+"<a href=javascript:text_pagination("+PageCount+")><font face=webdings>:</font></a>";}
}
else if(Page+4<=PageCount){
temp=temp+"<a href=javascript:text_pagination(1)><font face=webdings>9</font></a>";
temp=temp+"<a href=javascript:text_pagination("+(Page-1)+")><font face=webdings>7</font></a>";
if (PageCount>10){
temp=temp+"..";
for(i=Page-4;i<Page+4;i++){
if (i==Page){
temp=temp+"<font color=red>"+i+"</font> ";
}
else{
temp=temp+"<a href=javascript:text_pagination("+i+") >"+i+"</a>"+" ";
}
}
temp=temp+" ..";
}
else{
for(i=1;i<PageCount+1;i++){
if (i==Page){
temp=temp+"<font color=red>"+i+"</font> ";
}
else{
temp=temp+"<a href=javascript:text_pagination("+i+") >"+i+"</a>"+" ";
}
}
}
if (Page==PageCount){temp=temp+"<font face=webdings color=#999999>8</font>";}else{temp=temp+"<a href=javascript:text_pagination("+(Page+1)+")><font face=webdings>8</font></a>";}
temp=temp+"<a href=javascript:text_pagination("+PageCount+")><font face=webdings>:</font></a>";