/*
<!-- Original:  Dion (biab@iinet.net.au) -->
<!-- Web Site:  http://www.iinet.net.au/~biab -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
*/

// Added so you can load search results in window
window.name='mw';

var item = new Array();

c=0; item[c]=new Array("index.html","","Micro Wizard Official Home Page","endorsements,main,start,home,front,unsolicited,guarantee,k2","The opening page of Micro Wizard has our guarantee and unsolicited endorsements. ");
c++; item[c]=new Array("staff.html","","Micro Wizard Staff","john,sara,stuart,ian,ferguson,kathy,jo,John,Sara,Sarah,sarah,Stuart,Ian,Ferguson,Kathy,Jo,e-mail,job,staff","The employees of Micro Wizard");
c++; item[c]=new Array("contact.html","","Contact Information","contact,information,mail,snail,address,phone,fax,e-mail,help","How do contact Micro Wizard");
c++; item[c]=new Array("p1page.html","","K1 Flashing Light Display","k1,timer,flashing,light,display,price,kit,cheap,economical,products","The K1 Our most Economical Timer Model");
c++; item[c]=new Array("k2page.html","","K2 Extra Large Sequence of Finish Display","computer data options,data,options,km,kr,kf,ps,pe,ko,kl,kc,mask lanes,reverse lanes,force print,reset laser,count down clock,serial race data,eliminator,K2,k2xl,timer,display,price,kit,popular,led,extra,large,easily,seen","The K2 is Our Most Popular Timer");
c++; item[c]=new Array("k3page.html","","K3 Elapsed Time Display","k3led,K3,timer,display,price,kit,elapsed,time,actual,finish,trials,flashing","The K3LED Displays the Actual Times at the finish line");
c++; item[c]=new Array("gppage.html","","Grand Prix Complete Race Package","grand,prix,complete,race,package,timer,ps,computer,serial,interface,lg,laser,laser gate,gp,gp3,start,gate,top,of,line,quality","The Grand Prix is everything you need to have a great Pinewood Derby Race");
c++; item[c]=new Array("timeraccessories.html","","Timer Accessories","lg,laser,start,gate,accurate,rs,remote,start,switch,cable,p3lcd,p3,k2xl,k2,p1,pb,battery,operated,power,pack,pe,the,eliminator,double,elimination,qm,quick,mount,bracket,aluminum,challenger,track,rtd,remote,time,display,dv,double,vision,two,sided,display,software,dm,derby master,rv,race view,windows,95,98,me,xp,computer data options,km,mask lanes,kr,reverse lanes,kf,force print,kl,reset laser,kc,count down clock,clock,sc,ps cable,time,average,fastest,Lane Brain, LBS, Lane, Brain","Timer Accessories let you customize your timer.");
c++; item[c]=new Array("pricelist.html","","Timer Prices","lg,laser,start,gate,accurate,rs,remote,start,switch,cable,k3led,k3,k2xl,k2,k1,pb,battery,operated,power,pack,pe,the,eliminator,double,elimination,qm,quick,mount,bracket,aluminum,challenger,track,rtd,remote,time,display,dv,double,vision,two,sided,display,software,dm,derby master,rv,race view,windows,95,98,me,xp,computer data options,km,mask lanes,kr,reverse lanes,kf,force print,kl,reset laser,kc,count down clock,clock,sc,ps cable,time,average,fastest,Lane Brain, LBS, Lane, Brain","This is the price list - you can easily compare all the prices at once");
c++; item[c]=new Array("order.html","","How to place an order offline","help,order,phone,fax,e-mail,mail,form,shipping,cod,check,money,order,visa,master,card,discover","Help for placing your order through Phone, FAX, Mail, or E-Mail.");
c++; item[c]=new Array("orderform.html","","Order Form","help,order,e-mail,mail,form,shipping,cod,check,money,order,visa,master,printer friendly,printer,friendly,card,discover","Click here for ordering on-line.");
c++; item[c]=new Array("linkspacks.html","","Pack Links","links,pack,timer,use,our,pinewood,derby","Links to packs that use our pinewood derby timer");
c++; item[c]=new Array("linkwin.html","","Winning a Derby Links","links,how,to,win,a,pinewood,derby","How to win a pinewood Derby");
c++; item[c]=new Array("linksoftware.html","","Software Links","links,software,raceview,derby,master,manager","Software to manage your derby");
c++; item[c]=new Array("linktracks.html","","Track Links","links,track,pinewood,derby,piantedosi,beta,craft,aluminum,wood","Places to buy a pinewood derby track");
c++; item[c]=new Array("linksmanage.html","","Managing your Derby","links,managing,your,pinewood,derby","Links to sites that will help you manage and run a pinewood derby.");
c++; item[c]=new Array("linkscompetitor.html","","Other Timers","judge,newbold,supertimer,dbc,mifco,other,timers,competitor","Links to our competitors sites.");
c++; item[c]=new Array("p1cheap.html","","Son of a Cheap Kit Timer","k1,cheap,timer,kit,economical,build,your,own,timer,solder","A cheap timer that requires soldering to build.");
c++; item[c]=new Array("about.html","","About Micro Wizard","about,micro,wizard,contact,staff,meet the staff,e-mail,fax,phone,telephone","A history of Micro Wizard and how to contact the staff.");
c++; item[c]=new Array("our_timers.html","","Our Fast Track Timers","K1,K2,Grand Prix,K3,Package,timers,our timers,timer accessories,accessories","Information and pictures of all our timers.");
c++; item[c]=new Array("orderprint.html","","Order Form","help,order,e-mail,mail,form,shipping,cod,check,money,order,visa,master,printer friendly,printer,friendly,card,discover","Here is a printer friendly order form.");
c++; item[c]=new Array("links.html","","Related Links","packs,use,pinewood,derby,timers,how,pick,choose,electronic,timer,managing,your,derby,computer,software,How to win,win, Pinewood,derby,tracks,","Links to information related to Pinewood Derbies");
c++; item[c]=new Array("questions.html","","Frequently Asked Questions","frequently,asked,questions,faq,technical,support,customer,service,technical,support,service,what,kit?,timer,accuracy,kit,accuracy,","Answers to questions concerning the timers, kits, accuracy, or customer support");
c++; item[c]=new Array("contest.html","","Web Site Constest","contest,web site contest,prizes,url,website address,address,winners","How to enter our web site contest");


page="<html><head><title>Micro Wizard Search Results</title><LINK REL='STYLESHEET' HREF='microwizardnoback.css'></head><body bgcolor='white'><center><table border=0 cellspacing=10 width=80%>";


function search(frm) {
// Changed to adjust window size
win = window.open("","results","scrollbars,height=400,width=600,left=20");
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><FORM><INPUT TYPE='BUTTON' NAME='Button1' VALUE='Close Window' ONCLICK='window.close()'></FORM></body></html>");
win.document.close();
}
function show(which,wind,num) {
link = item[which][1] + item[which][0]; 
// Altered to load in original page
line = "<tr><td><a href='"+link+"' target='mw'>"+item[which][2]+"</a> Score: "+num+"<br>";
line += item[which][4] + "<br>"+link+"</td></tr>";
wind.document.write(line);
return 1;
}