
// 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


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]=10
//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]="inicio home presentacion empresa"
desc[1]="Entrada a nuestra web y presentacion de la empresa "
//links[1]="http://www.hifsa.com/Index.htm"
links[1]="Index.htm"
matched[1]=0

title[2]="contacto formulario enviar envio form correo email electronico "
desc[2]="Formulario de contacto "
//links[2]="http://www.hifsa.com/contacto.htm"
links[2]="contacto.htm"
matched[2]=0

title[3]="avion aviones aeronave aeronaves piloto pilotos aeropuerto aerodromo flota cessna essna partenavia motores turboalimentado turboalimentados autonomia "
desc[3]="Nuestras Aeronaves"
//links[3]="http://www.hifsa.com/aeronaves.htm"
links[3]="aeronaves.htm"
matched[3]=0

title[4]="navegacion planificacion vuelo base datos control calidad rotulacion documentacion "
desc[4]="Sistemas de Navegacion"
//links[4]="http://www.hifsa.com/sisnavegacion.htm"
links[4]="sisnavegacion.htm"
matched[4]=0


title[5]="navegacion gps dgps coordenadas centro proyeccion focal pelicula recubrimiento  "
desc[5]="Navegacion con GPS"
//links[5]="http://www.hifsa.com/gps.htm"
links[5]="gps.htm"
matched[5]=0

title[6]="camara camaras aerea resolucion gps coordenadas fotocentro rmk top"
desc[6]="Camaras aereas"
//links[6]="http://www.hifsa.com/camaras.htm"
links[6]="camaras.htm"
matched[6]=0



title[7]="escaner escaneres scanner fotogrametricos fotogrametria resolucion z/i photoscan ccd calibracion radiometrico"
desc[7]="Escaneres Fotogrametricos"
//links[7]="http://www.hifsa.com/scanners.htm"
links[7]="scanners.htm"
matched[7]=0


title[8]="fotografia oblicua cpd gis "
desc[8]="Fotografia Oblicua"
//links[8]="http://www.hifsa.com/oblicua.htm"
links[8]="oblicua.htm"
matched[8]=0


title[9]="stereocarto grupo stereodata empresa internacional"
desc[9]="El Grupo STEREOCARTO"
//links[9]="http://www.hifsa.com/grupoSC.htm"
links[9]="grupoSC.htm"
matched[9]=0


title[10]="localizacion localizanos contacto email correo telefono calle direccion codigo postal fax autobus metro transporte"
desc[10]="Localizanos"
//links[10]="http://www.hifsa.com/localizanos.htm"
links[10]="localizanos.htm"
matched[10]=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 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> HIFSA - Sensores aereos, vuelos, fotografia aerea </title>');
output.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
output.document.write('<link rel="STYLESHEET" type="text/css" href="estilo.css">');
output.document.write('<script language="JavaScript" src="js/modulos.js" type="text/javascript"></script>');
output.document.write('<script language="JavaScript" src="js/Utils.js" type="text/javascript"></script>');
output.document.write('<script language="JavaScript" src="js/buscador.js" type="text/javascript"></script>');
output.document.write('</head>');
//output.document.write('<BODY bgcolor=#ffffff  text=#000000  link=#990099 vlink =#339966 >');
output.document.write('<body>');
output.document.write('<div id="contenedor">');
output.document.write('<script type="text/javascript">');
output.document.write('dibujaBarraInicio();');
output.document.write('</script>');
output.document.write('<script type="text/javascript">');
output.document.write('dibujaCabecera();');
output.document.write('</script>');

output.document.write('<div id="contenedorcuerpo">');
output.document.write('<div id="cuerpo">');
output.document.write('<h1> Resultados de la Busqueda </h1>');
output.document.write('<hr>');
output.document.write(' Palabras claves de la busqueda :: '.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 hay resultados para las palabras claves de la busqueda </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> Estos son los resultados de la busqueda  : </b>  ");
	output.document.write( found[0] +"  entrada(s) encontrada(s)  ".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> Coincidencia con la palabra  :: " +temp+" %  </i>" );
		matched[itemp]=0
		}
	found[0]=0;
	output.document.write("</table>");
	}
//output.document.write ('This search was created by   &copy <a href="http:\\dutta.home.ml.org"> Satadip Dutta</a>    1997');
output.document.write ("<hr>");
//output.document.write ("<form><center>");
//output.document.write("<center>Hit the refresh button to return to the search<center>");
//output.document.write ("<input type='button' value='Start Another Search' onClick = 'self.close()'");
//output.document.write ("<center></form>");
output.document.write('<script type="text/javascript">');
output.document.write('dibujanavabajo();');
output.document.write('</script>');
output.document.write('</div>');
output.document.write('<script type="text/javascript">');
output.document.write('dibujalateral();');
output.document.write('</script>');
output.document.write('<script type="text/javascript">');
output.document.write('dibujapie();');
output.document.write('</script>');
output.document.write('</div>');
output.document.write('</div>');

output.document.write ("</body></html>");
output.document.close();
}
