// ----------------------------------------------------------------------------
// 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 = "20";
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(" femme concours vin femmes femme femmes vin vins vins monde monde concours international international women women woman woman wine wine wines wines world world competition competition monaco monaco pamela anderson reserve 1er grand cru village vignoble vineyards rss bourgogne france vigne vigneron vigneronne vinification viticultrice chef d'entreprise formation vente export authenticite association echanges diversite terroir terroirs alsace lorraine aquitaine beaujolais champagne charentes franche comte jura languedoc roussillon provence corse savoie sud ouest val loire vallee rhone miraval miraval rhone france vin club club regine coz lecoz coz amateur oenophile oenologues oenologue sommelieres viticultrices vigneronnes laborantines commercial manager guide bordeaux cepage chateau aoc margaux rouge etrus petrus viticole 	 ",
" palmares palmares femme femmes femme femmes packaging bottlle bottle vin vin vins vins monde monde concours concours international international women women woman woman wine wine wines wines world world competition competition monaco monaco pamela anderson rss reserve 1er first alsace lorraine aquitaine bourgogne beaujolais champagne charentes franche comte jura languedoc roussillon provence corse savoie sud ouest val loire vallee rhone rhone oiv normes classification ",
" propos  ",
" diversite echange convivialite sur fond partage ",
" equipe team production negoce formation marketing recherche appliquee commercialisation consulting œnologique viticole communication Évenementiel elle ete l'initiatrice co-fondatrice co-organisatrice concours international vins roses monde®‚ mondial rose® cannes 2004 collaboration avec l'union Œnologues france jerome dufour Œnologue conseil consultant vigne vin agnieszka wyrobek rousseau winemaker consultante internationale 	pologne florence lemoine 	responsable laboratoire d'analyses œnologiques 	france mathilde morel 	Œnologue vigneronne laurence santiago 	ingenieur florent ficty 	vigneron guillaume guenin georg meissner biodynamiste enseignant-chercheur 	allemagne comite consultatif mary kelly 	maitre conferences enseignante-chercheur 	irlande alain guittard directeur centre lars torstenson 	winemaker 	suede technique scientifique ",
" degustatrices internationales tasters mijares cointreau baker van wyck nom prenom pays college profession titre helena republique tcheque wine journalist writer educator membre fijev wyrobek rousseau agnieszka pologne oenologue consultante internationale rebufa castillo patricia france chef cuisinier formatrice coates claire d'entreprise beatrice consulting international l'academie vins courreges valerie directrice production desse laurence technique suisse vigneronne presidente l’iawiw the associated women association etchaberry yustes adriana espagne ingenieur conseil gangnat juliette canada animatrice degustation gautier kinette maÎtre sommelier l'association sommeliers bordeaux aquitaine karampatea katerina grece responsable qualite liste nominative femmes monde concours and wines world competition deuxieme edition monaco 2008 ikeno mie japon lozano ruiz margarita editrice l'asi marsotto laura italie maitre l’association mesquita joana portugal relations publiques garcia-pelayo maria isabel chimiste journal experte analyse sensorielle vice federation dees journalistes ecrivains vin aepev amerique latine asociacion espanola periodistas escritores del vino ottoson anna suede receptionniste hotel import agent peng jia chine export manager traductrice saveurs champagne confrerie saint etienne d'alsace pitti liliana reservation porte pascale redactrice santiago tolstousova tatiana ukraine designer enseignante wyk sue australie afrique sud consultant winemaker name surname country panel titrate czech republic member wyrokek enologist patrica company director academie ooenologist oenologist technical spain producer tasting tutor master quality management list second japan publisher asi italia public chemist expert sensorial analysis president sweden china translator chief editor lecturer australia south africa ",
" degustatrices internationales tasters mijares cointreau baker van wyck nom prenom pays college profession titre helena republique tcheque wine journalist writer educator membre fijev wyrobek rousseau agnieszka pologne oenologue consultante internationale rebufa castillo patricia france chef cuisinier formatrice coates claire d'entreprise beatrice consulting international l'academie vins courreges valerie directrice production desse laurence technique suisse vigneronne presidente l’iawiw the associated women association etchaberry yustes adriana espagne ingenieur conseil gangnat juliette canada animatrice degustation gautier kinette maÎtre sommelier l'association sommeliers bordeaux aquitaine karampatea katerina grece responsable qualite liste nominative femmes monde concours and wines world competition deuxieme edition monaco 2008 ikeno mie japon lozano ruiz margarita editrice l'asi marsotto laura italie maitre l’association mesquita joana portugal relations publiques garcia-pelayo maria isabel chimiste journal experte analyse sensorielle vice federation dees journalistes ecrivains vin aepev amerique latine asociacion espanola periodistas escritores del vino ottoson anna suede receptionniste hotel import agent peng jia chine export manager traductrice saveurs champagne confrerie saint etienne d'alsace pitti liliana reservation porte pascale redactrice santiago tolstousova tatiana ukraine designer enseignante wyk sue australie afrique sud consultant winemaker name surname country panel titrate czech republic member wyrokek enologist patrica company director academie ooenologist oenologist technical spain producer tasting tutor master quality management list second japan publisher asi italia public chemist expert sensorial analysis president sweden china translator chief editor lecturer australia south africa ",
" presentation concours  ",
" monaco monte carlo ",
" vin wine competition concours 2010 competiteurs femmes hommes admis participer sont vignerons recoltants cooperatives vinicoles unions groupements producteurs negociants eleveurs importateurs distributeurs international s'adresse aux vins avec indication geographique provenant tous pays toutes regions viticoles seront degustes exclusivement expertes internationales table sans pas concourir visee est valoriser qualites fondamentales recompenser ceux auront atteint niveaux organoleptiques rapprochant summum organoleptique leur appellation origine aussi destine mettre lumiere role metiers qu'elles exercent dans monde vigne niveau travers colleges degustatrices trouverez dossiers d'inscription telecharger sur site officiel disponibles langues rappel date limite echantillons mars reception 31 ",
" palmares 2010  ",
" femme femmes femme femmes vin vin vins vins monde monde concours concours international international women women woman woman wine wine wines wines world world competition competition monaco monaco pamela anderson rss reserve 1er alsace lorraine aquitaine bourgogne beaujolais champagne charentes franche comte jura languedoc roussillon provence corse savoie sud ouest val loire vallee rhone rhone france france francefemme vin grand cru village vignoble vineyards oiv normes classification miraval miraval france concours club club regine coz lecoz ",
" femme femmes femme femmes vin vin vins vins monde monde concours concours international international women women woman woman wine wine wines wines world world competition competition monaco monaco pamela anderson rss reserve 1er alsace lorraine aquitaine bourgogne beaujolais champagne charentes franche comte jura languedoc roussillon provence corse savoie sud ouest val loire vallee rhone rhone france france francefemme vin grand cru village vignoble vineyards oiv normes classification miraval miraval france concours club club regine coz lecoz ",
" women and wines the world™ 2011-femmes vins monde™2011 ",
" inscription concours 2011 subcription competition ",
" inscription concours 2011 subcription competition ",
" liens  ",
" liens links femme femmes femme femmes vin vin vins vins monde monde concours concours international international women women woman woman wine wine wines wines world world competition competition monaco monaco pamela anderson rss reserve 1er alsace lorraine aquitaine bourgogne beaujolais champagne charentes franche comte jura languedoc roussillon provence corse savoie sud ouest val loire vallee rhone rhone france france francefemme vin grand cru village vignoble vineyards oiv normes classification miraval miraval france concours club club regine coz lecoz ",
" liens links ",
" formulaire contact  ",
" partenaires sponsors partenaire sponsor femme femmes femme femmes vin vin vins vins monde monde concours concours international international women women woman woman wine wine wines wines world world competition competition monaco monaco pamela anderson rss reserve 1er grand cru village vignoble vineyards alsace lorraine aquitaine bourgogne beaujolais champagne charentes franche comte jura languedoc roussillon provence corse savoie sud ouest val loire vallee rhone rhone ",
" media  ",
" femme femmes femme femmes presse presse press press vin vin vins vins monde monde concours concours international international women women woman woman wine wine wines wines world world competition competition monaco monaco pamela anderson rss reserve 1er grand cru village vignoble vineyards alsace lorraine aquitaine bourgogne beaujolais champagne charentes franche comte jura languedoc roussillon provence corse savoie sud ouest val loire vallee rhone rhone ",
" revue presse press release - ",
" galasom  ",
" titre groupe  ",
" recompenses medailles macarons awards ",
" packaging concours international ",
" packaging concours international ");
urlsArray = new Array("../topic/index.html",
"../femmesetvinsdumo/index.html",
"../groupederubrique/index.html",
"../notreaction/index.html",
"../mapage1/index.html",
"../mapage2/index.html",
"../lesdegustatrices/index.html",
"../groupederubriqu4/index.html",
"../presentation/index.html",
"../mapage/index.html",
"../groupederubriqu2/index.html",
"../topic1/index.html",
"../palmarespackagin/index.html",
"../groupederubriqu6/index.html",
"../inscrireunvin/index.html",
"../inscrireunvinauc/index.html",
"../groupederubriqu5/index.html",
"../topic4/index.html",
"../liensdefemmes/index.html",
"../topic5/index.html",
"../nospartenaires20/index.html",
"../groupederubriqu3/index.html",
"../espacepresse/index.html",
"../mapage3/index.html",
"../albumphotogalaso/index.html",
"../groupederubriqu1/index.html",
"../lesrecompenses/index.html",
"../vosbonus/index.html",
"../concourspackagin/index.html");
titlesArray = new Array("Women and Wines of the World™ - Femmes et Vins du Monde™",
"ACTUALITES / AGENDA",
"A PROPOS DE NOUS",
"NOS VALEURS",
"Femmes et Vins du Monde Concours International((r))-Women and Wines of the World International Competition((r))- Monaco - Regine LE COZ Présidente fon...",
"Femmes et Vins du Monde Concours International((r))-Women and Wines of the World International Competition((r))- Monaco -Dégustatrices internationales...",
"Femmes et Vins du Monde Concours International((r))-Women and Wines of the World International Competition((r))- Monaco -Dégustatrices internationales...",
"PRESENTATION DU CONCOURS",
"LE CONCOURS INTERNATIONAL",
"QUI & QUEL VIN PEUT CONCOURIR ?",
"PALMARES 2010",
"PALMARES VINS 2010",
"PALMARES PACKAGING 2010",
"INCRIRE UN VIN",
"INSCRIRE UN VIN",
"CLASSIFICATION DES ECHANTILLONS DE VINS",
"LIENS",
"Liens favoris",
"Women and Wines of the World™ - Femmes et Vins du Monde™",
"Formulaire de contact",
"PARTENAIRES 2011",
"MEDIA",
"DOCUMENTS MEDIA",
"REVUE MEDIA",
"galasom",
"Titre du groupe",
"VOS MEDAILLES",
"LE GRAND CONCOURS PACKAGING",
"VOS BONUS");
descArray = new Array("Women and Wines of the World™ -Femmes et Vins du Monde™ Femmes et Vins du Monde Concours International™ - Women and Wines of the World International C...",
"Women and Wines of the World™ -Femmes et Vins du Monde™ - Femmes et Vins du Monde Concours International™ - Women and Wines of the World International...",
"",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™ - Monaco -Dégustatrices internationales- Int...",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™ - Monaco -Dégustatrices internationales- Int...",
"",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™",
"quel vin peut concourir which wine can contribute COMPETITEURS FEMMES OU HOMMESadmis à participer sont : les vignerons récoltants, les coopératives vi...",
"",
"1er concours français de dégustation de vins  internationaux dégustés exclusivement par les femmes. First french international competition  world wine...",
"1er concours français de dégustation de vins  internationaux dégustés exclusivement par les femmes. First french international competition  world wine...",
"Women and Wines of the World™ -Femmes et Vins du Monde™",
"inscription concours 2010 subcription competition 2010 Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Co...",
"inscription concours 2010 subcription competition 2010 Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Co...",
"",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™",
"",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™",
"REVUE DE PRESSE - PRESS RELEASE - Revue de presse - Press release",
"",
"",
"Femmes et Vins du Monde Concours International™ - Women and Wines of the World International Competition™",
"Grand concours de packaging réservé aux vins primés 2010 Great packaging comeptition reserved to 2010 winning wines bouteille etiquette emballage bott...",
"Grand concours de packaging réservé aux vins primés 2010 Great packaging comeptition reserved to 2010 winning wines bouteille etiquette emballage bott...");
sublinksArray = new Array(29);
var linksCount = 29;


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>");
}

