// ----------------------------------------------------------------------------
// Lauyan Software Javascript Search Engine 1.1
//
// 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_SCORE = "Score";
STR_TERMS = "Termes";
STR_SEARCH_SIZE = "40";
MIN_WORD_LEN = 2;
DISPLAY_SRCH_INFO = 1;
USE_UTF8 = 0;
REMOVE_ACCENTS = 1;
BOLD_LINKS = 0;
ONLINE_WEBSITE = 1;
ALLWORDSONLY = 0;
namesArray = new Array(" ondes courtes radioamateurs atlas collins comelec heathkit kenwood marine mizuho multibandes fdk racal realistic saram sommerkamp standard surplus ten tec thomson yaesu zenith manipulateurs morse  ",
" atlas rx-110 swan recepteur ",
" transceiver avco at430 at431 at432 ",
" collins 51s1 rockwell radio company arthur cedar rapids recepteur ",
" fdk  ",
" fdk multi 700 ref vhf transceiver ",
" fdk palmsizer vhf transceiver ",
" hallicrafters s120 recepteur receiver ",
" heathkit  ",
" heathkit gr-64 recepteur hf ",
" heathkit hw-101 radio-ref ref hw-101f transceiver ",
" heathkit hr-20 hp-10 hp-20 alimentation transceiver hf ",
" heathkit hw-32 ",
" heathkit hw-2036 transceiver ",
" heathkit im-18d voltmetre electronique ",
" heathkit voltmetre im-18 multimetre digital im-102 ",
" heathkit it-27 ",
" heathkit signal generator sg-8 ",
" heathkit sw-171 recepteur receiver ",
" heathkit hm-9 hm-15 qrp wattmeter hm-2102 am-1 antenna impedance meter ",
" heathkit hp-13 hp-23 hwa-202 alimentation  ",
" heathkit catalogues ",
" heathkit  ",
" publications  ",
" kenwood  ",
" kenwood ts-820 trio trio-kenwood transceiver ",
" kenwood tr-2300 vhf transceiver ",
" comelec r144 def megahertz fsk ",
" marine  ",
" radiomaritime furuno lc-90 mark-ii loran gps  ",
" marine sailor 66t r2022 ",
" jean-luc fournier radiomaritime sailor type 66t simon petersen thrane vhf radio ocean ro1200 corail 2000 belcom f-204l radio-compas seafix ecran radar raytheon r20 ",
" mics radio  ",
" mics 8 ",
" essem mics radio ",
" mizuho tsushin qrp jim santec mx-3 mx-7s ssb cw ",
" morse  ",
" manipulateur morse j-38 lionel corporation pioche telegraphie amp n°2 mkii ",
" esl merit fleron signaler bsa national supply service division trenton code morse cle vibreur official boy scout signal set braumberger hi-mound bk-100 buzzer sign training  ",
" manipulateur morse saram marius wb4eni key hi-mound bk-100 esl buzzer sign training ",
" dyna chabot ptt 1929 buzzer jardillier maniflex marine 1938 1947 americain manipulateur type blinde double-contact bunnel manitone ",
" morse code oscillator heathkit hd-16 tutor datong d70 ",
" sounder telegraphie bunnel alfred vail ",
" koyo ktr-1661 radio-ref selena b-217 vega 204 206 b-210 sonata-201 comix radio-tubes  ",
" racal tra 967 collins hammarlund sfr vhf ray brown jock calder cunningham pleyssey wadley barlow-wadley thomson-csf thales thomson-csf-racal version  ",
" realistic saisissez message d'introduction groupe rubriques ",
" realistic dx-200 multibandes radioshack tandy corporation ssb band spread  ",
" scanner realistic pro2002 vhf marines fluviales uhf ham aircraft air ",
" saram  ",
" saram omera bronzavia aero-radio 536 150a marine recepteurs emetteurs merles trt sintra sephot vhf uhf 82 ",
" saram bronzavia type 331 chars cavalerie s35 3311 recepteur t20 societe industrielle procedes loth trt fug 3-10 radiophare vhf stta marine omera magneti-marelli trap11a merles trap21 trap22 uhf collins rg ",
" saram omera tr-ap-6 tr-ap-23 er-13a bm-54 5-52 merles transceiver  ",
" saram omera tr-ap-6 tr-ap-23 er-13a bm-54 5-52 merles transceiver  ",
" saram ",
" sommerkamp ft-227 electronic lugano switzerland yaesu ft-101 musen bail radio ft-101b fv-101 remote vfo fl-2100 linear amplifier sp-101pb phone patch sp-101 speaker yo-100 yo-101 monitor scope yc-601 digital display unit ftv-250 meter transverter ftv-650 yp-150 dummy load watt yd-844 dynamic desk microphone qtr-24 world clock fr-50b fr-100b frdx-500 radio-ref fox tango user group henry tempo one by7a 6js6c transceiver ",
" transceiver standard c828m vhf sr-cv110  ",
" surplus radio  ",
" surplus cirque radio jean naepels radio-plans  ",
" surplus cirque radio jean naepels radio-plans  ",
" surplus cirque radio jean naepels radio-plans  ",
" surplus scr 274n command set bc453 bc454 bc455 r23 arc5 r26 r27  ",
" surplus scr508 scr528 528 bc-604 bc-603 scr-628 scr-638 bc-684 bc-683 beric haut-parleur recepteur bc-728 superheterodyne an-75a grammont handy talky prc-6 rt-196 bc-611 h-33 mesureur champs ts-153 vhf  ",
" surplus scr508 scr528 528 bc-604 bc-603 scr-628 scr-638 bc-684 bc-683 beric haut-parleur recepteur bc-728 superheterodyne an-75a grammont handy talky prc-6 rt-196 bc-611 h-33 mesureur champs ts-153 vhf  ",
" surplus socrat sk-21-c tr-ap-16- a-b-c-d 19-a 27-a er74a tr-1114 emetteur recepteur vhf  ",
" transceiver ten tec argonaut 509 electro-voice heathkit 505 qrp  ",
" radio-telephone vhf thomson tmf 220 atr221 ",
" trio tr2e ",
" vlf very low frequency lowfrequency utilitaires ondes frequence stations navigation navires mer aeronautique balises detresse loran omega militaires amateur 135 137 horaires dcf77 natural whistlers chorus datong heathkit hd1420 converter longwave cadran  ",
" wrl duo bander globe ",
" zenith heathkit data corporation bull royal 1000-d trans oceanic wavemagnet 9at41z2 9at40 9ct41z 9ht41z2 blu bandes marines 1000-l 9ht40z2 9ht40z8  ",
" galerie d'om's souvent radioamateurs swl collectionneurs ont gentillesse faire parvenir photos leurs materiels cette sympathique attention permet aux uns autres decouvrir redecouvrir disparus rares afin remercier l'interet qu'ils accordent site m'a semble necessaire d'ouvrir rubrique connaitre ",
" handbook arrl ",
" bibliographie  ",
" radioamateur morse qso licence ",
" raffin radioamateur emission reception  ",
" ondes courtes montages heathkit gr-78 sw-717f hr-1680 transceiver hw8-f vhf uhf shf antennes mobile transistors frequences walkies talkies 144  ",
" amateur vhf handbook radioamateur qrp notebook modulation ondes courtes swl qst ",
" ondes courtes montages vhf uhf shf antennes mobile transistors frequences walkies talkies 144  ",
" amateur vhf handbook radioamateur qrp notebook modulation ondes courtes swl qst ",
" collins radiotelegraphistes radio ",
" datas tubes  ",
" manuels schemas ",
" revues autres  ",
" liens  ",
" manuels schemas collections radioamateur collins heathkit ref associations uft pioche tsf ",
" forums radiomaritime jean-luc fournier camille-tissot collectionneur pocket transistors ",
" quoi neuf  ",
" remerciements  ");
urlsArray = new Array("../topic/index.html",
"../atlasrx-110/index.html",
"../avco/index.html",
"../collins/index.html",
"../groupederubriqu10/index.html",
"../fdk750ax/index.html",
"../fdk/index.html",
"../hallicrafter/index.html",
"../groupederubriqu9/index.html",
"../heathkitgr-64/index.html",
"../heathkithf/index.html",
"../heathkit/index.html",
"../heathkithw-32/index.html",
"../heathkitvhf/index.html",
"../mapage5/index.html",
"../heatkitmultimetr/index.html",
"../heathkitit-27/index.html",
"../heathkitmesuresi/index.html",
"../heathkitsw-717/index.html",
"../mesures/index.html",
"../hetahkitalim/index.html",
"../archives/index.html",
"../heathkitcatalogs/index.html",
"../articlesrevues/index.html",
"../groupederubriqu8/index.html",
"../kenwood/index.html",
"../kenwoodtrio/index.html",
"../kits/index.html",
"../groupederubriqu2/index.html",
"../marineii/index.html",
"../marineiiisailor/index.html",
"../marine/index.html",
"../groupederubriqu1/index.html",
"../micstv8/index.html",
"../smelectronique/index.html",
"../omexpo/index.html",
"../groupederubriqu3/index.html",
"../mapage/index.html",
"../manipulateursii/index.html",
"../toursdemaini/index.html",
"../mapage6/index.html",
"../keyer/index.html",
"../morseivsounder/index.html",
"../multibandes/index.html",
"../racaltra967/index.html",
"../groupederubriqu7/index.html",
"../realistic/index.html",
"../realisticpro2002/index.html",
"../groupederubriqu4/index.html",
"../saram1/index.html",
"../saramgammes/index.html",
"../saram/index.html",
"../sarambm-54/index.html",
"../saramgalerie/index.html",
"../sommerkamp/index.html",
"../standart/index.html",
"../groupederubriqu5/index.html",
"../surplusbibliogra/index.html",
"../preambule/index.html",
"../articlesh-p/index.html",
"../surplusiii/index.html",
"../surplus/index.html",
"../bc603bc728/index.html",
"../mapage3/index.html",
"../tentecagonaut509/index.html",
"../mapage1/index.html",
"../triotr2e/index.html",
"../mapage2/index.html",
"../mapage4/index.html",
"../zenith/index.html",
"../galerieoms/index.html",
"../handbookarrl/index.html",
"../groupederubrique/index.html",
"../bibliographiev/index.html",
"../bibliographieii/index.html",
"../bibliographieiii/index.html",
"../bibliographieii1/index.html",
"../bibliographieiv1/index.html",
"../bibliographie/index.html",
"../bibliographieiv/index.html",
"../data-tubes/index.html",
"../manuels/index.html",
"../revuesautres/index.html",
"../groupederubriqu6/index.html",
"../topic1/index.html",
"../liensii/index.html",
"../viedusite/index.html",
"../remerciements/index.html");
titlesArray = new Array("BIENVENUE SUR LA PAGE D'ACCUEIL DE SWL RADIO STATION",
"RECEPTEUR HF ATLAS RX-110",
"TRANSCEIVER AVCO",
"RECEPTEUR COLLINS 51S1",
"FDK",
"TRANSCEIVER VHF FDK MULTI-700AX",
"MULTI PALMSIZER II",
"RECEPTEUR HALLICRAFTERS S120",
"HEATHKIT",
"RECEPTEUR HEATHKIT GR-64",
"TRANSCEIVER HEATHKIT HW-101F",
"RECEPTEUR SSB HEATHKIT HR-20",
"TRANSCEIVER HEATHKIT HW-32",
"TRANSCEIVER 2M SYNTHETISE HEATHKIT HW-2036F",
"MULTIMETRE DIGITAL HEATHKIT IM-18D",
"MULTIMETRE DIGITAL HEATKIT IM-18D",
"TRANSISTOR-DIODE HEATHKIT CHECKER MODEL IT-27",
"RF GENERATOR HEATHKIT SG-8",
"RECEPTEUR HEATHKIT SW-717",
"HEATHKIT : MESURE DU R.O.S",
"HEATHKIT : ALIMENTATIONS",
"CATALOGUES HEATHKIT",
"FICHES HEATHKIT",
"PUBLICATIONS",
"KENWOOD",
"TRANSCEIVER HF KENWOOD TS-820S",
"TRANSCEIVER KENWOOD TR-2300",
"KITS",
"MARINE",
"MARINE : FURUNO",
"MARINE : SAILOR",
"MATERIELS DIVERS DE RADIOMARITIME",
"MICS RADIO",
"EMETTEUR MICS TV 8",
"SOMMAIRE DES REVUES ESSEM ELECTRONIC",
"TRANSCEIVER MIZUHO MX-14S",
"MORSE",
"MANIPULATEURS MORSE I",
"MANIPULATEURS MORSE II",
"REMISE EN ETAT D'UN MANIPULATEUR MORSE SARAM PAR MARIUS WB4ENI (SILENT KEY SINCE 19-06-2007)",
"LES MANIPULATEURS DYNA PAR F9WT",
"KEYER OU OSCILLATEUR POUR L'APPRENTISSAGE DU CODE MORSE",
"SOUNDER",
"RECEPTEURS MULTIBANDES",
"TRANSCEIVER RACAL TRA.967",
"REALISTIC",
"RECEPTEUR REALISTIC DX-200",
"SCANNER REALISTIC PRO 2002",
"SARAM",
"HISTOIRE",
"GAMMES DE MATERIELS",
"TRANSCEIVER SARAM 5-52",
"BOÎTE DE MESURES SARAM BM-54",
"SARAM : GALERIE PHOTOS",
"TRANSCEIVER HF SOMMERKAMP FT-277",
"TRANSCEIVER STANDARD C828M 2M FM",
"SURPLUS RADIO",
"SURPLUS : PREAMBULE",
"SURPLUS : LISTE DES ARTICLES PARUS DANS LA REVUE LE HAUT-PARLEUR",
"SURPLUS : LISTE DES ARTICLES PARUS DANS LA REVUE RADIO-PLANS",
"SURPLUS : RECEPTEUR BC-454",
"SURPLUS : BC-603 & BC-728",
"SURPLUS : PRC6 & TS-153/AP",
"SURPLUS : EMETTEUR-RECEPTEUR VHF SOCRAT ER 74A",
"TRANSCEIVER HF TEN TEC ARGONAUT 509",
"RADIO-TELEPHONE VHF THOMSON TMF 220",
"TRANSCEIVER TRIO TR2E",
"VLF",
"TRANSCEIVER WRL DUO BANDER 84",
"ZENITH",
"GALERIE D'OM'S",
"HANDBOOK ARRL",
"BIBLIOGRAPHIE",
"BIBLIOGRAPHIE : THEORIE POUR LE PASSAGE DU CERTIFICAT OPERATEUR",
"BIBLIOGRAPHIE : EMISSION ET RECEPTION AMATEUR",
"BIBLIOGRAPHIE : REALISATIONS ONDES COURTES",
"BIBLIO : QRP",
"BIBLIOGRAPHIE : VHF-UHF",
"BIBLIOGRAPHIE : SWL",
"BIBLIOGRAPHIE : HISTOIRE DE LA RADIO",
"DATAS TUBES",
"MANUELS & SCHEMAS",
"REVUES AUTRES",
"LIENS",
"LIENS RADIOAMATEURS",
"LIENS RADIO-T.S.F",
"Swl Radio Station",
"REMERCIEMENTS");
descArray = new Array("Site de Jean-Pierre F0FFB radioamateur et collectionneur de matériels Atlas, AVCO, Collins, CSF, Hallicrafter, Heathkit, Kenwood, FDK, Marine, Mics, M...",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"Saisissez le message d'introduction de votre groupe de rubriques",
"",
"",
"",
"",
"",
"SARAM 5.52, 5-52",
"SARAM BM-54",
"",
"",
"Standard, C828M",
"",
"",
"",
"",
"",
"",
"",
"",
"Ten Tec, Argonaut",
"",
"",
"",
"",
"",
"Souvent des Radioamateurs, SWL ou Collectionneurs ont la gentillesse de me faire parvenir des photos de leurs matériels. Cette sympathique attention p...",
"Publié par l'American Radio Relay League depuis 1926, cet ouvrage parait tous les ans aux U.S.A.  Il est régulièrement remis à niveau et présente une ...",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"Site de Jean-Pierre F0FFB radioamateur et collectionneur de matériels Atlas, AVCO, Collins, CSF, Hallicrafter, Heathkit, Kenwood, FDK, Marine, Mics, M...",
"Site de Jean-Pierre F0FFB radioamateur et collectionneur de matériels Atlas, AVCO, Collins, CSF, Hallicrafter, Heathkit, Kenwood, FDK, Marine, Mics, M...");
sublinksArray = new Array(88);
var linksCount = 88;


