<!-- Begin copyright - This must be retained and posted as is to use this script -->
 
<!--// This Script was created by Satadip Dutta. 
// Email: sat_dutta@post1.com  / satadipd@inf.com 
// URL:http://dutta.home.ml.org
// Version 1.1-IExp 
// Please honor my hard work, if you use a variant of this in your page, 
// then please email me :) and keep these comments in the Script.
// This code is Copyright (c) 1997 Satadip Dutta
// all rights reserved.
// License is granted to user to reuse this code on their own Web site 
// if, and only if, this entire copyright notice is included. The Web Site
// containing this  script   must be a not-for-profit ( non-commercial ) web site. 
// Exclusive written permission must be obtained before using  this version of the search engine
//-->
 
<!-- End copyright - This must be retained and posted as is to use this script -->
 
title = new Object();
desc = new Object();
links= new Object();
matched= new Object();
keywords= new Object();
found= new Object();
var temp=0;
// actual location or the item to be searched
// description of he location
// actual link
// percentage match found
// keywords as parsed from the input
// # of titles present in the database
title[0]=14
//no of keywords after parsing
keywords[0]=0
//no of  matches found.
found[0]=0
 
<!-- Begin List of Searchable Items -->
 
<!--put the list of the links and descriptions here!!-->
 
title[1]="Welcome to Williams & Davis Boilers"
desc[1]="Welcome to Williams & Davis Boilers"
links[1]="http://www.w-dboilers.com/Test1234/index.html"
matched[1]=0
 
title[2]="Series 2000D 2-pass Dry-back Scotch Marine Boilers"
desc[2]="Series 2000D Scotch Marine Boilers"
links[2]="http://www.w-dboilers.com/Test1234/WDSeries 2000D.html"
matched[2]=0
 
title[3]="Series 3000D 3-pass Dry-back Scotch Marine Boilers"
desc[3]="Series 3000D Scotch Marine Boilers"
links[3]="http://www.w-dboilers.com/Test1234/WDSeries 3000D.html"
matched[3]=0
 
title[4]="Series 3000W 3-pass Wet-back Scotch Marine Boilers"
desc[4]="Series 3000W Scotch Marine Boilers"
links[4]="http://www.w-dboilers.com/Test1234/WDSeries 3000W.html"
matched[4]=0
 
 
title[5]="Series 4000D 4-pass Dry-back Scotch Marine Boilers"
desc[5]="Series 4000D Scotch Marine Boilers"
links[5]="http://www.w-dboilers.com/Test1234/WDSeries 4000D.html"
matched[5]=0
 
title[6]="Series 4000D 4-pass Wet-back Scotch Marine Boilers"
desc[6]="Series 4000W Scotch Marine Boilers"
links[6]="http://www.w-dboilers.com/Test1234/WDSeries 4000W.html"
matched[6]=0
 
 
 
title[7]="Series 2000V 2-pass Dry-back Vertical Tubeless Boilers"
desc[7]="Series 2000V Vertical Tubeless Boilers"
links[7]="http://www.w-dboilers.com/Test1234/WDSeries 3000C.html"
matched[7]=0
 
 
title[8]="Series 3000C Fully Condensing Hydronic/Hotwater Boilers"
desc[8]="Series 3000C Hydronic Condensing Boilers"
links[8]="http://www.javascriptkit.com/time2.htm"
matched[8]=0
 
 
title[9]="image preload rollover effect filter"
desc[9]="Images and JavaScript- Apples and Apples (Part 1 of 2)"
links[9]="http://www.javascriptkit.com/image1.htm"
matched[9]=0
 
 
title[10]="rollover effect"
desc[10]="Images and JavaScript- Apples and Apples (Part 2 of 2)"
links[10]="http://www.javascriptkit.com/image2.htm"
matched[10]=0
 
title[11]="new window open secondary reload close toolbar menubar status bar "
desc[11]="Windows and JavaScript"
links[11]="http://www.javascriptkit.com/window.htm"
matched[11]=0
 
title[12]="frames access object multiple"
desc[12]="Loading Two frames with one link."
links[12]="http://www.javascriptkit.com/twoframes.htm"
matched[12]=0
 
title[13]="selection list options array text vale"
desc[13]="I'll hava a double combo please (Part 1 of 2)"
links[13]="http://www.javascriptkit.com/combos1.htm"
matched[13]=0
 
