{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 <SCRIPT LANGUAGE="JavaScript">\par
<!-- Original:  Dion (biab@iinet.net.au) -->\par
<!-- Web Site:  http://www.iinet.net.au/~biab -->\par
\par
<!-- This script and many more are available free online at -->\par
<!-- The JavaScript Source!! http://javascript.internet.com -->\par
\par
<!-- Begin\par
var item = new Array();\par
\par
/* Here is where all the magic happens.  \par
    Just enter as many additional pages that\par
    that you want to search, then fill in the\par
    additional listings for each page.\par
*/\par
\par
// "Page Name","path","Page Title","Many,Key,Words","Descriptive Comments"\par
\par
c=0; item[c]=new Array("index.html","","DemoSite","index,main,start,home,front","Demonstration search engine data about an imagined but probable internet site.");\par
c++; item[c]=new Array("about.htm","","About Me","about,author,contact,email,who","Contact details and general information about the creator of the site and what the site is about.");\par
c++; item[c]=new Array("links.htm","","Links page","links,more,where,similar,friends","Links to my favourite sites which I find interesting. Other friends sites which have similar interests to my own.");\par
c++; item[c]=new Array("main.htm","main/","Main Page","content,main,focus","The main part of my site which contains what you have come to see. Lots of stuff like that and more great things. All in a sub directory.");\par
c++; item[c]=new Array("logo.jpg","main/images/","Link Logo","link,image,logo,graphic","The logo.jpg is just a small image which you can place on your site as a link to me. It's in a second level subdirectory.");\par
\par
page="<html><head><title>Search Results</title></head><body bgcolor='white'><center><table border=0 cellspacing=10 width=80%>";\par
\par
\par
function search(frm) \{\par
win = window.open("","","scrollbars");\par
win.document.write(page);\par
txt = frm.srchval.value.split(" ");\par
fnd = new Array(); total=0;\par
for (i = 0; i < item.length; i++) \{\par
fnd[i] = 0; order = new Array(0, 4, 2, 3);\par
for (j = 0; j < order.length; j++)\par
for (k = 0; k < txt.length; k++)\par
if (item[i][order[j]].toLowerCase().indexOf(txt[k]) > -1 && txt[k] != "")\par
fnd[i] += (j+1);\par
\}\par
for (i = 0; i < fnd.length; i++) \{\par
n = 0; w = -1;\par
for (j = 0;j < fnd.length; j++)\par
if (fnd[j] > n) \{ n = fnd[j]; w = j; \};\par
if (w > -1) total += show(w, win, n);\par
fnd[w] = 0;\par
\}\par
win.document.write("</table><br>Total found: "+total+"<br></body></html>");\par
win.document.close();\par
\}\par
function show(which,wind,num) \{\par
link = item[which][1] + item[which][0]; \par
line = "<tr><td><a href='"+link+"'>"+item[which][2]+"</a> Score: "+num+"<br>";\par
line += item[which][4] + "<br>"+link+"</td></tr>";\par
wind.document.write(line);\par
return 1;\par
\}\par
//  End -->\par
</script>\par
}
 