var TINY={}; function T$(i){return document.getElementById(i)} function T$$(e,p){return p.getElementsByTagName(e)} TINY.table=function(){ function sorter(n,t,p){this.n=n; this.id=t; this.p=p; if(this.p.init){this.init()}} sorter.prototype.init=function(){ this.set(); var t=this.t, i=d=0; t.h=T$$('tr',t)[0]; t.l=t.r.length; t.w=t.r[0].cells.length; t.a=[]; t.c=[]; this.p.is=this.p.size; if(this.p.colddid){ d=T$(this.p.colddid); var o=document.createElement('option'); o.value=-1; o.innerHTML='All Columns'; d.appendChild(o) } for(i;i=s&&x0){this.g=s; this.page((s-1)*this.p.size)} }; sorter.prototype.size=function(s){ var t=this.t; if(s){this.p.size=s} this.g=1; this.d=Math.ceil(this.t.t/this.p.size); if(this.p.navid){T$(this.p.navid).style.display=this.d<2?'none':'block'} this.page(0); if(this.p.totalid){T$(this.p.totalid).innerHTML=t.t==0?1:this.d} if(this.p.pageddid){ var d=T$(this.p.pageddid), l=this.d+1; d.setAttribute('onchange',this.n+'.goto(this.value)'); while(d.hasChildNodes()){d.removeChild(d.firstChild)} for(var i=1;i<=this.d;i++){ var o=document.createElement('option'); o.value=i; o.innerHTML=i; d.appendChild(o) } } }; sorter.prototype.showall=function(){ this.size(this.t.t) }; sorter.prototype.search=function(f){ var i=x=n=0, k=-1, q=T$(f).value.toLowerCase(); if(this.p.colddid){k=T$(this.p.colddid).value} var s=(k==-1)?0:k, e=(k==-1)?this.t.w:parseInt(s)+1; for(i;i0){this.g=s; this.page((s-1)*this.p.size)} T$(this.p.pageddid).selectedIndex = this.g-1; // fixes 2nd issue }; Array.prototype.exists=function(v){ for(var i=0;ih?1:(g