/* XSearch Engine version5.2 */ /* D�velopp� by P.Bestebroer */ /* http://www.dynamic-core.net */ /* Traduction fran�aise Vincent Vaudey - xseditor@free.fr */ function trecords() { this.index=(trecords.count++) //this.link='' this.pages='' this.keywords='' //this.description='' return this } trecords.prototype.set=function(pages,keywords) { //this.link=link this.pages=pages this.keywords=keywords //this.description=description } trecords.prototype.searchstring=function() { return this.keywords } trecords.prototype.count=0 function add(pages,keywords) { al=records.length records[al]=new trecords() records[al].set(pages,keywords) } records = new Array() finds=0 sites=0 version="5.2" andresult=false SortResults=true display_start=0 displast=10 function searchAll(keyword) { var strResultContent = ''; var timeA=new Date() var nw=0 finds=0 sites=0 var x = parseIt(keyword) if(x == -1) return total_keywords=x 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 } } } } results_new=new Array() i=0; for (q=0; qsites) displast=sites // var timeB=new Date() // if (finds==0) { display_start=-1; displast=0 } displast = sites; strResultContent += sprintf(lang_results, (display_start+1), (displast), sites, keyword); //strResultContent += '
Tempo de execu��o: '+((timeB-timeA)/1000)+' segundos.
'; // if (displast>sites && finds!=0) displast=sites+1 if (finds==0) { strResultContent += sprintf(lang_notfound, keyword, keyword); } else { q2=display_start q3=displast for (q=display_start; q0) { rc=results[q].rec strResultContent += ""+records[rc].keywords+"
"; /* x1=records[rc].link.indexOf('http://') if (x1==-1) x1=records[rc].link.indexOf('href=')+5 else x1+=7 x2=records[rc].link.indexOf('>') 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-1) if (tmp.substring(0,1)=='"') tmp=tmp.substring(1,tmp.length-1) document.write("
"+records[rc].description+"
"+tmp+"

") } */ for (p in records[rc].pages) { aLink = indices[records[rc].pages[p]].split("|"); link = aLink[0]; desc = aLink[1]; strResultContent += " "+desc+"
"; // John Lennon } q2++ } strResultContent += "
"; } // if (finds>10) // { // strResultContent += "
"; // pages=Math.round(finds/10) // if (finds%10<6) pages++ // // // Cr�� la cha�me de param�tres // paramstring=searchname+"#keywords="+keyword+"&and="+andresult+"&sort="+SortResults // // strResultContent += ""; // if (display_start>0) strResultContent += ""+lang_prevpage+""; // strResultContent += "   "; // // for (i=1; i<=pages; i+=1) // { // if ((((i-1)*10)+1)<=sites) strResultContent += ""+i+"   "; // } // strResultContent += "   "; // if (displast<=sites) strResultContent += ""+lang_nextpage+""; // strResultContent += ""; // } } document.getElementById('pageContent').innerHTML = strResultContent; } function Cat() { 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() { templateBody(); var keytext='"'+searchname+'#keywords="+' var andtext='"&and="+' document.write('