// ----------------------------------------------------------------------------
// Lauyan Software Javascript Search Engine 1.0
//
// This file is the JavaScript search engine for a website created by TOWeb
//
// Copyright (C) LAUYAN SOFTWARE
// web: http://www.lauyan.com
// ----------------------------------------------------------------------------

STR_SEARCH_QUERY_MSG = "Résultats de la recherche pour";
STR_NO_RESULT = "Aucun résultat trouvé";
STR_SEARCH_BUTTON = "Rechercher";
STR_SCORE = "Score";
STR_TERMS = "Termes";
STR_SEARCH_SIZE = "20";
MIN_WORD_LEN = 1;
DISPLAY_SRCH_INFO = 0;
USE_UTF8 = 0;
REMOVE_ACCENTS = 1;
BOLD_LINKS = 1;
ONLINE_WEBSITE = 1;

namesArray = new Array("  ",
"  ",
"  ",
"  ",
"  ",
"  ",
"  ",
"  ",
"  ",
"  ",
"  ",
"  ",
"  ",
"  ",
" vs 300 durr dental ^^ideale poste de travail aspiration type anneau humide recuperation d'amalgame prevoir en amont ou aval capot d'insonorisation tres efficace option ^^ ",
" vsa 300 durr dental ^^aspiration de type anneau humide avec recuperateur d'amalgame poste travail doit etre installe dans un environnement tres ventile car elle degage enormement chaleur ^^ ",
" vs 600 durr dental ^^aspiration de type anneau humide ou postes travail doit etre installe dans un environnement tres ventile car elle degage enormement chaleur la recuperation d'amalgame est prevoir en amont aval ^^ ",
" support comfort ^^support de nouvelle generation sortie verticale du filtre membranes verticales retarder l'encrassement tuyaux demontables un excellent d'aspiration ^^ ",
" turbo-smart cattani ^^moteur d'aspiration de nouvelle generation avec ou sans recuperation d'amalgame la vitesse rotation du moteur varie automatiquement selon depression demandee le circuit elle peut distribuer postes et code informatique un tableau commande permet controler regler fonctionnement l'ensemble conditions techniques d'installation doivent etre strictes afin garantir correct car cette aspiration degage beaucoup chaleur ^^ ",
" pal 14 cattani ^^cette aspiration de type anneau liquide n'est pas toute jeune conception fournit bon nombre praticiens la puissance et du silence fonctionnement conditions techniques d'installation sont plus souples elle supporte tres bien le confinement son niveau sonore en version capotee permet installation au pied fauteuil seul inconvenient c'est consommation d'eau froide importante fil annees ce negligeable aujourd'hui ^^ ",
" notre premier soucis etant de fournir un materiel qualite clientele proposons exclusivement compresseurs la marque durr dental l'air comprime est facteur tres important au sein du cabinet dentaire c'est cette raison qu'il convient d'avoir compresseur fournissant durablement air repondant aux normes medicale capable cet avec en plus excellente fiabilite ",
" primo avec dessiccateur d'air compresseur poste de travail ",
" duo avec dessiccateur d'air compresseur postes de travail ",
" duo tandem compresseur postes de travail ",
" ekom compresseur poste de travail avec dessiccateur d'air ou sans armoire d'insonorisation ",
" ekom compresseur postes de travail avec dessiccateur d'air ou sans armoire d'insonorisation ",
"  ",
" sopix² satelec est un systeme de radiologie d'avant-garde le integre meilleur la technologie actuelle cmos fibre optique et offre qualite d'image exceptionnelle exclusivite sopro nouveau procede ace permet maitriser quantite rayons-x emmagasinee capteur proteger chaque image d'une surexposition resultat cliches sont toujours reussis simple discret s'integrera facilement dans cabinet dentaire quelle soit sa configuration deux tailles capteurs proposees plus grand confort en bouche leurs coins arrondis ",
" ps pix satelec est un nouveau systeme d'imagerie numerique plaque au phosphore d'un design seduisant il ergonomique compact et propose qualite d'image constante pspix ete concu simplifier optimiser le travail du praticien dentiste livres avec quatre tailles d'ecran memoire erlm ils sont fins flexibles offrent utilisation optimale de la surface active temps lecture cliches secondes entierement automatise ecran permet controler toutes etapes processus visualiser  ",
" vistascan mini durr dental la vitesse de manipulation d'un capteur souplesse en plus depuis l'introduction films radiographie traditionnels chirurgie dentaire influence significativement techniques diagnostic numerique offre aux dentistes images haute resolution satisfont exigences elevees fort 40 ans d'experience dans le developpement apporte solutions innovantes et pratiques accelere encore diagnostics ecrans memoire cet appareil compact est particulierement simple utiliser ne prend tres peu place il peut etre salle soins du cabinet l'avantage numerisation peuvent se faire proximite directe fauteuil reutilisables existent tous formats intra-oraux ils manipulent facilement capteurs lisent quelques secondes offrent qualite exceptionnelle jamais passage l'ecran n'aura ete aussi logique  ",
" vistascan durr dental l'imagerie vue donne cet excellent produit repondra tous cabinets dentaire notamment au ayant minimum postes de travail appareil est en fait un developpeur numerique d' ecrans memoire ce lui permet revendiquer le support d'enregistrement plus proche cliches argentiques terme d'acceptation patient peut lire jusqu'a seule etape efface et remet nouveau operationnels maniere entierement automatique encore qualite signe ",
"  ",
" metasys multi-systeme ^^voici le recuperateur mono-poste ayant meilleur rapport qualite prix il tres grande contenance et traite la fois crachoir l'aspiration un bon fonctionnement doit etre installe dans groupe hydrique de l'equipement plus pres possible du canules d'aspiration desinfection journaliere circuit est gage longevite car ce produit travail conditions difficiles pouvez consulter procedure d'entretien mst notre espace client ^^ ",
" metasys compact dynamic ^^d'un fonctionnement similaire au mst1 cette version de recuperateur est bien plus compacte il convient aisement aux petits groupes hydriques la platine electronique mieux protege liquides ce en augmente fiabilite comme tous systemes recuperation d'amalgame respecter lettre procedure desinfection journaliere ^^ ",
" durr dental ca ^^recuperateur doit etre installe en aval d'un moteur d'aspiration anneau humide il est silencieux fiable et d'une grande capacite faut installer vanne crachoir dans le groupe hydrique afin de traiter liquides du ce type d'installation permet d'avoir un moins charge techniquement autre avantage non negligeable la possibilite cas panne d'enlever recuperateur rapidement sans toutefois gener praticien son travail ^^ ",
" cattani hydrocyclone ^^le recuperateur de est l'un plus simple en effet il ne comporte aucune centrifugeuse ou autre moteur fonctionne la pression d'entree liquides dans l'hydrocyclone ^^ ",
" formulaire de contact  ",
"  ",
" dans cette rubrique essayerons de donner tous atouts solutionner rapidement et simplement petites pannes classiques trop souvent font perdre la patience patients sans outillage professionnel pourrez grace depanner plus brefs delais ",
"  ",
"  ",
" depannage du metasys mst  ",
"  ",
"  ",
" changement charbons du micro-moteur mc3 lk bien-air  ",
"  ",
"  ",
" depannage rapide fauteuils dentalez j-chair et v-chair  ",
"  ",
"  ",
" autoclave quaz satelec utilisation ",
"  ",
"  ",
" la nouveaute de l'adf 2010 en promotion chez ass dentaire micro-moteur bien-air mc3 led nez court permettant l'adaptation nouveaux contre-angle technologie lumiere froide et puissante garantie an retour atelier tarif catalogue 1316 ttc 895 850 frais d'expedition offerts ",
"  ");
urlsArray = new Array("../topic1/index.html",
"../mapage/index.html",
"../mapage14/index.html",
"../groupederubrique/index.html",
"../mapage28/index.html",
"../mapage7/index.html",
"../mapage1/index.html",
"../mapage23/index.html",
"../mapage8/index.html",
"../mapage9/index.html",
"../mapage24/index.html",
"../groupederubriqu2/index.html",
"../mapage22/index.html",
"../catalogue2/index.html",
"../catalogue2/page1.html",
"../catalogue2/page2.html",
"../catalogue2/page3.html",
"../catalogue2/page4.html",
"../catalogue2/page5.html",
"../catalogue2/page6.html",
"../catalogue1/index.html",
"../catalogue1/page1.html",
"../catalogue1/page2.html",
"../catalogue1/page3.html",
"../catalogue1/page4.html",
"../catalogue1/page5.html",
"../catalogue5/index.html",
"../catalogue5/page1.html",
"../catalogue5/page2.html",
"../catalogue5/page3.html",
"../catalogue5/page4.html",
"../catalogue3/index.html",
"../catalogue3/page1.html",
"../catalogue3/page2.html",
"../catalogue3/page3.html",
"../catalogue3/page4.html",
"../topic5/index.html",
"../mapage5/index.html",
"../mapage4/index.html",
"../mapage6/index.html",
"../mapage11/index.html",
"../mapage12/index.html",
"../mapage16/index.html",
"../mapage17/index.html",
"../mapage3/index.html",
"../mapage13/index.html",
"../mapage15/index.html",
"../mapage18/index.html",
"../mapage19/index.html",
"../mapage21/index.html",
"../mapage20/index.html",
"../mapage25/index.html",
"../magasin14/index.html",
"../magasin14/index.html",
"../mapage10/index.html");
titlesArray = new Array("ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"VS 300 S DURR DENTAL",
"VSA 300 S DURR DENTAL",
"VS 600 DURR DENTAL",
"Support Comfort DURR DENTAL",
"Turbo-Smart CATTANI",
"PAL 14 CATTANI",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"DURR DENTAL Primo avec dessiccateur",
"DURR DENTAL Duo avec dessiccateur",
"DURR DENTAL Duo Tandem",
"Ekom 1 poste",
"EKOM 2 postes",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"Titre de paragraphe",
"Titre de paragraphe",
"Titre de paragraphe",
"Vistascan",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"Metasys Multi-Système 1",
"Metasys Compact Dynamic",
"DURR DENTAL CA 4",
"CATTANI Hydrocyclone",
"Formulaire de contact",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"Dépannage du Metasys MST 1",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"Changement des charbons du micro-moteur MC3 LK Bien-Air",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"Dépannage rapide des fauteuils Dentalez J-Chair et V-Chair",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"Utilisation de l'autoclave Quaz Satelec",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...",
"MC3 LED Bien Air",
"ASS DENTAIRE Vente installation réparation de matériel dentaire. Diplomat, Satelec, Durr Dental, Bien Air, Kavo, NSK, Dentalez, Cattani, Radiologie, F...");
descArray = new Array("IDS Site de la société ASS DENTAIRE installateur de matériel dentaire diplomat chirana dental medical Vente, installation et de dépannage de matèriel ...",
"Site de la société ASS DENTAIRE installateur de matériel dentaire diplomat Vente, installation et de dépannage de matèriel dentaire. diplomat idem sat...",
"",
"",
"",
"Site de la société ASS DENTAIRE installateur de matériel dentaire diplomat Vente, installation et de dépannage de matèriel dentaire. diplomat idem sat...",
"Site de la société ASS DENTAIRE installateur de matériel dentaire diplomat Vente, installation et de dépannage de matèriel dentaire. diplomat idem sat...",
"",
"Site de la société ASS DENTAIRE installateur de matériel dentaire diplomat Vente, installation et de dépannage de matèriel dentaire. diplomat idem sat...",
"Site de la société ASS DENTAIRE installateur de matériel dentaire diplomat Vente, installation et de dépannage de matèriel dentaire. diplomat idem sat...",
"",
"",
"",
"Cattani Durr Dental VS300S VSA300S VS600 Turbosmart moteur aspiration comfort depression PAL 14",
"&",
"&",
"&",
"&",
"&",
"&",
"Dentaire Compresseur Durr dental air comprimé cuve manomètre",
"&",
"&",
"&",
"&",
"&",
"Radiologie numérique satelec sopix bluetooth durr dental vistascan pério capteur développement",
"&",
"&",
"&",
"&",
"Récupérateur d'amalgame metasys durr dental cattani multi système MST1 compact dynamic hydrocyclone CA4 az50 cattani métasys mètasys",
"&",
"&",
"&",
"&",
"",
"",
"Dans cette rubrique nous essayerons de vous donner tous les atouts pour solutionner rapidement et simplement les petites pannes classiques qui trop so...",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"Faux-contact scialytique depannage dépannage ampoule daray edi faro",
"dépannage PAL 14 Cattani aspiration anneau liquide",
"",
"",
"",
"&",
"");
sublinksArray = new Array(55);
var linksCount = 55;


