page="<html><head><title>Search Results</title></head><body bgcolor='white'><center><table border=0 cellspacing=10 width=80%>";function head(letter) {	var addr1 = "mailto:"	var addr2 = "photos11"	var addr3 = "@"	var addr4 = "twojays.co.uk"	document.write("<em>&lt;&lt;&nbsp;<a class='em' href='../index.html' onFocus='if(this.blur)this.blur();' target='_top'>home page</a> : <a class='em' href='alpha.htm' onFocus='if(this.blur)this.blur();' target='_top'>boat name pictures menubar</a> | <a class='em' href='page.htm' onFocus='if(this.blur)this.blur();' target='_top'>other searches</a>&nbsp;&gt;&gt;</em>")	document.write(" | <a class='em' href='" + addr1 + addr2 + addr3 + addr4 + "' onFocus='if(this.blur)this.blur();' target='_top'>send an email</a></em>")	document.write("<center><h3>Search Boat Names starting with '" + letter + "'</h3></center>")	document.write("<table border='0'><tr><td>Either enter the boat name in the search box using <b>lowercase</b> letters only and then click on 'Search'.</td><td valign='middle'>")	document.write("<form method=get action='javascript:void(0)' onsubmit='name_search(this); return false;'> <input type=text name=srchval value=''><input type=submit value='Search'>")	document.write("</td></form></td><td><a href='help_s.htm'><img src='../images/search/help_s.gif' width='48' height='22' border='0'></a></td></tr></table><br />Or use this drop down menu:<br /><br />")}function name_search(frm) {win = window.open("","","height=400,width=550,scrollbars,resizable");win.document.write(page);txt = frm.srchval.value.split(" ");fnd = new Array(); total=0;	for (i = 0; i < name_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 (name_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 += name_show(w, win, n);				fnd[w] = 0;			}			win.document.write("</table><br>Total found: "+total+"<br></body></html>");			win.document.close();		}function name_show(which,wind,num) {link = name_item[which][1] + name_item[which][0]; line = "<tr><td><a href='"+link+"'>"+name_item[which][2]+"</a><br>";line += name_item[which][4] + "</td></tr>";wind.document.write(line);return 1;}//  End -->
