var msgTotlePage="Total";var msgPrePageSize="Size";var msgCurrentPage="Current";var msgPrePage="Pre";var msgNextpage="Next";var msgTo="To";var msgPage="Page";var msgGo="Go";var msgPageNumberError="page number is wrong";var msgFirstPage="First";var msgLastPage="Last";var pageInfos=new Array();function pageInfo(){var c;var d;var b;var a}function buildFullTableInfo(o,c,C){var k=parseInt(C.fullListSize/C.objectsPerPage);if(k==C.fullListSize/C.objectsPerPage){c.totlePage=k}else{c.totlePage=k+1}c.totleNumber=C.fullListSize;c.pageNumber=C.pageNumber;c.pageSize=C.objectsPerPage;pageInfos[o]=c;var m=document.getElementById(o+"_pageInfo");m.innerHTML="";var s;var t;var h=document.createElement("input");var z=document.createElement("input");h.setAttribute("type","button");h.setAttribute("class","first");h.setAttribute("className","first");z.setAttribute("type","button");z.setAttribute("class","end");z.setAttribute("className","end");var v=c.pageNumber+1;var B=c.pageNumber-1;s=document.createElement("input");s.setAttribute("type","button");s.setAttribute("class","pgUp");s.setAttribute("className","pgUp");t=document.createElement("input");t.setAttribute("type","button");t.setAttribute("class","pgDn");t.setAttribute("className","pgDn");if(c.totlePage==c.pageNumber){if(c.totlePage==1||c.totlePage==0){}else{s.onclick=function(){toPage(o,B)};s.onmouseover=function(){this.setAttribute("class","pgUpHover");this.setAttribute("className","pgUpHover")};s.onmouseout=function(){this.setAttribute("class","pgUp");this.setAttribute("className","pgUp")};h.onmouseover=function(){this.setAttribute("class","firstHover");this.setAttribute("className","firstHover")};h.onmouseout=function(){this.setAttribute("class","first");this.setAttribute("className","first")}}}else{if(c.pageNumber==1||c.pageNumber==0){if(c.totlePage>1){t.onclick=function(){toPage(o,v)};t.onmouseover=function(){this.setAttribute("class","pgDnHover");this.setAttribute("className","pgDnHover")};t.onmouseout=function(){this.setAttribute("class","pgDn");this.setAttribute("className","pgDn")};z.onmouseover=function(){this.setAttribute("class","endHover");this.setAttribute("className","endHover")};z.onmouseout=function(){this.setAttribute("class","end");this.setAttribute("className","end")}}else{}}else{s.onclick=function(){toPage(o,B)};s.onmouseover=function(){this.setAttribute("class","pgUpHover");this.setAttribute("className","pgUpHover")};s.onmouseout=function(){this.setAttribute("class","pgUp");this.setAttribute("className","pgUp")};t.onmouseover=function(){this.setAttribute("class","pgDnHover");this.setAttribute("className","pgDnHover")};t.onmouseout=function(){this.setAttribute("class","pgDn");this.setAttribute("className","pgDn")};t.onclick=function(){toPage(o,v)};h.onmouseover=function(){this.setAttribute("class","firstHover");this.setAttribute("className","firstHover")};h.onmouseout=function(){this.setAttribute("class","first");this.setAttribute("className","first")};z.onmouseover=function(){this.setAttribute("class","endHover");this.setAttribute("className","endHover")};z.onmouseout=function(){this.setAttribute("class","end");this.setAttribute("className","end")}}}var y=document.createElement("span");y.innerHTML=msgTotlePage+":"+c.totleNumber;var f=document.createElement("span");f.setAttribute("class","page-info");if(c.totlePage==0){c.pageNumber=0}f.innerHTML=msgCurrentPage+":"+c.pageNumber+"/"+c.totlePage;m.appendChild(y);m.appendChild(f);var w=getElementsByName_iefix("span",o+"_pageSize");var l=new Array();if(w!=null){for(var x=0;x<w.length;x++){var a=document.createElement("span");if(w[x].innerHTML!=c.pageSize){a.onclick=function(){setPageSize(o,this.innerHTML)};a.onmouseover=function(){this.setAttribute("class","div_href");this.setAttribute("className","div_href")};a.onmouseout=function(){this.setAttribute("class","");this.setAttribute("className","")}}else{a.setAttribute("class","div_curr");a.setAttribute("className","div_curr")}a.setAttribute("name",o+"_pageSize");a.innerHTML=w[x].innerHTML;l[x]=a}}var g=document.getElementById(o+"_pageSizes");g.innerHTML="";var q=document.createElement("span");q.innerHTML=msgPrePageSize+":";g.appendChild(q);for(var x=0;x<l.length;x++){g.appendChild(l[x])}var D=document.getElementById(o+"_pageBottom");D.innerHTML="";if(c.pageNumber==1){}else{h.onclick=function(){toPage(o,1)}}if(c.pageNumber==c.totlePage){}else{z.onclick=function(){toPage(o,c.totlePage)}}D.appendChild(h);D.appendChild(s);var p=parseInt((c.pageNumber-1)/10);var e;if(p>=1){e=document.createElement("a");e.setAttribute("class","page-break");var r=parseInt((p*10));e.setAttribute("href","javascript:toPage('"+o+"',"+r+")");e.innerHTML="...";D.appendChild(e)}for(var x=p*10+1;x<=c.totlePage&&x<(p+1)*10+1;x++){var j;if(x==c.pageNumber){j=document.createElement("span");j.setAttribute("class","div_curr");j.setAttribute("className","div_curr")}else{j=document.createElement("a");j.setAttribute("href","javascript:toPage('"+o+"','"+x+"')")}j.innerHTML=x;D.appendChild(j)}if(c.totlePage>(p+1)*10){nextBreak=document.createElement("a");nextBreak.setAttribute("class","page-break");var r=parseInt(((p+1)*10))+1;nextBreak.setAttribute("href","javascript:toPage('"+o+"',"+r+")");nextBreak.innerHTML="...";D.appendChild(nextBreak)}D.appendChild(t);D.appendChild(z);var d=document.createElement("span");d.setAttribute("class","page-skip");var u=document.createElement("span");u.innerHTML=msgTo;var n=document.createElement("input");n.setAttribute("name","jumpto");n.setAttribute("className","jump");n.setAttribute("class","jump");n.setAttribute("maxLength","2");n.setAttribute("id",o+"jumpto");n.setAttribute("value","");var b=document.createElement("span");b.innerHTML=msgPage;d.appendChild(u);d.appendChild(n);d.appendChild(b);D.appendChild(d);var A=document.createElement("input");A.setAttribute("type","button");A.setAttribute("class","jumpBTN");A.setAttribute("className","jumpBTN");A.setAttribute("value",msgGo);A.onclick=function(){toPage(o,document.getElementById(o+"jumpto").value)};D.appendChild(A)}function buildPreNavTable(e,q,g){var n=parseInt(g.fullListSize/g.objectsPerPage);if(n==g.fullListSize/g.objectsPerPage){q.totlePage=n}else{q.totlePage=n+1}q.totleNumber=g.fullListSize;if(g.fullListSize>0){q.pageNumber=g.pageNumber}else{q.pageNumber=g.pageNumber-1}q.pageSize=g.objectsPerPage;pageInfos[e]=q;var c=getElementsByName_iefix("span",e+"_pageInfo");var p=c[0];p.innerHTML="";var h=document.createElement("span");h.innerHTML=msgCurrentPage+":"+q.pageNumber+"/"+q.totlePage;p.appendChild(h);var d=parseInt((q.pageNumber-1)/10);var o;if(d>=1){o=document.createElement("a");o.setAttribute("class","page-break");var m=parseInt((d*10));o.setAttribute("href","javascript:toPage('"+e+"',"+m+")");o.innerHTML="...";p.appendChild(o)}for(var f=d*10+1;f<=q.totlePage&&f<(d+1)*10+1;f++){var l;if(f==q.pageNumber){l=document.createElement("span");l.setAttribute("class","div_curr");l.setAttribute("className","div_curr")}else{l=document.createElement("a");l.setAttribute("href","javascript:toPage('"+e+"','"+f+"')")}l.innerHTML=f;p.appendChild(l)}if(q.totlePage>(d+1)*10){nextBreak=document.createElement("a");nextBreak.setAttribute("class","page-break");var m=parseInt((d+1)*10)+1;nextBreak.setAttribute("href","javascript:toPage('"+e+"',"+m+")");nextBreak.innerHTML="...";p.appendChild(nextBreak)}var r=document.createElement("span");r.setAttribute("class","page-skip");var b=document.createElement("span");b.innerHTML=msgTo;var a=document.createElement("input");a.setAttribute("name","jumpto");a.setAttribute("className","jump");a.setAttribute("class","jump");a.setAttribute("maxLength","3");a.setAttribute("id",e+"jumpto");a.setAttribute("value","");var k=document.createElement("span");k.innerHTML=msgPage;r.appendChild(b);r.appendChild(a);r.appendChild(k);p.appendChild(r);var j=document.createElement("input");j.setAttribute("type","button");j.setAttribute("class","jumpBTN");j.setAttribute("className","jumpBTN");j.setAttribute("value",msgGo);j.onclick=function(){toPage(e,document.getElementById(e+"jumpto").value)};p.appendChild(j)}function buildTailTable(k,b,w){var h=parseInt(w.fullListSize/w.objectsPerPage);if(h==w.fullListSize/w.objectsPerPage){b.totlePage=h}else{b.totlePage=h+1}b.totleNumber=w.fullListSize;b.pageNumber=w.pageNumber;b.pageSize=w.objectsPerPage;pageInfos[k]=b;var n;var o;var f=document.createElement("input");var t=document.createElement("input");f.setAttribute("type","button");f.setAttribute("class","first");f.setAttribute("className","first");t.setAttribute("type","button");t.setAttribute("class","end");t.setAttribute("className","end");var q=b.pageNumber+1;var v=b.pageNumber-1;n=document.createElement("input");n.setAttribute("type","button");n.setAttribute("class","pgUp");n.setAttribute("className","pgUp");o=document.createElement("input");o.setAttribute("type","button");o.setAttribute("class","pgDn");o.setAttribute("className","pgDn");if(b.totlePage==b.pageNumber){if(b.totlePage==1||b.totlePage==0){}else{n.onclick=function(){toPage(k,v)};n.onmouseover=function(){this.setAttribute("class","pgUpHover");this.setAttribute("className","pgUpHover")};n.onmouseout=function(){this.setAttribute("class","pgUp");this.setAttribute("className","pgUp")};f.onmouseover=function(){this.setAttribute("class","firstHover");this.setAttribute("className","firstHover")};f.onmouseout=function(){this.setAttribute("class","first");this.setAttribute("className","first")}}}else{if(b.pageNumber==1||b.pageNumber==0){if(b.totlePage>1){o.onclick=function(){toPage(k,q)};o.onmouseover=function(){this.setAttribute("class","pgDnHover");this.setAttribute("className","pgDnHover")};o.onmouseout=function(){this.setAttribute("class","pgDn");this.setAttribute("className","pgDn")};t.onmouseover=function(){this.setAttribute("class","endHover");this.setAttribute("className","endHover")};t.onmouseout=function(){this.setAttribute("class","end");this.setAttribute("className","end")}}else{}}else{n.onclick=function(){toPage(k,v)};n.onmouseover=function(){this.setAttribute("class","pgUpHover");this.setAttribute("className","pgUpHover")};n.onmouseout=function(){this.setAttribute("class","pgUp");this.setAttribute("className","pgUp")};o.onmouseover=function(){this.setAttribute("class","pgDnHover");this.setAttribute("className","pgDnHover")};o.onmouseout=function(){this.setAttribute("class","pgDn");this.setAttribute("className","pgDn")};o.onclick=function(){toPage(k,q)};f.onmouseover=function(){this.setAttribute("class","firstHover");this.setAttribute("className","firstHover")};f.onmouseout=function(){this.setAttribute("class","first");this.setAttribute("className","first")};t.onmouseover=function(){this.setAttribute("class","endHover");this.setAttribute("className","endHover")};t.onmouseout=function(){this.setAttribute("class","end");this.setAttribute("className","end")}}}if(b.pageNumber==1){}else{f.onclick=function(){toPage(k,1)}}if(b.pageNumber==b.totlePage){}else{t.onclick=function(){toPage(k,b.totlePage)}}var x=document.getElementById(k+"_pageBottom");x.innerHTML="";var s=document.createElement("span");s.innerHTML=msgTotlePage+":"+b.totleNumber;var e=document.createElement("span");e.setAttribute("class","page-info");e.innerHTML=msgCurrentPage+":"+b.pageNumber+"/"+b.totlePage;x.appendChild(s);x.appendChild(f);x.appendChild(n);var l=parseInt((b.pageNumber-1)/10);var d;if(l>=1){d=document.createElement("a");d.setAttribute("class","page-break");var m=parseInt((l*10));d.setAttribute("href","javascript:toPage('"+k+"',"+m+")");d.innerHTML="...";x.appendChild(d)}for(var r=l*10+1;r<=b.totlePage&&r<(l+1)*10+1;r++){var g;if(r==b.pageNumber){g=document.createElement("span");g.setAttribute("class","div_curr");g.setAttribute("className","div_curr")}else{g=document.createElement("a");g.setAttribute("href","javascript:toPage('"+k+"','"+r+"')")}g.innerHTML=r;x.appendChild(g)}if(b.totlePage>(l+1)*10){nextBreak=document.createElement("a");nextBreak.setAttribute("class","page-break");var m=parseInt(((l+1)*10))+1;nextBreak.setAttribute("href","javascript:toPage('"+k+"',"+m+")");nextBreak.innerHTML="...";x.appendChild(nextBreak)}x.appendChild(o);x.appendChild(t);var c=document.createElement("span");c.setAttribute("class","page-skip");var p=document.createElement("span");p.innerHTML=msgTo;var j=document.createElement("input");j.setAttribute("name","jumpto");j.setAttribute("className","jump");j.setAttribute("class","jump");j.setAttribute("maxLength","2");j.setAttribute("id",k+"jumpto");j.setAttribute("value","");var a=document.createElement("span");a.innerHTML=msgPage;c.appendChild(p);c.appendChild(j);c.appendChild(a);x.appendChild(c);var u=document.createElement("input");u.setAttribute("type","button");u.setAttribute("class","jumpBTN");u.setAttribute("className","jumpBTN");u.setAttribute("value",msgGo);u.onclick=function(){toPage(k,document.getElementById(k+"jumpto").value)};x.appendChild(u)}function checkToPage(b,a){pageInfo=pageInfos[b];if(a==0||a==""||a=="undefined"||pageInfo.totlePage==0||pageInfo.totlePage==""){return false}if(a<1||isNaN(a)||a>pageInfo.totlePage||a!=parseInt(a)){alert(msgPageNumberError);return false}return true}function setPageSize(c,a){var b=pageInfos[c];b.pageSize=a;toPage(c,1)}function getPageInfo(a){return pageInfos[a]}function getElementsByName_iefix(b,c){var d=document.getElementsByTagName(b);var a=new Array();for(i=0,iarr=0;i<d.length;i++){att=d[i].getAttribute("name");if(att==c){a[iarr]=d[i];iarr++}}return a};