ALLWORDSONLY = false;

// getParam returns the value of the specified GET parameter
function getParam(paramName)
{
    paramStr = document.location.search;
    if( paramStr == "" )
        return "";
    if( paramStr.charAt(0) == "?" )
        paramStr = paramStr.substr(1);
    arg = (paramStr.split("&"));
    for( i=0; i<arg.length; i++ ) 
    {
      arg_values = arg[i].split("=")
      if( unescape(arg_values[0]) == paramName ) 
      {
         if( USE_UTF8 == 1 && self.decodeURIComponent ) // check if decodeURIComponent() is defined
            ret = decodeURIComponent(arg_values[1]);
         else
            ret = unescape(arg_values[1]);  // IE 5.0 and older does not have decodeURI
         return ret;
      }
    }
    return "";
}

function replaceAll(str,from,to) 
{
    var idx = str.indexOf(from);
    while( idx > -1 ) {
        str = str.replace(from, to); 
        idx = str.indexOf(from);
    }
    return str;
}

// lowercase, remove quotes and accents
function formatChars(str) 
{
    str = str.toLowerCase();
    if( REMOVE_ACCENTS ) 
    {
      var a = "àáâãäåòóôõöèéêëçìíîïùúûüÿñ";
      var b = "aaaaaaoooooeeeeciiiiuuuuyn";
      for( i=0; i<a.length; i++ )
        str = replaceAll( str, a.charAt(i), b.charAt(i) );
    }
    str = replaceAll( str, "'", " " );
    return str;
}

