<!--// Wyszukiwarke poddal edycji
//Dariusz Mion 
// Email: gazybojowe@poczta.onet.pl
// URL:http://www.gazybojowe.prv.pl/
//-->
title = new Object();
desc = new Object();
links= new Object();
matched= new Object();
keywords= new Object();
found= new Object();
var temp=0;

title[0]=5
keywords[0]=0
found[0]=0

title[1]="ans,o firmie,ans centrum,centrum" 
desc[1]="ANS - Centrum - o firmie - fakty, historia "
links[1]="ofirmie_okno.html"
matched[1]=0


title[2]="ans,kontakt,biuro,e-mail,adres,siedziba firmy"
desc[2]="ANS - Centrum - kontakt"
links[2]="kontakt_okno.html"
matched[2]=0

title[3]="ans,zapytanie,zapytanie ofertowe,?" 
desc[3]="ANS - Centrum - zapytanie ofertowe "
links[3]="zapytanie_okno.html"
matched[3]=0


title[4]="ans,produkty,akumulatory,akumulatory zelowe,akumulatory żelowe serii HGL,HGHL,HL,baterie specjalistyczne,baterie,bateria,oferta"
desc[4]="ANS - Centrum - oferta"
links[4]="produkty_okno.html"
matched[4]=0

title[5]="ans,produkty,akumulatory,akumulatory zelowe,akumulatory żelowe serii HGL,HGHL,HL,oferta"
desc[5]="ANS - Centrum - akumulatory żelowe serii HGL,HGHL,HL"
links[5]="akum_zelowe_okno.html"
matched[5]=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='';

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 sortparent.okno.location.href

output = parent.okno;
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> Rezultat szukania </title>');
output.document.write('</head>');
output.document.write('<BODY bgcolor="FFFFFF"  text="#454545"  alink="#6C6C6C" link="#8B2520" vlink ="#8B2520" >');

output.document.write('<br><br><h4><tt> Rezultat poszukiwania </tt></h4>');    
//output.document.write('<hr width=80%>');
output.document.write('<h4><tt><b>Poszukiwano słowa kluczowego:'.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 width=80%>');
	output.document.write("<b>niestety nie znaleziono tego słowa </b> <br>");
	output.document.write("zastosuj inne słowo kluczowe, bądż inaczej sformułuj zapytanie <br>");
	}
else
	{
	// data has been found
	output.document.write("<b> Rezultat poszukiwania   : </b>  ");
	output.document.write( found[0] +"  znalezione adresy  ".italics());

	output.document.write("<br><br><table border=0  width=70% align=center>");
	for (i=1; i<=found[0];i++)
		{
		output.document.write("<tr><td valign=top align=center bgcolor=#164083>");
		output.document.write("<h3><font color=#FFFFFF>" +i +"</font></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><tt> Trafność  ::</tt> " +temp+" %  </i>" );
		matched[itemp]=0
		} 
	found[0]=0;
	output.document.write("</table>");
	}
output.document.write ("<hr width=100%>");
//output.document.write ("<form><center>"); 
output.document.write('<a href=# onClick=history.back()>powrót do wyszukiwania</a>');

output.document.write ("</center></body></html>"); 
output.document.close();
}
// -->