function SubmitSearch(n)
{
	var p = document.getElementsByName("jse_query");
	var idx = n;  if( p < 0) return false;
	if( p && p[idx] && p[idx].value != "" ) {
	if( (p[idx].value).replace(/^\s+|\s+$/g, '') != "" ) {
		p = document.getElementsByName("jse_form");
		if( p && p[idx] )
			p[idx].submit();
		return true;
	  }
	}
	return false;
}
function switchSearchLang(lang,emptycart)
{
	var params = "";
	var currURL = document.location.href;
	var newURL = (currURL.lastIndexOf('_frame/search2') >= 0) ? "search2":"search";
	if( lang != "" )
		newURL += "-"+lang;
	newURL += ".html";
	var paramIndex = currURL.lastIndexOf('?');
	if( paramIndex > -1 )
		newURL += "?" + currURL.substr( paramIndex + 1 );
	if( emptycart && typeof(CleanShopcart) != "undefined" )
		CleanShopcart();
	document.location.href = newURL;
	return 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 getQueryParam()
{
  var query = getParam("jse_query");
  query = query.replace(/[\++]/g, " ");  // replace any '+' with spaces
  query = query.replace(/\</g, "&lt;");
  query = query.replace(/[\"+]/g, " ");
	return query;
}

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 = getQueryParam();

  // 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>");
  }
  */
  if( internal == 1 ) {
	 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( "<span class='wg-paragraph'>" + STR_SEARCH_QUERY_MSG + " : <strong>" +query+"</span></strong><br>");
  }
  // init result table information
  res_table = new Array(linksCount);
  for( t=0; t<linksCount; t++ )
  {
    res_table[t] = new Array(4);
    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 )
			{
				var idx = urlsArray[t].indexOf('@');
				if( idx > 0 ) 
				{
					var lnk = urlsArray[k].substr(0, idx)
					if( res_table[t][3].indexOf( lnk ) == -1 )
						res_table[t][3] += "<tr><td width='35'>&nbsp;</td><td><a href=\"" + urlsArray[k].substr(idx+1) + "\" name=\"" + lnk + "\">" + titlesArray[k] + "</a></td></tr>";
				} else 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 class='wg-paragraph'><b>" + STR_NO_RESULT + "</b></p>");
  } 
  else 
  {
/*	if( ALLWORDSONLY )
	{
		//  if all words only then we recount and filter amoung the results to get the total of found items
		found = 0;
		for( var z=0; z<itemsCount; z++ )
			if( res_table[z][1] > 0 ) // display only results with a positive score
			if( !ALLWORDSONLY || (ALLWORDSONLY && res_table[z][2] == significantwords) )
				found++;
	}
  */
	// sort by words found and scores
    res_table.sort(SortCompare);	
    // display the results
	document.writeln( '<div class="wg-paragraph">' );
    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

		var lnk = urlsArray[t] + lnktarget;
		var idx = urlsArray[t].indexOf('@');
		if( idx > 0 ) 
			lnk = urlsArray[t].substr(idx+1);
			
		if( BOLD_LINKS ) {
		  document.writeln("<br><b>" + (q+1) + ". <a href=\"" + lnk + "\">" + titlesArray[t] + "</a></b>" );
		} else
		  document.writeln("<br><b>" + (q+1) + ".</b> <a href=\"" + lnk + "\">" + 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( urlsArray[t].indexOf('@') > 0 ) {
			  document.writeln(" - URL: 'TOWeb demonstration'</span>");
			} else 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 class="wg-paragraph">' + res_table[q][3] + '</table>' );
      	} else document.writeln("<br>");
      }
 	document.writeln( '</div>' );
  }
  document.writeln("<br>");
}
