// ----------------------------------------------------------------------------
// 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 = 2;
DISPLAY_SRCH_INFO = 1;
USE_UTF8 = 0;
REMOVE_ACCENTS = 1;
BOLD_LINKS = 1;
ONLINE_WEBSITE = 1;

namesArray = new Array(" immobilier mali malien malienne terrain maison construction construire achat acheter vente vendre investissement investir foncier titre lettre d'attribution bamako developpement acquisition acquerir plan devis architecture propriete kayes segou sikasso koulikoro mopti tombouctou kidal gao fleuve eau appartement plain pied mitoyen location louer district annonce annonces ",
" immobilier mali malien terrain achat acheter vente vendre investissement investir foncier titre lettre d'attribution bamako developpement acquisition acquerir plan propriete kayes segou sikasso koulikoro mopti tombouctou kidal gao fleuve eau mitoyen annonce annonces ",
" immobilier mali malien terrain achat acheter vente vendre investissement investir foncier titre lettre d'attribution bamako developpement acquisition acquerir plan propriete kayes segou sikasso koulikoro mopti tombouctou kidal gao fleuve eau mitoyen annonce annonces ",
" titre foncier opportunite 500m2 sur route futur pont ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
"",
" opportunite exceptionnelle d'investissement pas manquer parcelles deja vendues reste plus 5 ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" titre foncier plusieurs terrains mitoyens situes juste apres boulkassoumbougou ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" photos non disponibles  ",
" terrain rare 250m2 dans bamako ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" demi hectare prix tres abordable ",
" saisissez contenu panneau ici ",
" photos non disponibles ",
" saisissez contenu panneau ici ",
" immobilier mali malien terrain achat acheter vente vendre investissement investir foncier titre lettre d'attribution bamako developpement acquisition acquerir plan propriete kayes segou sikasso koulikoro mopti tombouctou kidal gao fleuve eau mitoyen annonce annonces ",
" opportunite exceptionnelle grand terrain 750 dans l'un plus beaux quartiers bamako ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" notre coup coeur exclusivite ikadou ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" investissement ideal exclusivite ikadou ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" terrain d'habitation exceptionnel 749m2 soit beaucoup plus terrains classiques exclusivite ikadou ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" deux terrains avec lettre d'attribution ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" terrains 300m2 chacun minutes bamako ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" photos non disponibles  ",
" ideal investissement ans exclusivite ikadou ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" titres fonciers nombreux terrains mitoyens investissement ",
" saisissez contenu panneau ici ",
" photos non disponibles ",
" saisissez contenu panneau ici ",
" immobilier mali malien terrain achat acheter vente vendre investissement investir foncier titre lettre d'attribution bamako developpement acquisition acquerir plan propriete kayes segou sikasso koulikoro mopti tombouctou kidal gao fleuve eau mitoyen annonce annonces ",
" occasion saisir construction immediate ",
" saisissez contenu panneau ici ",
" photos non disponibles ",
" saisissez contenu panneau ici ",
" construction immediate ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" hectares titre foncier ideal investissement professionnel ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" immobilier mali malien terrain achat acheter vente vendre investissement investir foncier titre lettre d'attribution bamako developpement acquisition acquerir plan propriete kayes segou sikasso koulikoro mopti tombouctou kidal gao fleuve eau mitoyen annonce annonces ",
" terrain 300m2 ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
" saisissez contenu panneau ici ",
"",
" immobilier mali malien maison construction construire achat acheter vente vendre investissement investir bamako acquisition acquerir appartement plan devis architecture propriete plain pied mitoyen location louer annonce annonces bien kayes segou sikasso koulikoro mopti tombouctou kidal gao  ",
" immobilier mali malien maison construction construire achat acheter vente vendre investissement investir bamako acquisition acquerir appartement plan devis architecture propriete plain pied mitoyen location louer annonce annonces bien kayes segou sikasso koulikoro mopti tombouctou kidal gao  ",
" ci-dessous annonces maisons actuellement disponibles sur notre site fois choix effectue contactez-nous via contact formulaire ecrire contact@ikadou com reviendrons vers sous heures trouvez pas maison recherchez parmi ces n'hesitez demander nos agents bamako mettront tout oeuvre denicher desirs dans plus brefs delais cliquez l'onglet prix stock saisir vente l'objet eventuels frais port ",
" immobilier mali malien maison construction construire achat acheter vente vendre investissement investir bamako acquisition acquerir appartement plan devis architecture propriete plain pied mitoyen location louer annonce annonces bien kayes segou sikasso koulikoro mopti tombouctou kidal gao  ",
" immobilier mali malien maison construction construire achat acheter vente vendre investissement investir bamako acquisition acquerir appartement plan devis architecture propriete plain pied mitoyen location louer annonce annonces bien kayes segou sikasso koulikoro mopti tombouctou kidal gao  ",
" ci-dessous annonces maisons louer actuellement disponibles sur notre site fois choix effectue contactez-nous via contact formulaire ecrire contact@ikadou com reviendrons vers sous heures ",
" immobilier mali malien terrain achat acheter vente vendre investissement investir foncier titre lettre d'attribution bamako developpement acquisition acquerir plan propriete kayes segou sikasso koulikoro mopti tombouctou kidal gao fleuve eau mitoyen annonce annonces ",
" immobilier mali malien terrain maison achat acheter vente vendre investissement investir foncier titre lettre d'attribution bamako developpement acquisition acquerir appartement propriete kayes segou sikasso koulikoro mopti tombouctou kidal gao location louer district annonce annonces ",
" immobilier mali terrain maison annonce gratuit bamako parrain filleul parrainage ",
" immobilier mali terrain maison service notaire achat vente bamako propriete annonce ",
" immobilier mali terrain maison service notaire achat vente bamako propriete annonce ",
" immobilier mali terrain maison service notaire achat vente bamako propriete annonce ",
" ikadou accompagne dans toutes demarches projet selection terrain jusqu'aux administratives accompagnons conseillons toujours mieux interets l'etude chiffree budget d'investissement integrant l'ensemble frais incontournables qu'il sera necessaire prevoir recherche batir district bamako alentours l'aide l'elaboration etude plan financement sur credits pouvez obtenir aidons monter dossiers bancaires maison personnalisee fonction desirs besoins mode vie avec architectes depuis france etabli respect regles d'urbanismes vigueur mali tenant compte choix 	l'architecture desiree classique traditionnelle moderne 	le type souhaite plain-pied etage 	les materiaux retenus construction individuelle d'energie choisi solaire electrique gestion formalites transfert propriete aupres notaire 	l'acquisition titre foncier permis construire projets 	l'accompagnement ",
" immobilier mali malien terrain maison achat vente investir foncier titre lettre d'attribution bamako developpement kayes segou sikasso koulikoro mopti tombouctou kidal gao annonce ",
" contact formulaire nom ville ",
" message ete envoye remercions interet nos biens reviendrons vers sous heures  ",
" message n'a pas ete envoye merci bien vouloir verifier nouveau donnees saisies ecrire directement contact@ikadou com  ");
urlsArray = new Array("../accueil/index.html",
"../terrains/index.html",
"../bamakonordest/index.html",
"../bamakonordest/page1.html",
"../bamakonordest/page1.html",
"../bamakonordest/page1.html",
"../bamakonordest/page1.html",
"../bamakonordest/page2.html",
"../bamakonordest/page2.html",
"../bamakonordest/page2.html",
"../bamakonordest/page2.html",
"../bamakonordest/page3.html",
"../bamakonordest/page3.html",
"../bamakonordest/page3.html",
"../bamakonordest/page3.html",
"../bamakonordest/page4.html",
"../bamakonordest/page4.html",
"../bamakonordest/page4.html",
"../bamakonordest/page4.html",
"../bamakonordest/page5.html",
"../bamakonordest/page5.html",
"../bamakonordest/page5.html",
"../bamakonordest/page5.html",
"../bamakosudest/index.html",
"../bamakosudest/page1.html",
"../bamakosudest/page1.html",
"../bamakosudest/page1.html",
"../bamakosudest/page1.html",
"../bamakosudest/page2.html",
"../bamakosudest/page2.html",
"../bamakosudest/page2.html",
"../bamakosudest/page2.html",
"../bamakosudest/page3.html",
"../bamakosudest/page3.html",
"../bamakosudest/page3.html",
"../bamakosudest/page3.html",
"../bamakosudest/page4.html",
"../bamakosudest/page4.html",
"../bamakosudest/page4.html",
"../bamakosudest/page4.html",
"../bamakosudest/page5.html",
"../bamakosudest/page5.html",
"../bamakosudest/page5.html",
"../bamakosudest/page5.html",
"../bamakosudest/page6.html",
"../bamakosudest/page6.html",
"../bamakosudest/page6.html",
"../bamakosudest/page6.html",
"../bamakosudest/page7.html",
"../bamakosudest/page7.html",
"../bamakosudest/page7.html",
"../bamakosudest/page7.html",
"../bamakosudest/page8.html",
"../bamakosudest/page8.html",
"../bamakosudest/page8.html",
"../bamakosudest/page8.html",
"../bamakosudouest/index.html",
"../bamakosudouest/page1.html",
"../bamakosudouest/page1.html",
"../bamakosudouest/page1.html",
"../bamakosudouest/page1.html",
"../bamakosudouest/page2.html",
"../bamakosudouest/page2.html",
"../bamakosudouest/page2.html",
"../bamakosudouest/page2.html",
"../bamakosudouest/page3.html",
"../bamakosudouest/page3.html",
"../bamakosudouest/page3.html",
"../bamakosudouest/page3.html",
"../bamakonordouest/index.html",
"../bamakonordouest/index.html",
"../bamakonordouest/index.html",
"../bamakonordouest/index.html",
"../bamakonordouest/index.html",
"../bamakonordouest/index.html",
"../maisons/index.html",
"../maisonsavendre/index.html",
"../maisonsavendre/index.html",
"../maisonsurmesure/index.html",
"../maisonsalouer/index.html",
"../maisonsalouer/index.html",
"../investissement/index.html",
"../avendre/index.html",
"../parrainage/index.html",
"../nousconnaitre/index.html",
"../connaitre/index.html",
"../services/index.html",
"../services/index.html",
"../mali/index.html",
"../contact/index.html",
"../confirmation/index.html",
"../nonenvoi/index.html");
titlesArray = new Array("Vente de terrains, de maisons et conseil immobilier au Mali",
"Annonces de terrains en vente dans Bamako et ses alentours",
"Annonces de terrains en vente dans Bamako et ses alentours",
"Bamako - Yirimadio",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Bamako - Missabougou",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Bamako - Moribabougou",
"Titre du panneau",
"Titre du panneau",
"Titre du panneau",
"Bamako - Magnambougou",
"Titre du panneau",
"Titre du panneau",
"Titre du panneau",
"Bamako - Safo",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Annonces de terrains en vente dans Bamako et ses alentours",
"Bamako - Banakabougou",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Bamako - Kobalakoura",
"Titre du panneau",
"Titre du panneau",
"Titre du panneau",
"Bamako - Dialabougou",
"Photo",
"Titre du panneau",
"Titre du panneau",
"Bamako - Banankoro",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Bamako - Banankoro",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Bamako - Mountougoula",
"Titre du panneau",
"Titre du panneau",
"Titre du panneau",
"Bamako - Zougoumè",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Bamako - Diatoula",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Annonces de terrains en vente dans Bamako et ses alentours",
"Bamako - Kabala",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Bamako - Kabla Extension",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Bamako -Kanadjiguila",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Annonces de terrains en vente dans Bamako et ses alentours",
"Kati Sananfra",
"Titre du panneau",
"Photos non disponibles !",
"Titre du panneau",
"Titre de paragraphe",
"Maisons en vente, à louer ou à construire dans Bamako et ses alentours",
"Maisons en vente, à louer ou à construire dans Bamako et ses alentours",
"Entrez le titre de l'article ici",
"Maisons en vente, à louer ou à construire dans Bamako et ses alentours",
"Maisons en vente, à louer ou à construire dans Bamako et ses alentours",
"Entrez le titre de l'article ici",
"Investissement immobilier dans Bamako et ses alentours",
"Mise en vente ou location de votre bien immobilier",
"Parrainez vos proches et nous vous offrons votre propre terrain",
"Tout connaitre sur Ikadou",
"Le projet d'Ikadou",
"Les services d'Ikadou",
"Service personnalisé",
"Les clés de l'immobilier malien",
"Contactez Ikadou",
"Votre message a été envoyé",
"Votre message n'a pas été envoyé");
descArray = new Array("                                                                  Le site est indisponible pour le moment pour mise.                                  ...",
"Annonces de terrains en vente dans Bamako (Mali) et ses alentours.",
"Annonces de terrains en vente dans le nord est de Bamako (Mali) et ses alentours. ",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"Annonces de terrains en vente dans le sud est de Bamako (Mali) et ses alentours. ",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"Annonces de terrains en vente dans le sud ouest de Bamako (Mali) et ses alentours. ",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"&",
"Annonces de terrains en vente dans le nord ouest de Bamako (Mali) et ses alentours. ",
"&",
"&",
"&",
"&",
"&",
"Annonces et mandats de recherche de maisons en vente, à louer ou à construire dans Bamako (Mali) et ses alentours. ",
"Annonces et mandats de recherche de maisons en vente, à louer ou à construire dans Bamako (Mali) et ses alentours. ",
"&",
"Annonces et mandats de recherche de maisons en vente, à louer ou à construire dans Bamako (Mali) et ses alentours. ",
"Annonces et mandats de recherche de maisons en vente, à louer ou à construire dans Bamako (Mali) et ses alentours. ",
"&",
"Investissements immobiliers professionnels à Bamako ou dans d'autres régions du Mali",
"Mise en vente ou location de votre bien immobilier (terrain, maison, appartement) dans Bamako. ",
"Parrainez l'achat de biens imobiliers à Bamako et nous vous offrons votre propre terrain. ",
"Ikadou,  Ton foyer  en bambara, est un réseau implanté au Mali et en France. Notre équipe comprend les souhaits des Maliens de l'extérieur, des porteu...",
"Ikadou a été créé pour répondre au désir de nombreux Maliens de l'extérieur qui souhaitent se faire construire une maison  au pays  sans disposer de p...",
"Ikadou vous accompagne dans toutes les démarches de votre projet. De la sélection de votre terrain jusqu'aux démarches administratives, nous vous acco...",
"&",
"Description du marché de l'immobilier malien. ",
"Contactez Ikadou via notre formulaire. ",
"Nous vous remercions de votre intérêt pour nos biens. Nous reviendrons vers vous sous 48 heures. ",
"Merci de bien vouloir vérifier à nouveau les données saisies ou de nous écrire directement à contact@ikadou.com !");
sublinksArray = new Array(92);
var linksCount = 92;


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>");
}
