// JavaScript Document

var item = new Array();

/*  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.html","../","Index","index,logo,capacitors,connectors,contact,hfparts,inductors,industrial,motors,others,payment,potentiometers,relays,risistors,semiconductors,shipment,switches,tubes,fuses","ARP-Electronics | All Radio Parts");
c++; item[c]=new Array("africa.html","","Shipment to Africa","Shipment,Costs,author,contact,email,who","Shipment details and general information about the creator of the site and what the site is about.");
c++; item[c]=new Array("australie.html","","Shipment to Australia","Shipment,Costs,author,contact,email,who","Shipment details and general information about the creator of the site and what the site is about.");
c++; item[c]=new Array("azie.html","","Shipment to Asia","Shipment,Costs,author,contact,email,who","Shipment details and general information about the creator of the site and what the site is about.");
c++; item[c]=new Array("capacitors.html","","Capacitors page","capacitors,etc,etc","All Radio Parts | Capacitors");
c++; item[c]=new Array("connectors.html","","Connectors page","connectors,etc,etc","All Radio Parts | Connectors");
c++; item[c]=new Array("contact.html","","About us","about,author,contact,email,who","Contact details and general information about the creator of the site and what the site is about.");
c++; item[c]=new Array("europe.html","","Shipment in Europe","Shipment,Costs,author,contact,email,who","Shipment details and general information about the creator of the site and what the site is about.");
c++; item[c]=new Array("capacitors_a.html","","capacitors more","capacitors,1003,etc","All Radio Parts | Capacitors");
c++; item[c]=new Array("fuses.html","","Fuses page","fuses,etc,etc","All Radio Parts | Fuses");
c++; item[c]=new Array("hfparts.html","","HF Parts","HF Parts,etc,etc","All Radio Parts | HF Parts");
c++; item[c]=new Array("inductors.html","","Inductors page","inductors,etc,etc","All Radio Parts | Inductors");
c++; item[c]=new Array("industrial.html","","Industrial page","industrial,etc,etc","All Radio Parts | Industrial");
c++; item[c]=new Array("motors.html","","Motors page","Motors parts,etc,etc","All Radio Parts | Motors");
c++; item[c]=new Array("n_america.html","","Shipment to the north of America","about,author,contact,email,who","Shipment details and general information about the creator of the site and what the site is about.");
c++; item[c]=new Array("others.html","","Others page","others,etc,etc","All Radio Parts | Others");
c++; item[c]=new Array("payment.html","","Payment page","payment,how,where,when","Payment methods from where");
c++; item[c]=new Array("potentiometers.html","","Potentiometers page","potentiometers,etc,etc","All Radio Parts | Potentiometers");
c++; item[c]=new Array("relays.html","","Relays page","relays,etc,etc","All Radio Parts | Relays");
c++; item[c]=new Array("risistors.html","","Risistors page","risistors,etc,etc","All Radio Parts | Risistors");
c++; item[c]=new Array("s_america.html","","Shipment to the south of America","Shipment,Costs","Shipment details and general information about the creator of the site and what the site is about.");
c++; item[c]=new Array("semiconductors.html","","Semicondustors page","semiconductors,etc,etc","All Radio Parts | Semiconductors");
c++; item[c]=new Array("shipment.html","","Shipment Costs","Shipment,Costs","shipment,how,where,when","Shipment methods from where");
c++; item[c]=new Array("switches.html","","Switches page","switches,etc,etc","All Radio Parts | Switches");
c++; item[c]=new Array("tubes.html","","Tubes page","tubes,etc,etc","All Radio Parts | Tubes");
c++; item[c]=new Array("main.html","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.");
c++; item[c]=new Array("arp_01.jpg","../images/","ARP - Electronics 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.");

page="<html><head><title>ARP | All Radio Parts; Search Results</title></head><body bgcolor='white'><center><table border=0 cellspacing=10 width=80%>";


function search(frm) {
win = window.open("","","scrollbars");
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> Search: "+num+"<br>";
line += item[which][4] + "<br>"+link+"</td></tr>";
wind.document.write(line);
return 1;
}