title[14]="combo link box jump"
desc[14]="I'll hava a double combo please (Part 2 of 2)"
links[14]="http://www.javascriptkit.com/combos2.htm"
matched[14]=0
 
<!-- End list of Searchable items -->
 
function search(){
var skeyword=document.searchengine.keywords.value.toLowerCase();
var check=1;
var pos=0;
var i=0;
var j=0;
var  itemp=0;
var config='';
var image ="url(../photos/Background%20img/12.04bg.png)" ;
 
while (true)
	{
	if (skeyword.indexOf("+") == -1 )
		{
		keywords[check]=skeyword;
		break;
		}
	pos=skeyword.indexOf("+");
	if (skeyword !="+")	
	{
	keywords[check]=skeyword.substring(0,pos);
	check++;
	}
	else
	{
	check--;
	break;
	}
	skeyword=skeyword.substring(pos+1, skeyword.length);	
	if (skeyword.length ==0)
		{
		check--;
		break;
		}
			 
	}
// the keywords have been put in keywords object.
keywords[0]=check;
 
// matching and storing the matches in matched
for ( i=1; i<=keywords[0];i++)
	{
	for (j=1;j<=title[0];j++)
		{
		if (title[j].toLowerCase().indexOf(keywords[i]) > -1 )
			{
			  matched[j]++;
			}
		}	
	}
// putting all the indexes of the matched records  in found
 
for (i=1;i<=title[0];i++)
{
	if (matched[i] > 0 )
		{
		  found[0]++;
		// increment the found 	
		  found[found[0]]=i;
			
		}	
}
 
 
 
for (i=1;i<=found[0]-1;i++)
	{
	for(j=i+1;j<=found[0];j++)
		{
		if ( matched[found[i]]< matched[found[j]] )
			{
			temp= found[j];
			found[j]=found[i];
			found[i]=temp;
			}
		}
	}
 
// end of sort
 
output = self;
output.document.write('<html>');
output.document.write('<head>');
output.document.write('<script>');
output.document.write('window.onerror=new Function("return true")');
output.document.write('<\/script>');

output.document.write('<title> Williams & Davis Search Results </title>');


output.document.write('</head>');

output.document.write('<script type="text/javascript" src="Scripts\slideshow.js"></script>');

output.document.write('<BODY bgcolor=#ffffff  text=#000000  link=#FFF vlink =#999 >');
 output.document.write('&nbsp;');
   output.document.write("<img src=WDLogo.jpg id=SlideShow class=reflect");
output.document.write('<center> <h1>Williams & Davis Search Results </h1></center>'); 
output.document.write('<hr>');
output.document.write(' The Keyword(s) you searched :: '.big() )
for (i=1;  i<=keywords[0]; i++)
	{
	output.document.write( keywords[i].bold() +"   ");
	}
output.document.write('<br>');

if (found[0]==0)
	{
	//alert(found[0]);
	output.document.write('<hr>');
	
	output.document.write("<b>No matches resulted in this search </b> <br>");
	output.document.write("You may close the results and reduce the length/number  of the keywords  <br>");
	}
else
	{
	// data has been found
	output.document.write(" <hr> <b> The Results of the search are  : </b>  ");
	output.document.write( found[0] +"  Entries found  ".italics());
	output.document.write("<table border=1 width=100%>");
	for (i=1; i<=found[0];i++)
		{
		output.document.write("<tr><td valign=top bgcolor=#9999ff>");
		output.document.write("<h3>" +i +"</h3>");
		output.document.write("<td valign=top>");
		itemp=found[i];
		output.document.write(desc[itemp].bold() +"<br>" +
		links[itemp].link(links[itemp])+"<br>");
		temp= (matched[itemp]/keywords[0])*100
		output.document.write("<i> Matched  with keywords  :: " +temp+" %  </i>" );
		matched[itemp]=0
		} 
	found[0]=0;
	output.document.write("</table>");
	}
output.document.write ('This search was created by   &copy <a href="http:\\www.w-dboilers.com"> Williams & Davis Boilers</a>    2011');
output.document.write ("<hr>");
//output.document.write ("<form><center>"); 
output.document.write("");
   output.document.write("<img src=slideshow1_1.jpg id=SlideShow class=reflect");
//output.document.write ("<input type='button' value='Start Another Search' onClick = 'self.close()'"); 
//output.document.write ("<center></form>");
 
output.document.write ("</body></html>"); 
output.document.close();
}
