// ----------------------------------------------------------------------------
// Lauyan Software Javascript Search Engine 2.0
//
// This file is the JavaScript search engine for a website created by TOWeb
//
// Copyright (C) LAUYAN SOFTWARE 2006
// web: http://www.lauyan.com
// ----------------------------------------------------------------------------

STR_SEARCH_QUERY_MSG = "Résultats de la recherche pour";
STR_NO_RESULT = "Aucun résultat trouvé";
LBL_QUERY_RESULT = "résultat(s) trouvé(s) pour :&nbsp";
LBL_ITREFERENCE  = "Référence";
LBL_ITPRICE = 'Prix';
LBL_PRICEERROR = "Erreur de prix";
MIN_WORD_LEN = 2;
DISPLAY_SRCH_INFO = 0;
USE_UTF8 = 0;
REMOVE_ACCENTS = 1;
BOLD_LINKS = 1;
ONLINE_WEBSITE = 1;
ALLWORDSONLY = 0;
SHOWREFERENCES = 0;
BORDERCOLOR = "#49658A";
SORTCOMPARE = 2;
itNamesArray = new Array("5-001 developpement noir blanc couleurs negatif argentique 135 24x36 120 220 moyen format suivi tirages ",
"5-002 developpement seul noir blanc couleurs negatif argentique 135 24x36 120 moyen format  ",
"5-003 developpement film avec planche contact index 20x30  ",
"5-004 tirages 1er jet couleurs sur papier photo argentique mat aspect satin brillant ",
"5-005 tirages 1er jet couleurs sur papier photo argentique mat brillant ",
"5-006 forfait scan doit etre realise simultanement developpement d'un film negatif 135 120 couleurs ",
"5-007 developpement film inversible diapo 135 120 220 chimie e6 ",
"5-008 agrandissement d'apres negatif 135 24x36 couleurs sur papier photo argentique rc ",
"5-009 agrandissement d'apres negatif diapo 120 135 24x36 couleurs  ",
"5-010 copie photo sur papier brillant mat ",
"5-011 base moyenne definition tirage jusqu'a 13x19 env 1200 1800 pixels decompresse jpeg penser rajouter prix gravure sur dvd cle usb voir tarif ci-dessous ",
"5-012 base bonne definition tirage jusqu'a env 2200 3300 pixels decompresse jpeg ",
"5-013 haute definition tirage jusqu'a 110 175 grand decompresse jpeg bmp tiff penser rajouter prix gravure sur dvd cle usb voir tarif ci-dessous ",
"5-014 gravure fichiers images sur dvd cle usb ",
"5-015 tirages grand format sur papier fine art aquarelle velin canson baryte canvas toile peintre l'impression fineart est constituee veritables papiers beaux-arts avec choix grammages textures ainsi differents specialement concu jet d'encre haut-de-gamme photographies artistiques aussi reproduction d'œuvres d'art aquarelles gravures croquis conformement aux standards qualite conservation galeries musees ",
"5-016 reproduction document photo dessins tableaux sur film negatif diapo fichier numerique ",
"5-017 duplicata diapo 24x36 sur film duplicating inversible ",
"5-018 contre-collage sur mousse forex 3 ",
"5-019 procede canadien contre-collage sur bois avec tranches biseautees plastification photo gravure dessin  ",
"5-020 contrecollage sur plexi dibond panneau composite aluminium 3 ",
"6-001 tirages grand format sur papier photo brillant satin avec choix grammages 240g 290g specialement concu l'impression jet d'encre qualite comparable tirage argentique  ",
"6-002 tirages grand format sur papier fine art aquarelle velin canson baryte canvas toile peintre l'impression fineart est constituee veritables papiers beaux-arts avec choix grammages textures ainsi differents specialement concu jet d'encre haut-de-gamme photographies artistiques aussi reproduction d'œuvres d'art aquarelles gravures croquis conformement aux standards qualite conservation galeries musees ",
"6-003 agrandissement d'apres negatif diapo 120 135 24x36 couleurs  ",
"6-004 copie photo sur papier brillant mat ",
"6-005 contre-collage sur mousse forex 3 ",
"6-006 procede canadien contre-collage sur bois avec tranches biseautees plastification photo gravure dessin  ",
"6-007 contrecollage sur plexi dibond panneau composite aluminium 3 ",
"prepai40 prepai40 prepai80");
itUrlsArray = new Array("../travauxphotoenli/page1.html",
"../travauxphotoenli/page2.html",
"../travauxphotoenli/page3.html",
"../travauxphotoenli/page4.html",
"../travauxphotoenli/page5.html",
"../travauxphotoenli/page6.html",
"../travauxphotoenli/page7.html",
"../travauxphotoenli/page8.html",
"../travauxphotoenli/page9.html",
"../travauxphotoenli/page10.html",
"../travauxphotoenli/page11.html",
"../travauxphotoenli/page12.html",
"../travauxphotoenli/page13.html",
"../travauxphotoenli/page14.html",
"../travauxphotoenli/page15.html",
"../travauxphotoenli/page16.html",
"../travauxphotoenli/page17.html",
"../travauxphotoenli/page18.html",
"../travauxphotoenli/page19.html",
"../travauxphotoenli/page20.html",
"../grandsformats/page1.html",
"../grandsformats/page2.html",
"../grandsformats/page3.html",
"../grandsformats/page4.html",
"../grandsformats/page5.html",
"../grandsformats/page6.html",
"../grandsformats/page7.html",
"../tiragesnumerique/index.html");
itTitlesArray = new Array("Développement (suivi de tirages) d'un négatif 135  ou 120 ou 220  - délais 24 hrs -",
"Développement seul  Noir et Blanc  ou Couleurs - 120 et 135 - Délais 24 à 48 hrs",
"Développement film avec planche contact (index 20x30)- Délais 24 à 48 hrs",
"Tirages (1er jet) couleurs et N/B - 135 - délais 24 hrs -",
"Tirages (1er jet) couleurs et N/B - Négatif 120 - 220 - délais 24 hrs -",
"Forfait scan Négatif  Base 4 ou Base 16 - Délais 24 à 48 hrs",
"Développement film inversible (Diapo) Délais 24 à 48 hrs",
"Agrandissement d'après négatif 135 (24x36) N/B ou Couleurs - Délais de 3 à 5 jrs",
"Agrandissement d'après négatif  ou diapo 120 ou 135 (24x36) N/B ou Couleurs  - Délais de 3 à 5 jrs",
"Copie de photo sur papier Brillant ou Mat - Délais de 3 à 5 jrs",
"SCAN - NUMERISATION (à l'unité) DE NEGATIF OU DIAPO 24X36 (135) en qualité BASE4 - Délais de 3 à 5 jrs",
"SCAN - NUMERISATION (à l'unité) DE NEGATIF OU DIAPO 24X36 (135) en qualité BASE 16 - Délais de 3 à 5 jrs",
"SCAN - NUMERISATION (à l'unité)  en qualité haute définition - Film 135 - 120 - 4x5 inchs - Documents opaques - Délais de 3 à 5 jrs",
"Gravure de fichiers images sur CD - DVD - Clé USB - Délais de 3 à 5 jrs",
"Tirages grand format sur papier Fine Art - Baryté - Canvas - Délais de 3 à 5 jours",
"Reproduction de document photo sur film négatif ou diapo ou fichier numérique - Délais de 3 à 5 jours -",
"Duplicata de diapo 24x36 - Délais de 2 à 3 jours -",
"Finition photo:  Contre-collage sur mousse 5 et 10 mm ou forex 3 mm - Délais de 3 à 5 jrs",
"Finition photo: Laminage sur bois 10 mm  - Délais de 3 à 5 jrs",
"Finition photo: Contrecollage sur Plexi 5 mm ou sur dibond (aluminium) 3 mm - Délais de 3 à 5 jours",
"Tirages grand format sur papier photo Brillant et Satin - Délais de 3 à 5 jours",
"Tirages grand format sur papier Fine Art - Baryté - Canvas - Délais de 3 à 5 jours",
"Agrandissement d'après négatif  ou diapo 120 ou 135 (24x36) N/B ou Couleurs  - Délais de 3 à 5 jrs",
"Copie de photo sur papier Brillant ou Mat - Délais de 3 à 5 jrs",
"Finition photo:  Contre-collage sur mousse 5 et 10 mm ou forex 3 mm - Délais de 3 à 5 jrs",
"Finition photo: Laminage sur bois 10 mm  - Délais de 3 à 5 jrs",
"Finition photo: Contrecollage sur Plexi 5 mm ou sur dibond (aluminium) 3 mm - Délais de 3 à 5 jours",
"Acheter une carte de prépaiement pour économiser sur le prix de vos tirages");
itDescArray = new Array("Développement  Noir et Blanc  ou Couleurs de négatif argentique 135 (24x36) et 120/220 (moyen format) suivi de tirages",
"Développement seul  Noir et Blanc  ou Couleurs de négatif argentique 135 (24x36) et 120 (moyen format)",
"Développement film avec planche contact (index 20x30 cm)",
"Tirages (1er jet) couleurs et N/B sur papier photo couleurs argentique Mat (aspect satin) ou Brillant",
"Tirages (1er jet) couleurs et N/B sur papier photo couleurs argentique Mat ou Brillant",
"Le forfait scan doit être réalisé simultanément au développement d'un film négatif 135 ou 120, N/B ou couleurs",
"Développement film inversible (Diapo) 135 et 120/220 en chimie E6",
"Agrandissement d'après négatif 135 (24x36) N/B ou Couleurs sur papier photo argentique RC couleurs",
"Agrandissement d'après négatif  ou diapo 120 ou 135 (24x36) N/B ou Couleurs",
"Copie de photo sur papier Brillant ou Mat",
"Base 4 : Moyenne définition pour tirage jusqu'à 13x19 cm env. 1200 x 1800 pixels (6.5 Mo décompressé) en jpeg  Penser à rajouter le prix de la gravure sur CD ou DVD ou Clé USB (voir tarif ci-dessous)",
"Base 16 : Bonne définition pour tirage jusqu'à 30 x 45 cm env. 2200 x 3300 pixels (21 Mo décompressé) en jpeg",
"Haute définition pour tirage jusqu'à 110 x 175 cm et + grand  (de 25 à 40 Mo décompressé)  en jpeg  ou BMP ou Tiff Penser à rajouter le prix de la gravure sur CD ou DVD ou Clé USB (voir tarif ci-dessous)",
"Gravure de fichiers images sur CD - DVD - Clé USB",
"Tirages grand format sur papier Fine Art (aquarelle - Velin - Canson) - Baryté - Canvas (toile de peintre) L'impression sur FineArt est constituée de véritables papiers Beaux-Arts, avec un choix de grammages et de textures, ainsi que de différents Canvas. Spécialement conçu pour l'impression jet d'encre haut-de-gamme, pour l'impression de photographies artistiques , mais aussi pour la reproduction...",
"Reproduction de document photo, dessins, tableaux... sur film négatif ou diapo ou fichier numérique",
"Duplicata de diapo 24x36 sur film duplicating inversible",
"Contre-collage sur mousse 5 et 10 mm ou forex 3 mm",
"Procédé canadien de contre-collage sur bois avec tranches biseautées et plastification de la photo ou de la gravure, dessin...",
"Contrecollage sur Plexi 5 mm ou sur dibond ( panneau composite aluminium) 3 mm",
"Tirages grand format sur papier photo Brillant et Satin avec un choix de grammages du 240g au 290g. Spécialement conçu pour l'impression jet d'encre de qualité comparable au tirage argentique.",
"Tirages grand format sur papier Fine Art (aquarelle - Velin - Canson) - Baryté - Canvas (toile de peintre) L'impression sur FineArt est constituée de véritables papiers Beaux-Arts, avec un choix de grammages et de textures, ainsi que de différents Canvas. Spécialement conçu pour l'impression jet d'encre haut-de-gamme, pour l'impression de photographies artistiques , mais aussi pour la reproduction...",
"Agrandissement d'après négatif  ou diapo 120 ou 135 (24x36) N/B ou Couleurs",
"Copie de photo sur papier Brillant ou Mat",
"Contre-collage sur mousse 5 et 10 mm ou forex 3 mm",
"Procédé canadien de contre-collage sur bois avec tranches biseautées et plastification de la photo ou de la gravure, dessin...",
"Contrecollage sur Plexi 5 mm ou sur dibond ( panneau composite aluminium) 3 mm",
"");
itImgArray = new Array("../travauxphotoenli/bv000013.thumb.jpg",
"../travauxphotoenli/bv000014.thumb.jpg",
"../travauxphotoenli/bv000001.thumb.jpg",
"../travauxphotoenli/bv000012.thumb.jpg",
"../travauxphotoenli/bv000020.thumb.jpg",
"../travauxphotoenli/bv000002.thumb.jpg",
"../travauxphotoenli/bv000003.thumb.jpg",
"../travauxphotoenli/bv000004.thumb.jpg",
"../travauxphotoenli/bv000005.thumb.jpg",
"../travauxphotoenli/bv000006.thumb.jpg",
"../travauxphotoenli/bv000007.thumb.jpg",
"../travauxphotoenli/bv000008.thumb.jpg",
"../travauxphotoenli/bv000009.thumb.jpg",
"../travauxphotoenli/bv000015.thumb.jpg",
"../travauxphotoenli/bv000022.thumb.jpg",
"../travauxphotoenli/bv000016.thumb.jpg",
"../travauxphotoenli/bv000017.thumb.jpg",
"../travauxphotoenli/bv000018.thumb.jpg",
"../travauxphotoenli/bv000019.thumb.jpg",
"../travauxphotoenli/bv000021.thumb.jpg",
"../grandsformats/bv000001.thumb.jpg",
"../grandsformats/bv000022.thumb.jpg",
"../grandsformats/bv000005.thumb.jpg",
"../grandsformats/bv000006.thumb.jpg",
"../grandsformats/bv000018.thumb.jpg",
"../grandsformats/bv000019.thumb.jpg",
"../grandsformats/bv000021.thumb.jpg",
"../tiragesnumerique/bv000001.thumb.jpg");
itRefArray = new Array("5-001",
"5-002",
"5-003",
"5-004",
"5-005",
"5-006",
"5-007",
"5-008",
"5-009",
"5-010",
"5-011",
"5-012",
"5-013",
"5-014",
"5-015",
"5-016",
"5-017",
"5-018",
"5-019",
"5-020",
"6-001",
"6-002",
"6-003",
"6-004",
"6-005",
"6-006",
"6-007",
"prepai40 prepai40 prepai80");
itPricesArray = new Array(3.90,
5.20,
8.70,
0.35,
0.80,
5.00,
8.90,
0.85,
6.00,
1.50,
1.50,
2.50,
3.00,
5.00,
23.00,
6.00,
1.25,
12.80,
9.50,
30.00,
22.00,
22.00,
6.00,
1.00,
12.80,
9.50,
34.00,
40.00);
var itemsCount = 28;
var catalogdirs = new Array("/travauxphotoenli/",
"/grandsformats/",
"/tiragesnumerique/");
var catalognames = new Array("Travaux photo argentique",
"Grands Formats",
"Tirages photo en ligne");

			
function SubmitSearch(n)
{
	var p = document.getElementsByName("jse_query");
	if( p < 0) return false;
	if( p && p[n] && p[n].value != "" ) 
	{
	  if( (p[n].value).replace(/^\s+|\s+$/g, '') != "" ) 
	  {
		var idx = 0;
		p = document.getElementsByName("minprice");
		if( p && p[idx] )
		{
			if( p[idx].value != "" && isNaN(p[idx].value) )
			{
				if( LBL_PRICEERROR != "" )
					alert( LBL_PRICEERROR );
				return false;
			}
		}
		p = document.getElementsByName("maxprice");
		if( p && p[idx] )
		{
			if( p[idx].value != "" && isNaN(p[idx].value) )
			{
				if( LBL_PRICEERROR != "" )
					alert( LBL_PRICEERROR );
				return false;
			}
		}
		p = document.getElementsByName("jse_form");
		if( p && p[n] )
			p[n].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 SortCompare2(a, b)
{
	if( SORTCOMPARE == 1 ) 
	{
	    if (a[3] < b[3]) return 1;
	    else if (a[3] > b[3]) return -1;
	    else return 0;
	}
	else if( SORTCOMPARE == 0 )
	{
	    if (a[3] > b[3]) return 1;
	    else if (a[3] < b[3]) return -1;
	    else return 0;
	}
	return -1;
}

function jseSearch2( 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();
  var sortp = getParam("sort");
  if( sortp == "0" ) {
	SORTCOMPARE = 0;
  } else if( sortp == "1" ) {
	SORTCOMPARE = 1;
  } else if( sortp == "2" )
	SORTCOMPARE = 2;
  var catfilterp = getParam("cat");
  var minPrice = getParam("minprice");
  var maxPrice = getParam("maxprice");
 
  // display the search form
  var lnktarget = "";
	query = formatChars(query);
  if( query.length == 0 ) return;
  
  var found=0, t=0, k=0, score=0, i=0;
  var keyword = "", tmp = "";
  var searchWords = new Array();

  // split search query by spaces
  searchWords = query.split(" ");
  // init result table information
  res_table = new Array(itemsCount);
  for( t=0; t<itemsCount; 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] = 0;  // price
  }

  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<itemsCount; q++ )
	  {
		// catalog filter verification
	    if( catfilterp != "" && catfilterp != "allcat" && itUrlsArray[q].indexOf(catfilterp) == -1 ) 
			continue;
		// min and max price filter
	    if( minPrice > 0 && itPricesArray[q] < minPrice )
			continue;
	    if( maxPrice > 0 && itPricesArray[q] > maxPrice )
			continue;
		// search for keywords (an exact word doubles the score)
		score = 0;
		tmp = formatChars(itDescArray[q]);
	    if( tmp.indexOf(keyword) != -1 ) score++;
	    if( tmp.indexOf(' '+keyword+' ') != -1 ) score+=2;
		  tmp = formatChars(itTitlesArray[q]);
	  	if( tmp.indexOf(keyword) != -1 ) score++;
		  if( tmp.indexOf(' '+keyword+' ') != -1 ) score+=2;
		  tmp = formatChars(itNamesArray[q]);
	    if( tmp.indexOf(keyword) != -1 ) score++;
	    if( tmp.indexOf(' '+keyword+' ') != -1 ) score+=2;
			
	    if( score > 0 ) // && itPricesArray[q] > 0 )  // add this test in order not to display 0.00 prices 
	    {
		  if( res_table[q][1] <= 0 ) 
			found++;	// increment only if not already found with a previous keyword
	      res_table[q][0] = q;
	      res_table[q][1] = 1; // itPricesArray[q];
	      res_table[q][2]++;
	      res_table[q][3] = itPricesArray[q];
	    }
	  }
	}
  }
  if( found == 0 ) {
    document.write("<br><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++;
	}
	if( internal == null || internal != 1 ) {
		document.writeln( "<span class='wg-paragraph'>" + found + " " + LBL_QUERY_RESULT + "<strong>" +query+"</strong></span>" );
	}
	// sort by words found and scores
	if( SORTCOMPARE >= 0 && SORTCOMPARE <= 1 )
		res_table.sort(SortCompare2);	
    // display the results
	document.writeln("<table border='1' class='wg-paragraph' bordercolor='"+BORDERCOLOR+"' style='border-collapse:collapse;margin:4px;' cellspacing='2' cellpadding='2' >");

	for( var q=0; q<itemsCount; 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
		document.writeln("<tr valign='top'><td>");
		if( itImgArray[t] != "" ) {
			document.writeln("<a href=\"" + itUrlsArray[t] + lnktarget + "\">" + "<img src='"+itImgArray[t]+"' border='0' width=\"48\" height=\"48\" /></a>" );
		}
		document.writeln("</td><td>");
		if( 1 ) { //BOLD_LINKS ) {
          document.writeln("<b><a href=\"" + itUrlsArray[t] + lnktarget + "\">" + itTitlesArray[t] + "</a></b><br>" );
        } else
          document.writeln("<a href=\"" + itUrlsArray[t] + lnktarget + "\">" + itTitlesArray[t] + "</a><br>" );
		if( SHOWREFERENCES && itRefArray[t] != "" ) {
			var ref = itRefArray[t].split(' ');
			if( ref && ref[0] != "" ) 
				document.writeln( LBL_ITREFERENCE+" : "+ref[0]+"<br>" );
		}
        if( itDescArray[t].length > 2 )
			document.writeln( itDescArray[t]);
		document.writeln("</td><td nowrap>");
		if( itPricesArray[t] != ""  && itPricesArray[t] > 0 )
			document.writeln( LBL_ITPRICE+"<br><p class='wg-price'>"+AddMonetarySymbol(moneyFormat(itPricesArray[t]))+"</p>" );
		else
			document.writeln( "&nbsp;" );
		document.writeln("</td></tr>");
      }
	}
	document.writeln("</table>");			
  }
  document.writeln("<br>");
}

