function trecords(){ this.index=(trecords.count++) this.link='' this.keywords='' this.description='' return this } trecords.prototype.set=function(link,keywords,description) { this.link=link this.keywords=keywords this.description=description } trecords.prototype.searchstring=function() { return this.link+' '+this.keywords+' '+this.description } trecords.prototype.count=0 function add(link,keywords,description) { al=records.length records[al]=new trecords() records[al].set(link,keywords,description) } records = new Array() finds=0 sites=0 version="v5.2" andresult=false SortResults=true display_start=0 displast=10 function bsort() { for (var i=results.length-1; i>=0; i--) { for (var j=i; j>=0; j--) { if (results[i].val>results[j].val) { s=results[i] results[i]=results[j] results[j]=s } } } } function searchAll(keyword){ var timeA=new Date() var nw=0 finds=0 sites=0 var x = parseIt(keyword) if(x == -1) return total_keywords=x document.open() document.clear() AddBody() if (keyword.length>50) keyword=keyword.substring(0,60)+"..." results=new Array() for (q=0; q0) { if (results[a].val<=(total_keywords-1)<<1) { results[a].val=0 sites-=1 } } } } if (SortResults && keywords!='[all]') bsort() displast=display_start displast+=10 if (displast>sites) displast=sites var timeB=new Date() if (finds==0) { display_start=-1; displast=0 } document.write("

Showing results "+(display_start+1)+"-"+(displast)+" of "+sites+" for "+keyword+" your search took "+((timeB-timeA)/1000)+" seconds.

") if (displast>sites && finds!=0) displast=sites+1 if (finds==0) { document.write("

no hits on ''"+keyword+"''

"+ "

Your search has been unsuccessful. Try rephrasing.

"+""+"

") DisplayXSearch() document.close() return } q2=display_start q3=displast for (q=display_start; q0) { rc=results[q].rec document.write(""+records[rc].link+"
") x1=records[rc].link.indexOf('http://') if (x1==-1) x1=records[rc].link.indexOf('href=')+5 else x1+=7 x2=records[rc].link.indexOf('>')-1 if (x1>0 && x2>0) { tmp=records[rc].link.substring(x1,x2) x2=tmp.indexOf(' ') if (x2>0) tmp=tmp.substring(0,x2) if (tmp.substring(0,1)=="'") tmp=tmp.substring(1,tmp.length-2) if (tmp.substring(0,1)=='"') tmp=tmp.substring(1,tmp.length-1) document.write("
"+records[rc].description+"

") } q2++ } } if (finds>10) { document.write(" ") pages=Math.round(finds/10) if (finds%10<6) pages++ paramstring=searchname+"?keywords="+keyword+"&and="+andresult+"&sort="+SortResults document.write("
") if (display_start>0) document.write("previous page") document.write("   ") for (i=1; i<=pages; i+=1){ if ((((i-1)*10)+1)<=sites) document.write(""+i+"   ") } document.write("   ") if (displast<=sites) document.write("Next page

") document.write("
") } DisplayXSearch() document.close() } function Catalog() { document.open() document.clear() AddBody() DisplayXSearch() document.close() } function stripInput(key) { while(key.substring(0,1) == "," || key.substring(0,1) == " " ) key = key.substring(1,key.length) while(key.substring(key.length-1,key.length) == "," || key.substring(key.length-1,key.length) == " ") key = key.substring(0,key.length-1) return key } function parseIt(key) { key=stripInput(key)+" " var y=0 while(key.indexOf(" ") > 0) { if (key.substring(0,1)=='"') { var pos=key.indexOf('"',2) keywords[y]=key.substring(1,pos) keywords[y]=stripInput(keywords[y]) y++ key=key.substring(pos+1,key.length) } else { var pos=key.indexOf(' AND ') if ((pos>0) && (key.indexOf(' ')>=pos)) { pos=key.indexOf(' ',pos+5) keywords[y]=key.substring(0,pos) keywords[y]=stripInput(keywords[y]) y++ key=key.substring(pos+1,key.length) if (key.substring(0,4)=='AND ') { pos=keywords[y-1].indexOf(' ')+5 key=keywords[y-1].substring(pos,keywords[y-1].length)+' '+key } } else { var pos=key.indexOf(' OR ') if ((pos>0) && (key.indexOf(' ')>=pos)) { pos=key.indexOf(' ') keywords[y]=key.substring(0,pos) keywords[y]=stripInput(keywords[y]) if (keywords[y]!=keywords[y-1]) y++ key=key.substring(pos+1,key.length) pos=key.indexOf('OR ') key=key.substring(pos+3,key.length) pos=key.indexOf(' ') keywords[y]=key.substring(0,pos) keywords[y]=stripInput(keywords[y]) y++ key=key.substring(pos+1,key.length) if (key.substring(0,3)=='OR ') key=keywords[y-1]+' '+key } else { var pos = key.indexOf(" ") keywords[y]=key.substring(0,pos) keywords[y] = stripInput(keywords[y]) y++ if(y > 50) return -1 key=key.substring(pos+1,key.length) } } } } return y-1 } var keywords = new Array() var results function AddBody() { var keytext='"'+searchname+'?keywords="+' var andtext='"&and="+' document.write('