function SortCompare(a, b)
{
  if( a[2] == b[2] )
  {  
    if (a[1] < b[1]) return 1;
    else if (a[1] > b[1]) return -1;
    else return 0;
  }
  else if (a[2] < b[2]) return 1;
    else return -1;
}

function jseSearch( internal )
{
  // get params
  var rootURL = '';
	var SelfURL = document.location.href;
  var paramIndex = SelfURL.indexOf("?");    
  if (paramIndex > -1)
     SelfURL = SelfURL.substr(0, paramIndex);
  paramIndex = SelfURL.indexOf("#");
  if (paramIndex > -1)
    SelfURL = SelfURL.substr(0, paramIndex);        
	if (ONLINE_WEBSITE) 
	{
		paramIndex = SelfURL.lastIndexOf('/');
		if (paramIndex > -1) 
		{
			rootURL = SelfURL.substr(0, paramIndex);
			paramIndex = rootURL.lastIndexOf('/');
			if (paramIndex > -1) {
				rootURL = SelfURL.substr(0, paramIndex+1);
			} else
			  rootURL = '';
		}
	}	
  SelfURL = SelfURL.replace(/\</g, "&lt;");
  SelfURL = SelfURL.replace(/\"/g, "&quot;");

  var query = getParam("jse_query");
  query = query.replace(/[\++]/g, " ");  // replace any '+' with spaces
  query = query.replace(/\</g, "&lt;");
  query = query.replace(/[\"+]/g, " ");

  // display the search form
  var lnktarget = "";
	if( internal == null || internal != 1 )
	{
    document.writeln("<form method=\"get\" action=\"" + SelfURL + "\">");
    document.writeln("<input type=\"text\" name=\"jse_query\" size=\"" + STR_SEARCH_SIZE + "\" value=\"" + query + "\" />");
    document.writeln("<input type=\"submit\" value=\"" + STR_SEARCH_BUTTON + "\" />");
    document.writeln("</form>");
  }	
	else
	{
	 lnktarget = "\" target=\"_blank";
  }
	query = formatChars(query);
  if( query.length == 0 ) return;
  
  var found=0, t=0, k=0, score=0, subscore=0, i=0;
  var keyword = "", tmp = "";
  var searchWords = new Array();

  // split search query by spaces
  searchWords = query.split(" ");
	if( internal == null || internal != 1 ) {
		document.writeln( "" + STR_SEARCH_QUERY_MSG + " : <strong>" +query+"</strong><br>");
  }
  // init result table information
  res_table = new Array(linksCount);
  for( t=0; t<linksCount; t++ )
  {
    res_table[t] = new Array(3);
    res_table[t][0] = 0;  // index
    res_table[t][1] = 0;  // score
    res_table[t][2] = 0;  // words found
    res_table[t][3] = ""; // sublinks (output string)
  }
  var significantwords = 0;
  
  // begin search ...
  for( i=0; i<searchWords.length; i++ )
  {
    keyword = searchWords[i];
    if( keyword.length > MIN_WORD_LEN ) // skip "small" words
	{
	  significantwords++;
	  for(var q=0; q<linksCount; q++ )
	  {
	    t = q;
	    score = 0;
	
	    // search for keywords (an exact word doubles the score)
		  tmp = formatChars(descArray[t]);
	    if( tmp.indexOf(keyword) != -1 ) score++;
	    if( tmp.indexOf(' '+keyword+' ') != -1 ) score+=2;
		  tmp = formatChars(titlesArray[t]);
	  	if( tmp.indexOf(keyword) != -1 ) score++;
		  if( tmp.indexOf(' '+keyword+' ') != -1 ) score+=2;
	    if( namesArray[t].indexOf(keyword) != -1 ) score++;
	    if( namesArray[t].indexOf(' '+keyword+' ') != -1 ) score+=2;
	
		// search for keywords in sublinks (i.e. bookmarks)
	    k = q+1;
		while( k <= linksCount )
		{
			tmp = descArray[k];
			if( tmp == null || tmp.charAt(0) != '&' ) break;
			subscore = 0;
			tmp = formatChars(descArray[k]);
			if( tmp.indexOf(keyword) != -1 ) subscore++;
			if( tmp.indexOf(' '+keyword+' ') != -1 ) subscore+=2;
			tmp = formatChars(titlesArray[k]);
			if( tmp.indexOf(keyword) != -1 ) subscore++;
			if( tmp.indexOf(' '+keyword+' ') != -1 ) subscore+=2;
			if( namesArray[k].indexOf(keyword) != -1 ) subscore++;
			if( namesArray[k].indexOf(' '+keyword+' ') != -1 ) subscore+=2;
			
			if( subscore > 0 )
			{
				if( res_table[t][3].indexOf( "\"" + urlsArray[k] + "\"" ) == -1 )
					res_table[t][3] += "<tr><td width='35'>&nbsp;</td><td><a href=\"" + urlsArray[k] + lnktarget + "\">" + titlesArray[k] + "</a></td></tr>";
//	           		if( B OLD_LINKS )  res_table[t][3] += "<tr><td width='50'>&nbsp</td><td><b><a href='" + urlsArray[k] +"'>" + titlesArray[k] + "</a></b></td></tr>";
				score += subscore;
			}	
			k++;
		}
		q = k-1;
		
	    if( score > 0 )
	    {
	      res_table[t][0] = t;
	      res_table[t][1] += score;
	      res_table[t][2]++;
	      found++;
	    }
	  }
	}
  }
  if( found == 0 ) 
  {
    document.write("<p><b>" + STR_NO_RESULT + "</b></p>");
  } 
  else 
  {
	 // sort by words found and scores
    res_table.sort(SortCompare);	
	
    // display the results
    for( q=0; q<found; q++ )
      if( res_table[q][1] > 0 ) // display only results with a positive score
	  if( !ALLWORDSONLY || (ALLWORDSONLY && res_table[q][2] == significantwords) )
	    {
        t = res_table[q][0];    // get page index
        if( BOLD_LINKS ) {
          document.writeln("<br><b>" + (q+1) + ". <a href=\"" + urlsArray[t] + lnktarget + "\">" + titlesArray[t] + "</a></b>" );
        } else
          document.writeln("<br><b>" + (q+1) + ".</b> <a href=\"" + urlsArray[t] + lnktarget + "\">" + titlesArray[t] + "</a>" );
        if( descArray[t].length > 2 )
          document.writeln("<br>" + descArray[t]);
        if( DISPLAY_SRCH_INFO ) 
		{
			document.write("<br><span style='font-size: 80%; font-style: italic;'>");
			if( !ALLWORDSONLY )
				document.write("" + STR_TERMS + ": " + res_table[q][2] + " - " );
			document.write("" + STR_SCORE + ": " + res_table[q][1] );
			if (ONLINE_WEBSITE) {
			  document.writeln(" - URL: " + rootURL + urlsArray[t].substr(3) + "</span>");
			}	else
			  document.writeln(" - URL: " + urlsArray[t] + "</span>");
      	}
				if( res_table[q][3].length > 0 ) { 
      	  document.writeln( '<table>' + res_table[q][3] + '</table>' );
      	} else document.writeln("<br>");
      }
  }
  document.writeln("<br>");
}

