function DHTMLpagenation(content) { 
	 var html =  content;
    html  =  html.replace(/<\/?SPAN[^>]*>/gi,  ""  );//  Remove  all  SPAN  tags  
           html  =  html.replace(/<(\w[^>]*)  class=([^    |>]*)([^>]*)/gi,  "<$1$3")  ;  //  Remove  Class  attributes  
           //html  =  html.replace(/<(\w[^>]*)  style="([^"]*)"([^>]*)/gi,  "<$1$3")  ;  //  Remove  Style  attributes  
           html  =  html.replace(/<(\w[^>]*)  lang=([^    |>]*)([^>]*)/gi,  "<$1$3")  ;//  Remove  Lang  attributes  
           html  =  html.replace(/<\\?\?xml[^>]*>/gi,  "")  ;//  Remove  XML  elements  and  declarations  
           html  =  html.replace(/<\/?\w+:[^>]*>/gi,  "")  ;//  Remove  Tags  with  XML  namespace  declarations:  <o:p></o:p>  
           html  =  html.replace(/ /,  "  "  );//  Replace  the     
           //  Transform  <P>  to  <DIV>  
           var  re  =  new  RegExp("(<P)([^>]*>.*?)(<\/P>)","gi")  ;            //  Different  because  of  a  IE  5.0  error  
           html  =  html.replace(  re,  "<div$2</div>"  )  ;  
	with (this) 
{ 
	   
   
          
            



    this.content=html; 
    this.contentLength=content.length; 
    this.pageSizeCount; 
    this.perpageLength=100; //default perpage byte length. 
    this.currentPage=1; 
    //this.regularExp=/.+[\?\&]{1}page=(\d+)/; 
    this.regularExp=/\d+/; 
    this.divDisplayContent; 
    this.contentStyle=null; 
    this.strDisplayContent=""; 
    this.divDisplayPagenation; 
    this.strDisplayPagenation=""; 
     
    arguments.length==2?perpageLength=arguments[1]:''; 
    try { 
        divExecuteTime=document.createElement("DIV"); 
        document.body.appendChild(divExecuteTime); 
    } 
    catch(e) 
    { 
    } 
    if(document.getElementById("divContent")) 
    { 
        divDisplayContent=document.getElementById("divContent"); 
    } 
    else 
    { 
        try 
        { 
            divDisplayContent=document.createElement("DIV"); 
            divDisplayContent.id="divContent"; 
            document.body.appendChild(divDisplayContent); 
        } 
        catch(e) 
        { 
            return false; 
        } 
    } 
    if(document.getElementById("divPagenation")) 
    { 
        divDisplayPagenation=document.getElementById("divPagenation"); 
    } 
    else 
    { 
        try 
        { 
            divDisplayPagenation=document.createElement("DIV"); 
            divDisplayPagenation.id="divPagenation"; 
            document.body.appendChild(divDisplayPagenation); 
        } 
        catch(e) 
        { 
            return false; 
        } 
    } 
    DHTMLpagenation.initialize(); 
    return this; 
     
}}; 
DHTMLpagenation.initialize=function() { with (this) 
{ 
    divDisplayContent.className=contentStyle!=null?contentStyle:"divContent"; 
    if(contentLength<=perpageLength) 
    { 
        strDisplayContent=content; 
        divDisplayContent.innerHTML=strDisplayContent; 
        return null; 
    } 
    pageSizeCount=Math.ceil((contentLength/perpageLength)); 
    DHTMLpagenation.goto(currentPage); 
    DHTMLpagenation.displayContent(); 
}}; 
DHTMLpagenation.displayPage=function() { with (this) 
{ 
    strDisplayPagenation="分页："; 
    if(currentPage&&currentPage!=1) 
        strDisplayPagenation+='<a href="javascript:void(0)" onclick="DHTMLpagenation.previous()">上一页</a>  '; 
    else 
        strDisplayPagenation+="<font style=\"font-size:14px; font-color:#FF3300\" >上一页</font>  "; 
    for(var i=1;i<=pageSizeCount;i++) 
    { 
        if(i!=currentPage) 
            strDisplayPagenation+='<a href="javascript:void(0)" onclick="DHTMLpagenation.goto('+i+');">'+i+'</a>  '; 
        else 
            strDisplayPagenation+=i+"  "; 
    } 
    if(currentPage&&currentPage!=pageSizeCount) 
        strDisplayPagenation+='<a href="javascript:void(0)" onclick="DHTMLpagenation.next()">下一页</a>  '; 
    else 
        strDisplayPagenation+="<font style=\"font-size:14px; font-color:#FF3300\" >下一页</font>  "; 
    strDisplayPagenation+="共 " + pageSizeCount + " 页，每页" + perpageLength + "字 <!--字符，调整字符数：--><input type='hidden' value='"+perpageLength+"' id='ctlPerpageLength'><input type='hidden' value='确定' onclick='DHTMLpagenation.change(document.getElementById(\"ctlPerpageLength\").value);'>"; 
    divDisplayPagenation.innerHTML=strDisplayPagenation; 
}}; 
DHTMLpagenation.previous=function() { with(this) 
{ 
    DHTMLpagenation.goto(currentPage-1); 
}}; 
DHTMLpagenation.next=function() { with(this) 
{ 
    DHTMLpagenation.goto(currentPage+1); 
}}; 
DHTMLpagenation.goto=function(iCurrentPage) { with (this) 
{ 
    startime=new Date(); 
    if(regularExp.test(iCurrentPage)) 
    { 
        currentPage=iCurrentPage; 
        strDisplayContent=content.substr((currentPage-1)*perpageLength,perpageLength); 
    } 
    else 
    { 
        alert("page parameter error!"); 
    } 
    DHTMLpagenation.displayPage(); 
    DHTMLpagenation.displayContent(); 
}}; 
DHTMLpagenation.displayContent=function() { with (this) 
{ 
    divDisplayContent.innerHTML=strDisplayContent; 
}}; 
DHTMLpagenation.change=function(iPerpageLength) { with(this) 
{ 
    if(regularExp.test(iPerpageLength)) 
    { 
        DHTMLpagenation.perpageLength=iPerpageLength; 
        DHTMLpagenation.currentPage=1; 
        DHTMLpagenation.initialize(); 
    } 
    else 
    { 
        alert("请输入数字"); 
    } 
}}; 
// method 
// DHTMLpagenation(strContent,perpageLength) 
DHTMLpagenation(document.getElementById('Content').innerHTML,2000); 