/* searchy.js is used w/ searchy.html for Seacoast Family YMCA */
/* Site Search JS (1/7/03)Original:Dion */
var item = new Array();
/* Enter as many pages you want; fill in additional listings for each page.*/
/* "path","Page Name","Page Title","Many,key,words","Descriptive Comments" */
c=0; item[c]=new Array("adult.html","","Adult","adult,adults,older adult,adult programs,membership specials","This page provides information on all Adult programs at the Y.");
c++; item[c]=new Array("access.html","","Access Financial Assisstance Program","access,financial,financial assisstance,access financial assisstance program,funding help, help,funding,financial aid,subsidy,financial subsidy","This page provides information on the financial assisstance program available to families who need help funding their membership.");
c++; item[c]=new Array("prog.html#fitness","","Aerobics Class Descriptions","aerobic,aerobic class descriptions,aerobics","This page provides Aerobic Class descriptions.");
c++; item[c]=new Array("childcare.html","","Child Care Program Information","child care,childcare,children,child watch,babysitting,baby,sitting,vacation camp,registration forms,forms,snow days,before,after,before and after child care,school age childcare,school age,parents night out,parents,night,out","This page provides information on school age child care program options at The Seacoast Family YMCA.");
c++; item[c]=new Array("contac.html","","Contact Information","contact,contacts,phone numbers,e-mail,email,address,directors,marketing,board members,hours,facility hours,operating hours,staff,employees,employee","This page provides facility address, phone numbers, and e-mail addresses for the Seacaost Family YMCA including directors, marketing, program heads, and board members; the facility hours are included.");
c++; item[c]=new Array("employ.html","","Employment Opportunities","employ,employment,work,jobs,part time,full time,employees,staff","This page provides information on employment opportunities at The Seacoast Family YMCA.");
c++; item[c]=new Array("fam.html>","","Family Program Information","family programs,family,families,programs,flick and float,Flick and Float,small fries,Small Fries","This page provides information for programs that are family oriented.");
c++; item[c]=new Array("direct.html","","Camp Gundalow Map","map,maps,directions,Camp Gundalow","This page has a map and directions to Camp Gundalow in Greenland, NH.");
c++; item[c]=new Array("prog.html#fitness","","Gymnastics and Youth Sports Schedule Information","gymnastic,gymnastics,gymnastics schedule,teens,teen sports,sports,youth sports,youth,teen,fitness","This page provides information for the Gymnastics and Youth Sports class schedules.");
c++; item[c]=new Array("direct.html","","Map and Directions to the Y in Portsmouth, NH","map,maps,directions,map and directions,maps,facility hours,operating hours,hours","This page has a map and directions to the Seacoast Family YMCA in Portsmouth, NH.");
c++; item[c]=new Array("mem_fam.html","","Family Program Information","family programs,family,families,programs,flick and float,Flick and Float","This page provides a list of information of programs that are family oriented.");
c++; item[c]=new Array("memb.html","","Membership","members,membership information,corporate membership,corporate,wellness,wellness program,corporate wellness programapplication,privleges,ACCESS,subsidy program,financial aid,general membership rates,rates,membership rates,hold form,hold,form","This page provides General and Corporate Membership information for the Seacaost Family YMCA.");
c++; item[c]=new Array("mishn.html","","Mission Statement","mission,mission statement,director's letter,tax form,tax return,990,annual report","This page provides The Mission Statement for The Seacoast Family YMCA as well as a letter from the Director of the Y and Annual Report.");
c++; item[c]=new Array("pa_niteout_9-10.pdf","","Parents Night Out","parents,night,out, Parents Night Out,Parents,Night,schedule,","This is the September 2010 schedule for the Parent's Night Out program.");
c++; item[c]=new Array("prog.html#aquatics","","Aquatic Program descriptions","swim class descriptions,swim,swimming,swimmer,lessons,swim lessons,Water Yoga,Yoga,yoga,SwimSafe,Private Lessons,Lessons,lessons,Rusty Hinges,rusty hinges,Aquacise,aquacise,Aquajog,aquajog,flick and float,Flick and Float","This page provides Swim Class descriptions for all age groups.");
c++; item[c]=new Array("prog.html#aquatics","","Aquatics Pool Schedule","pool schedule,pool,swim,aquatics,swimming,schedule,lessons,swim lessons,Water Yoga,Yoga,yoga,SwimSafe,Private Lessons,Lessons,lessons,Rusty Hinges,rusty hinges,Aquacise,aquacise,Aquajog,aquajog","This page provides the pool schedule for the main facility in Portsmouth, NH.");
c++; item[c]=new Array("prog.html","","Program Information","program,programs,program descriptions,program information,classes,class,Youth Sports,swimming,aerobics,aquatics,adult,child,teen,family,camp,Gundalow","The Program Information page provides links to all the programs at the Seacoast Family YMCA.");
c++; item[c]=new Array("regdates.htm","","Session and Program Registration Dates","registration,register,program registration,registration information ","This page provides information on on the registration dates and open house dates.");
c++; item[c]=new Array("regis.htm","","Registration Procedures","registration,register,program registration,registration information ","This page provides information registration procedures and guidelines for class regsitration. This information needs to be read prior to registration.");
c++; item[c]=new Array("sitemap.html","","Site Index","index,table of contents,aerobics,camp,gundalow,programs,downloads,child watch,schedules,registration,applications,aquatics,membership,adult,teens,child,children,images,photographs,paintings,registration,swimming,swim,youth,youthfit,membership rates,corporate,corporate membership,rates,staff,contact,hold form,hold,form","This page is the web site index for the Seacoast Family YMCA.");
c++; item[c]=new Array("staff.html","","Staff: My YMCA Story","My YMCA Story,story,staff,employee,employees,employment","This page provides some information on the staff at the Seacoast Family YMCA.");
c++; item[c]=new Array("prog.html#aquatics","","Swimming Lesson Class Descriptions","swimming,swimming lessons,swim lesson class descriptions,swim lessons,fees,Aquatic Specials,specials,Swimmer's Specials,swimmers,special","This page provides information on Swimming Lesson class descriptions; includes fees.");
c++; item[c]=new Array("prog.html#aquatics","","Swim Lesson Schedules","schedule,schedules,swim schedule,swimming,swim lessons,SwimSafe","This page provides you with the current adult and children's Swim Lesson schedule.");
c++; item[c]=new Array("voltr.html","","Volunteer Opportunities","volunteer,volunteers,volunteering,volunteer opportunities","This page has postings of Volunteer Opportunities at the Seacoast Family YMCA.");

page="<html><head><title>Here Are Your Search Results:</title></head><body bgcolor='#FFFFFF'><br><table border=1 cellspacing=0 cellpadding=9 width=85% align='center' style='font-size:16px;font-family:verdana,sans-serif;letter-spacing:1px;line-height:24px;'><b style='font-size:16px;margin-left:75px;letter-spacing:1px;'>Here Are Your Search Results:</b><br><br>";

function search(frm) {
win = window.open("","scrollbars",""); /* dele'd 'scrollbars' from the 3rd set of quote marks & the window is complete? Prior to that it had no menu, etc.@ the top of the window */

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><div style='font-size:15px;font-family:Arial,sans-serif;font-weight:bold;margin-left:75px'>Total Found: "+total+"<br><br><span style='font-size:13px'>This is a new window. When you are done you may close this window.</span></div><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;
}
