var item = new Array();

/* Here is where all the magic happens.  
    Just enter as many additional pages that
    that you want to search, then fill in the
    additional listings for each page.
*/

// "Page Name","path","Page Title","Many,Key,Words","Descriptive Comments"

c=0; item[c]=new Array("index.htm","http://www.ideaplexinc.com/products/","IdeaPlex Inc - Products","analyse,analysis,products,forecasting,forecasting software,DSS,problem solving,situation structuring,innovation","IdeaPlex, Inc. Products offered");
c++; item[c]=new Array("index.htm","http://www.ideaplexinc.com/services/","IdeaPlex Inc - Services Offered","Consulting,consulting services, services,problem solving,analysis,situation analysis,consulting,session","IdeaPlex, Inc. Services offered");
c++; item[c]=new Array("index.htm","http://www.ideaplexinc.com/clients/","IdeaPlex Inc - Clients","clients,customers,projects","IdeaPlex Inc - Our Clients");
c++; item[c]=new Array("cq.htm","http://www.ideaplexinc.com/products/","Products-CyberQuest","analyse,analysis,products,forecasting,software,DSS,innovation,multimedia,problem,problem solving,logic,association,business meeting,ideas","IdeaPlex Inc - CyberQuest");
c++; item[c]=new Array("qcq.htm","http://www.ideaplexinc.com/products/","IdeaPlex Inc - Quantitative CyberQuest","analyse,analysis,relationship,relationships,development,markets,market,technology,applications,tech","IdeaPlex Inc - Quantitative CyberQuest");
c++; item[c]=new Array("ss.htm","http://www.ideaplexinc.com/products/","IdeaPlex Inc - Situation Structuring","analysis,analyse,situation,situations,elements","IdeaPlex Inc - Our Clients");
c++; item[c]=new Array("index.htm","http://www.ideaplexinc.com/about/","About IdeaPlex Inc.","about,founders,founder,company,info,information","IdeaPlex Inc - About Us");
c++; item[c]=new Array("index.htm","http://www.ideaplexinc.com/contact/","IdeaPlex Inc - Contact Us","details,contact,email,information,info,","IdeaPlex Inc - Contacting Us");

c++; item[c]=new Array("filename.htm","http://www.ideaplexinc.com/","This is the page title","key,words,go,here","This is the description that shows in the results page");

page="<html><head><title>Search Results</title></head><body bgcolor='white'><center><table border=0 cellspacing=10 width=80%>";

function search(frm) {
win = window.open("","","scrollbars=yes,height=660,width=810,toolbar=yes,menubar=yes");
win.document.write(page);
txt = frm.srchval.value.split(" ");
fnd = new Array(); total=0;
for (i = 0; i < item.length; i++) {
fnd[i] = 0; order = new Array(0, 4, 2, 3);
for (j = 0; j < order.length; j++)
for (k = 0; k < txt.length; k++)
if (item[i][order[j]].toLowerCase().indexOf(txt[k]) > -1 && txt[k] != "")
fnd[i] += (j+1);
}
for (i = 0; i < fnd.length; i++) {
n = 0; w = -1;
for (j = 0;j < fnd.length; j++)
if (fnd[j] > n) { n = fnd[j]; w = j; };
if (w > -1) total += show(w, win, n);
fnd[w] = 0;
}
win.document.write("</table><br>Total found: "+total+"<br></body></html>");
win.document.close();
}
function show(which,wind,num) {
link = item[which][1] + item[which][0]; 
line = "<tr><td><a href='"+link+"'>"+item[which][2]+"</a> Score: "+num+"<br>";
line += item[which][4] + "<br>"+link+"</td></tr>";
wind.document.write(line);
return 1;
}