function confirmLink(theLink, confirmMsg, theQuestion)
{
    // Confirmation not required... fine !
    if (confirmMsg == '') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + theQuestion);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
}

function WriteList(wtStr,wtPrefix,id,CSSclass)
{
 wtParts = wtStr.split("//");
 if ( wtParts.length == 1 ){
   res = wtStr;
 } else {
  wtItems = wtParts[0].split(" ; ");
  wtURL = wtParts[1].split(":");
  res = '';
  for (wtI = 0; wtI<wtItems.length; wtI++) {
    if ( wtI > 0 ) { res = res + ' ; '; }
    //res = res + '<A href="/fr/guide/paris_' + wtURL[wtI] + '_' + wtPrefix + '____&lnk=BR' + id + '" class=' + CSSclass + '>' + wtItems[wtI] + '</A>';
    res = res + '<A href="/fr/guide/Paris_Restaurant_' + wtPrefix  + wtURL[wtI] + '.html " class=' + CSSclass + '>' + wtItems[wtI] + '</A>';
  }
 }
 return res;
}

function WriteThemes(wtStr,wtPrefix,id)
{
 wtParts = wtStr.split("//");
 if ( wtParts.length == 1 ){
   res = wtStr;
 } else {
  wtThemes = wtParts[0].split(" ; ");
  wtURL = wtParts[1].split(":");
  res = '';
  for (wtI = 0; wtI<wtThemes.length; wtI++) {
    if ( wtI > 0 ) { res = res + ' ; '; }
    //res = res + '<A href="/search.php?pg=lstQ' + wtPrefix + wtURL[wtI] + '&lnk=BR' + id + '" class=BRthemeLnk>' + wtThemes[wtI] + '</A>';
    res = res + '<A href="/fr/guide/Paris_Restaurant_' + wtPrefix + wtURL[wtI] + '.html" class=BRthemLnk>' + wtThemes[wtI] + '</A>';
  }
 }
  return res;
}

function WriteDishes(wtStr,wtPrefix,id)
{
 wtParts = wtStr.split("//");
 if ( wtParts.length == 1 ){
   res = wtStr;
 } else {
  wtThemes = wtParts[0].split(" ; ");
  wtURL = wtParts[1].split(":");
  res = '';
  for (wtI = 0; wtI<wtThemes.length; wtI++) {
    if ( wtI > 0 ) { res = res + ' ; '; }
    res = res + '<A href="/fr/lexique-culinaire/a0.html&lnk=BR' + id + '#' + wtURL[wtI] + '" class=BRthemeLnk>' + wtThemes[wtI] + '</A>';
  }
 }
  return res;
}

function OpenMapMaporama(town,zip,adr)
{
  url='http://www.maporama.com/share/Map.asp?PDT=maposearch&form=FindAdr&_XgoGCAdrCommand=run';
  url = url + '&_XgoGCTownName=' + town;
  url = url + '&COUNTRYCODE=FR';
  url = url + '&Zip=' + zip;
  url = url + '&_XgoGCAddress=' + adr;
  url = url + '&quality=0';
  window.open(url,'','width=750,height=500,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0');
}

function OpenMap1Bis(town,zip,adr)
{
  url='HTTP://www.1bis.com/1bis/geo/geocode.asp?';
  url = url + 'countryId=33';
  url = url + '&city=' + zip;
  url = url + '&street=' + adr;
  window.open(url,'','location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0');
}

function OpenMap(town,zip,adr)
{
  OpenMap1Bis(town,zip,adr);
}

function OpenComment(id)
{
  url='/etab_comment.php?Id=' + id;
  window.open(url,'','width=520,height=430,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,left=20,top=20');
}

function OpenPersonalNote(id)
{
  url='/etab_comment.php?id=' + id + '&personalNote=1';
  window.open(url,'','width=520,height=430,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,left=20,top=20');
}

function EditPersonalNote(pnId)
{
  url='/etab_comment.php?pnId=' + pnId + '&personalNote=1';
  window.open(url,'','width=520,height=430,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,left=20,top=20');
}

function OpenRecommend(id)
{
  url='/etab_comment.php?id=' + id + '&recommend=1';
  window.open(url,'','width=520,height=520,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,left=20,top=20');
}

function OpenResa(id)
{
  url='/etab_resa.php?Id=' + id;
  window.open(url,'','width=520,height=580,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0');
}

function DisplayPrice(brunch,dejAutre,dejM,dejMC,dinerAutre,dinerM,dinerMC,carte,kids,dejForm,dinerForm,minMaxFF)
{
  devise=' &euro;';
  if (brunch || dejAutre || dejM || dejMC || dinerAutre || dinerM || dinerMC || carte) {
    document.writeln('<TABLE cellSpacing=0 cellPadding=2 border=0><TBODY><TR>');
    document.writeln('<TD class=BRprixTitle vAlign=top align=right>Prix</TD>');
    document.writeln('<TD width=2><IMG height=1 src="/images/spacer.gif" width=2></TD>');
    document.writeln('<TD width=136 bgColor=#ffdfaa>');
    document.writeln('<TABLE class=BRprix cellSpacing=0 cellPadding=0 width=136 border=0><TBODY>');
    prev = 0;

    document.write('<TR><TD class=BRprix align=center bgcolor="#E0E0E0" colspan=2>En Francs :&nbsp;&nbsp;' + minMaxFF + ' FF');
    document.writeln('</TD></TR>');
    document.writeln('<TR><TD bgColor=#404040 colSpan=2><IMG height=1 src="/images/spacer.gif" width=1></TD></TR>');

    if (dejAutre || dejM || dejMC || dejForm) {
      document.write('<TR><TD class=BRprix>Dej:</TD><TD class=BRprix>');
	nl = 0;
      if (dejForm) { document.write('formule ' + dejForm + ( dejForm.match(/euro/) ? '' : devise )); nl=1; }

      if (dejM) { if (nl) { document.writeln('<BR>'); } document.write('menu ' + dejM + ( dejM.match(/euro/) ? '' : devise ));  nl=1; }
      if (dejMC) { if (nl) { document.writeln('<BR>'); } document.write('menu-carte ' + dejMC + ( dejMC.match(/euro/) ? '' : devise )); nl=1; }

      if (dejAutre) { if (nl) { document.writeln('<BR>'); } document.write(dejAutre); nl=1; }
      document.writeln('</TD></TR>');
      prev = 1;
    }
    if (dinerAutre || dinerM || dinerMC || dinerForm) {
      if (prev==1) {
        document.writeln('<TR><TD bgColor=#2a1f00 colSpan=2><IMG height=1 src="/images/spacer.gif" width=1></TD></TR>');
      }
      document.writeln('<TR><TD class=BRprix>Diner:</TD><TD class=BRprix>');
	nl = 0;
      if (dinerForm) { document.write('formule ' + dinerForm + ( dinerForm.match(/euro/) ? '' : devise )); nl=1; }
      if (dinerM) { if (nl) { document.writeln('<BR>'); } document.write('menu ' + dinerM + ( dinerM.match(/euro/) ? '' : devise )); nl=1; }
      if (dinerMC) { if (nl) { document.writeln('<BR>'); } document.write('menu-carte ' + dinerMC + ( dinerMC.match(/euro/) ? '' : devise )); nl=1; }
      if (dinerAutre) { if (nl) { document.writeln('<BR>'); } document.write(dinerAutre); nl=1; }
      document.writeln('</TD></TR>');
      prev = 1;
    }
    if (brunch) {
      if (prev==1) {
        document.writeln('<TR><TD bgColor=#2a1f00 colSpan=2><IMG height=1 src="/images/spacer.gif" width=1></TD></TR>');
      }
      document.writeln('<TR><TD class=BRprix>Brunch:</TD><TD class=BRprix>' + brunch + ( brunch.match(/euro/) ? '' : devise )+'</TD></TR>');
      prev = 1;
    }
    if (carte) {
      if (prev==1) {
        document.writeln('<TR><TD bgColor=#2a1f00 colSpan=2><IMG height=1 src="/images/spacer.gif" width=1></TD></TR>');
      }
      document.writeln('<TR><TD class=BRprix>Carte:</TD><TD class=BRprix>' + carte + ( carte.match(/euro/) ? '' : devise )+'</TD></TR>');
      prev = 1;
    }
    document.writeln('</TBODY></TABLE>');
    document.writeln('</TD></TR></TBODY></TABLE>');
  }
}

function DisplayMenuPromo(localId,destId,disc)
{
  url = 'http://www.PagesRestos.com/promo.php?etabId=' + localId + '&lnk=promoresto&destId=' + destId;
    document.writeln('<IMG height=12 src="/images/spacer.gif" width=8><br>');
    document.writeln('<table width="148" border="2" cellspacing="1" cellpadding="1" bordercolor="#ff7f00"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="0">');
    document.writeln('  <tr><td align=center bgcolor="#FFFF00" class=BRarea>');
    document.writeln('<a class=BRareaLnk href="'+ url +'">');
    document.writeln('Avec PromoResto<br>R&eacute;servez &agrave; -' + disc + '%');
    document.writeln('</a>');
    document.writeln('<br><font size="1">(offre soumise &agrave; condition)</font>');
    document.writeln('</td></tr></table></td></tr></table>');
}

function DisplayPromoText(localId,text)
{
/*
    document.writeln('<IMG height=12 src="/images/spacer.gif" width=8><br>');
    document.writeln('<table width="200" border="2" cellspacing="1" cellpadding="1" bordercolor="#ff7f00"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="0">');
    document.writeln('  <tr><td align=center bgcolor="#FFFF00" class=BRarea>Promotion découverte');
    document.writeln('<div><a class=BRareaLnk href="'+ url +'">');
    document.writeln(text);
    document.writeln('</a></div>');
    document.writeln('</td></tr></table></td></tr></table>');
*/
    document.writeln('<div class=promo_fiche>');
//    document.writeln('<div class=header>Promotion découverte</div>');
    document.writeln('<div class=content>');
    document.writeln(text);
    document.writeln('</div>');
    document.writeln('</div>');
}

function DisplayCmt(str,no,notePerso)
{
  if (str=='') { return 1; }
  document.writeln("<TABLE cellSpacing=0 cellPadding=0 width=780 border=0><tr><td align=center>");
  if (no == 0) {
    document.writeln('<TABLE cellSpacing=0 cellPadding=0 width=700 border=0 >');
    document.writeln('<tr><td><IMG height=12 src="/images/spacer.gif" width=8></td></tr>');
    document.writeln('<tr><td background="/images/sep-cmt.gif"><IMG height=2 src="/images/spacer.gif" width=8></td></tr>');
    document.writeln('<tr><td><IMG height=6 src="/images/spacer.gif" width=8></td></tr>');
    document.writeln('</table>');
  } else {
    document.writeln('<IMG height=8 src="/images/spacer.gif" width=8><br>');
  }
  a = str.split("|");
  document.writeln("<A name='cmt-" + a[0] + "'>");
  document.writeln("<!-- deb fiche -->");
  document.writeln("<TABLE cellSpacing=0 cellPadding=1 width='700' border=0 xbgcolor=#F0F0F0>");
  document.writeln("<TR><TD>");
  document.writeln('<img src="/images/msg.gif" width=10 height=12 border=0 align=absmiddle>&nbsp;');
  document.write("<font class=CmtAvis>");
  if (notePerso<2){ document.write("Avis: " + a[2]); }
  else { document.write("Recommandation"); }
  document.writeln("</font></td>");
  document.writeln("</td><td align=right>");
 if (notePerso==1){
  document.writeln("<font class=CmtPar>Note personnelle de ");
  if (a[3]) {
    if (a[6]>1) {
      document.write("<a href='/search.php?critcmt=" + a[0] + "' class=CmtCrit ' title='" + a[6] + " commentaires'>");
      document.writeln( a[3] + "</a></font>");
    } else {
      document.writeln("<font class=CmtCrit><b>" + a[3] + "</b></font>");
    }
  } else {
    document.writeln("<i><b>anonyme</b></i>");
  }
  document.writeln("</font> &#149; ");
  document.writeln("<font class=CmtDate>" + a[1] + "</font>");
  document.writeln(" &#149; ");
  url = "/delete_rec.php?cls=np&id=" + a[0] ;
  click= "return confirmLink(this,'Effacer la note.','Voulez-vous vraiment effacer cette note ?')";
  document.writeln('<A href="' + url + '" title="Supprimer la note" onclick="' + click + '"><img border=0 src="/i/del17x16.gif"></A>' );
  url = "javascript:EditPersonalNote('" + a[0] +"')";
  document.writeln('<A href="' + url + '" title="Editer la note"><img border=0 src="/images/edit16x13.gif"></A>' );

 } else if ((notePerso==2)||(notePerso==3)){
  if (notePerso==2){ document.writeln("<font class=CmtPar>Recommandé par ");
  } else {  document.writeln("<font class=CmtPar>Recommandé à "); }
  name = (a[3]!='') ? a[3] : a[5];
  document.writeln("<font class=CmtCrit><b><a href='mailto:" + a[5] + "' class=CmtCrit>" + name + "</a></b></font>");

  document.writeln("</font> &#149; ");
  document.writeln("<font class=CmtDate>" + a[1] + "</font>");
  document.writeln(" &#149; ");
  if (notePerso==2){ url = "/delete_rec.php?cls=I&IdRcmd=" + a[0] ; }
  else { url = "/delete_rec.php?cls=R&IdRcmd=" + a[0] ; }
  click= "return confirmLink(this,'Effacer la recommandation.','Voulez-vous vraiment effacer cette recommandation ?')";
  document.writeln('<A href="' + url + '" title="Supprimer la recommandation" onclick="' + click + '"><img border=0 src="/i/del17x16.gif"></A>' );

 } else {
  document.writeln("<font class=CmtPar>Commentaire ");
  if (a[3]) {
    if (a[6]>1) {
//      document.writeln("déposé par <a href='/search.php?critcmt=" + a[0] + "' class=CmtCrit>" + a[3] + "</a></font>");
      document.write("déposé par <a href='/search.php?critcmt=" + a[0] + "' class=CmtCrit ' title='" + a[6] + " commentaires'>");
      document.writeln( a[3] + "</a></font>");
    } else {
      document.writeln("déposé par <font class=CmtCrit><b>" + a[3] + "</b></font>");
    }
  } else {
    document.writeln("<i><b>anonyme</b></i>");
  }
  document.writeln("</font> &#149; ");
  document.writeln("<font class=CmtDate>" + a[1] + "</font>");
  if (a[7]) {
    document.writeln(" &#149; ");
    document.writeln("<A href='/xadmin/search.php?cls=PRcmt&id=" + a[0] + "&edit=1' target=_blank title='Editer le commentaire'><img border=0 src='/images/edit16x13.gif'></A>" );

  }
 }
  document.writeln('</td></tr><IMG height=1 src="/images/spacer.gif" width=1><tr><TD colspan=2 bgcolor=#E0E0E0>');
  if (notePerso==1){ 
	attrib='bgcolor=#FFFF99';
  } else if (notePerso==3){ 
	attrib='bgcolor=#E0E0FF';
  } else if (notePerso==2){ 
	attrib='bgcolor=#FFE0FF';
  } else {
	attrib='bgcolor=#FFFFFF';
  }
  document.writeln("</td></tr><tr><TD colspan=2 " + attrib + ">");
  document.writeln("<div align=justify class=CmtTxt>");
  document.writeln('<img src="/images/arrow-right.gif" width="6" height="11">&nbsp;');
  document.writeln(a[4]);
  if ((notePerso<2)&& a[5]) {
    document.writeln("<br><font class=CmtPR><B>PagesRestos : </b><B><i>" + a[5] + "</i></B></font>");
  }
  document.writeln("</div>");
/*
  if (a[7]) {
//    <font class=ftXSmall color=red>&gt;&gt; éditer</font>
    document.writeln("<div align=right><A href='/xadmin/search.php?cls=PRcmt&id=" + a[0] + "&edit=1' target=_blank title='Editer le commentaire'><img border=0 src='/images/edit16x13.gif'></A></div>" );
  }
*/
  document.writeln("</TD></TR></TABLE>");
  document.writeln("</TD></TR></TABLE>");
  document.writeln("<!-- fin fiche -->");
}

function DisplayRec(str,sep)
{
  if (sep == 1) {
    document.writeln('<TABLE cellSpacing=0 cellPadding=0 width=780 border=0>');
    document.writeln('  <TR><TD align=middle><IMG height=8 src="/images/spacer.gif" width=8><BR>');
    document.writeln('      <HR width=720 SIZE=1>');
    document.writeln('</TD></TR></TABLE>');
  }
  if (str=='') { return 1; }

  a = str.split("|");
  document.writeln("<A name='" + a[0] + "'>");
  document.writeln("<TABLE cellSpacing=0 cellPadding=0 width=780 border=0><TBODY><TR><TD align=middle>");
  document.writeln("<TABLE cellSpacing=0 cellPadding=0 width=700 border=0><TBODY>");
  document.writeln("<TR><TD align=right width=200 valign=top>");
  if (a[39]) { document.writeln('<IMG height=22 src="/images/spacer.gif" width=1><FONT class=BRsel>' + a[39] + ' :</FONT>'); }
  else { document.writeln("&nbsp;"); }

  document.writeln('</TD><TD width=10 colSpan=3><IMG height=8 src="/images/spacer.gif" width=10></TD>');
  document.write('<TD vAlign=top width=');
  if (a[26]=='') {
    document.write('480'); 
  } else {
    document.write('290'); 
  }
  document.writeln('><IMG height=8 src="/images/spacer.gif" width=10><BR>');
  document.write('<FONT class=BRtitle size=3>' + a[1] + '</FONT>');
  if (a[27]){
    var urls;
    urls=a[27].split(" ");
    for (url in urls){
      if (a[49]==1){
        document.write('<BR><A class="BRweb">' + urls[url] +'</A>'); 
	  } else {
	    var lnk;
		lnk="wsurl";
	    if (a[50]>0) lnk=lnk + '-FP' + a[50];
        document.write('<BR><A class="BRweb" href="http://www.pagesrestos.com/search.php?lnk='+lnk+'&goto=' + urls[url] + '&id=' + a[0] + '" target=_blank>' + urls[url] +'</A>'); 
	  }
    }
  }
  document.writeln('</TD>');
  if (a[26]=='') { 
    document.write('<TD vAlign=top align=right width=10 rowSpan=3>');
    document.write('<IMG src="/images/spacer.gif"></TD>');
  } else {
    document.write('<TD vAlign=top align=right width=200 rowSpan=3>');
    document.write('<table border=1 cellspacing=0 cellpadding=0><tr><td><IMG src="' + a[26] + '"></td></tr></table></TD>');
  }
  document.writeln('</TR>');
  document.writeln('<TR><TD colSpan=5><IMG height=4 src="/images/spacer.gif" width=10></TD></TR>');
  document.writeln('<TR>');

  document.write('<TD vAlign=top align=right rowSpan=4><SPAN class=BRaddr>');
  prev=0;
  if (a[2]) {
//	document.write('M&eacute;tro: ' + a[2]);
	document.write('M&eacute;tro: ' + WriteList(a[2],'___',a[0],'MetroLst'));
	prev=1;
  } 
  document.write('<BR>' + a[3] );
  if (a[29]) { document.write('<BR>Acc&egrave;s: ' + a[29]); prev=1; } 
  if (a[4]) { document.write('<BR>' + a[4]); prev=1; } 
  if (a[5]) { document.write('<BR>T&eacute;l: ' + a[5]); prev=1; } 
/*  if (a[6]) { document.write('<BR>Fax: ' + a[6]); prev=1; }  */
  document.writeln('</SPAN>');
 if (a[7] || a[8] || a[9]|| a[42]) { // ouverture ou fermeture
/* separateur orange */
  document.writeln('<TABLE cellSpacing=0 cellPadding=0 width=94 border=0><TBODY>');
  document.writeln('<TR><TD bgColor=#ff7f00><IMG height=2 src="/images/spacer.gif" with=8></TD></TR>');
  document.writeln('<TR><TD><IMG height=2 src="/images/spacer.gif" width=8></TD></TR>');
  document.writeln('</TBODY></TABLE>');

    if (a[7]) { document.write('<div class=BRhoraires>Ouverture: ' + a[7] + '</div>'); }
    if (a[42]) { document.write('<div class=BRhoraires>Accueil jusqu&#039;&agrave;: ' + a[42] + '</div>'); }
    if (a[8]) { 
      if (a[8] =='OTLJ') { document.write('<div class=BRhoraires>Ouvert tous les jours</div>'); 
      } else { document.write('<div class=BRhoraires>Fermeture: ' + a[8] + '</div>'); }
    }
    if (a[9]) { document.write('<div class=BRhoraires>Fermeture annuelle: ' + a[9] + '</div>'); }
  } // fin ouverture ou fermeture

  DisplayPrice(a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[30],a[31],a[32]);


  if (a[48].indexOf('TM.NF') >= 0){
    document.write('<div class=BRhoraires><IMG height=2 src="/images/spacer.gif" width=4><br><IMG height=30 width=32 border=1 src="/i/icon/NonFum32-30.gif" alt="Etablissement Entièrement Non Fumeur"></div>');
  }
  if (a[48].indexOf('TM.AMR') >= 0){
    document.write('<div class=BRhoraires><IMG height=2 src="/images/spacer.gif" width=4><br><IMG height=24 width=24 border=0 src="/i/icon/acces24x24.jpg" alt="Accès pour personnes à mobilité réduite"></div>');
  }
  if (a[48].indexOf('LBL.RDF') >= 0){
    document.write('<div class=BRhoraires><IMG height=2 src="/images/spacer.gif" width=4><br><a href="http://www.restaurateursdefrance.com/home.php" target="_new"><IMG height=26 width=35 border=0 src="/i/icon/RDF35x26.gif" alt="Restaurateurs de France"></a></div>');
  }
/*  if (a[44]) DisplayMenuPromo(a[0],a[46],a[45]); */
  if (a[44]=='2') DisplayPromoText(a[0],a[52]);

/*
  if (a[47]) { // Recommandation 
	if (a[47] == 'R') { txt='Oublier toutes les recommandations'; }
	if (a[47] == 'I') { txt='Oublier toutes les indications'; }
	url = "/delete_rec.php?cls=" + a[47] + "&id=" + a[0] ;
	click= "return confirmLink(this,'" + txt + "','Voulez-vous vraiment " + txt + " ?')";
	document.writeln('<br><IMG height=12 src="/i/sp.gif" width=4><br>');
	document.writeln('<A class=AddCmt2 href="' + url + '" title="' + txt + '"');
	document.writeln(' onclick="' + click + '"');
	document.writeln('>[ ' + txt + ' ]</A>' );
  }
*/

  document.writeln('</TD>');
  document.writeln('<TD width=4 rowSpan=4><IMG height=8 src="/images/spacer.gif" width=4></TD>');
  document.writeln('<TD width=2 bgColor=#808080 rowSpan=4><IMG height=8 src="/images/spacer.gif" width=2></TD>');

  document.writeln('<TD width=4 rowSpan=4><IMG height=8 src="/images/spacer.gif" width=4></TD>');
  document.writeln('<TD vAlign=top>');

  if (a[37]) { document.writeln('<DIV class=BRtheme>' + WriteThemes(a[37],'&CR_Etab_Activity%5B%5D=',a[0]) + '</DIV>'); }
  //if (a[20]) { document.writeln('<DIV class=BRtheme>Cuisine: ' + WriteThemes(a[20],'&CR_Cooking_Type%5B%5D=',a[0]) + '</DIV>'); }
  if (a[20]) { document.writeln('<DIV class=BRtheme>Cuisine: ' + WriteThemes(a[20],'_',a[0]) + '</DIV>'); }
  //if (a[19]) { document.writeln('<DIV class=BRtheme>Thème: ' + WriteThemes(a[19],'&CR_Etab_Theme%5B%5D=',a[0]) + '</DIV>'); }
  if (a[19]) { document.writeln('<DIV class=BRtheme>Thème: ' + WriteThemes(a[19],'__',a[0]) + '</DIV>'); }

  if (a[21]) { document.writeln('<DIV class=BRtheme>Quartier: ' + WriteThemes(a[21],'',a[0]) + '</DIV>'); }

  document.writeln('<IMG height=8 src="/images/spacer.gif" width=10></TD></TR>');
  document.writeln('<TR><TD colSpan=2><IMG height=4 src="/images/spacer.gif" width=490></TD></TR>');
  document.writeln('<TR><TD vAlign=top colSpan=2><SPAN class=BRedito>');
  if (a[43]) {
    s = 'Status de la fiche = ' + a[43];
    if (a[43]=='2') {
      s = 'Travaux en cours...';
    }
    if ((a[43]=='4') || (a[43]=='5')) {
      s = 'Etablissement fermé !';
    }
    if (a[43]=='F') {
      s = 'Etablissement fermé ! (fiche masquée)';
    }
    if (a[43]=='C') {
      s = 'Cette fiche est à vérifier !';
    }
    if (a[43]=='D') {
      s = 'Cette fiche est désactivée !';
    }
    if (a[43]=='B') {
      s = 'Cette fiche est un doublon !';
    }
    document.writeln('<FONT color="#C00000"><B>&gt; &gt; &gt; ATTENTION : <U>' + s + '</U></B>');
    if (a[41]=='AP') { // admin/editor ?
     url = "/delete_rec.php?cls=resto&id=" + a[0] ;
     click= "return confirmLink(this,'Effacer cette fiche.','Voulez-vous vraiment effacer cette fiche ?')";
     document.writeln(' <A href="' + url + '" title="Supprimer la fiche" onclick="' + click + '"><img border=0 src="/i/del17x16.gif"></A>');
    }
    document.writeln('<BR>&nbsp;<BR></FONT>');
  }
  if (a[50]==1) {
    document.writeln('<table class="PROMOtable" align=center><tr><td class="PROMOtopRow">');
      document.writeln('&#8226;&nbsp;&nbsp;&#8226;&nbsp;&nbsp;&#8226;&nbsp;&nbsp;');
      document.writeln('L&#8217;&eacute;tablissement&nbsp;&nbsp;se&nbsp;&nbsp;pr&eacute;sente');
      document.writeln('&nbsp;&nbsp;&#8226;&nbsp;&nbsp;&#8226;&nbsp;&nbsp;&#8226;');
/*
    document.writeln('publicit&eacute;');
	for (i=1; i<=6; i++) {
      document.writeln('&nbsp;&nbsp;&#8226;&nbsp;&nbsp;publicit&eacute;');
	}
*/
    document.writeln('</td></tr><tr><td class="PROMObody"><span class=BRedito>');
    document.writeln( a[22] );
    document.writeln('</span></td></tr>');
//	document.writeln('<tr><td class="PROMObotRow"></td></tr>');
	document.writeln('</table>');
  } else {
    document.writeln( a[22] );
  }
  if (a[23]) {
    document.writeln('<div class=BRedito><IMG height=4 src="/images/spacer.gif" width=8><BR>' + a[23] + '</div>');
  }
  if (a[24]) {
    document.writeln('<div class=BRedito><IMG height=4 src="/images/spacer.gif" width=8><BR><U>Leurs sp&eacute;cialit&eacute;s:</U> <A href="/ou_trouver_quoi.html" class=Plats>' + a[24] + '</A>.');
//    if (a[25]=='') {

      document.writeln('&nbsp;&nbsp;<a href="http://www.pagesrestos.com/fr/lexique-culinaire/a0.html" class="Gelt1"><B>&raquo; Lexique culinaire</B></a>');
//    }
    document.writeln('</div>');
  }
  if (a[25]) {

    document.writeln('<div class=BRedito><IMG height=4 src="/images/spacer.gif" width=8><BR><U>Autres plats:</U> <A href="/ou_trouver_quoi.html" class=Plats>' + a[25] + '</A>.');
//    document.writeln('<div class=BRedito><IMG height=4 src="/images/spacer.gif" width=8><BR><U>Autres plats:</U> ' + WriteDishes(a[25],'',a[0]) + '.');
    document.writeln('&nbsp;&nbsp;<a href="http://www.pagesrestos.com/fr/lexique-culinaire/a0.html" class="Gelt1"><B>&raquo; Lexique culinaire</B></a>');
    document.writeln('</div>');
  }
  document.writeln('</SPAN></TD></TR>');

//  document.writeln('<IMG height=4 src="/images/spacer.gif" width=2><BR>');

  document.writeln('<TR><TD vAlign=bottom colSpan=2>');

    document.writeln('<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%" xbgcolor=#FFFFFF>');

//=== Mise à jour
if (1){
  document.writeln('<TR><TD colspan=99 align=right>');
    document.writeln("<font class=ftXSmall color=#208020>");
    if (a[41]=='AP') {
      if (a[50]>0) {
	    document.writeln("<A href='/xadmin/search.php?cls=PRcial&id=" + a[0] + "&edit=1' target=_blank><font class=ftXSmall color=red>[Editer]</font></A>" );
	  } else {
	    document.writeln("<A href='/xadmin/search.php?cls=PRfiche&id=" + a[0] + "&edit=1' target=_blank><font class=ftXSmall color=red>Màj: " + a[38] + "</font></A>" );
	  }	
    } else {
      if (a[50]==0) { document.writeln("Màj: " + a[38] ); }
    }
    document.writeln("</font>");
    document.writeln("</td></tr>");
}
//=== Mise à jour - end

    document.writeln('<tr>');

    document.writeln('<td align=left class=AddCmtTxt>');
	if (a[51]==0) {
      document.writeln('»&nbsp;<A class=AddCmt2 href="javascript:OpenComment(' + "'" + a[0] + "'" + ')">Ajouter un commentaire</A>');
	} 
	if (a[35]) {
		document.writeln('</td><td align=left class=AddCmtTxt>');
		url = "javascript:OpenResa('" + a[0] + "')";
		document.writeln('»&nbsp;<A class=AddCmt2 href="' + url + '">R&eacute;server une table</A>');
	}
//=== Recommander Fiche - begin
	if (1) {
	    document.writeln('</td><td align=left class=AddCmtTxt width=35>');
		url = "javascript:OpenRecommend('" + a[0] + "')";
		anchor = '<A class=AddCmt2 href="' + url + '">';
		s = '';
		s = s + anchor;
		s = s + '<img src="/images/img/send2friend3.gif" border=0 width=33 height=21 alt="Envoyer à un ami"></a>';
		document.writeln(s);	
		document.writeln('</td><td align=left class=AddCmtTxt>');
		document.writeln(anchor + 'Envoyer à un ami</a>&nbsp;');	
//	    document.writeln('</td><td align=left class=AddCmtTxt width=12>');
		if (a[50]==0) {
		  s = '<A class=AddCmt2 href="search.php?id=' + a[0] + '" target=_blank><img src="/i/icon/msg.gif" border=0 width=10 height=12 alt="Lien vers la fiche"></a>';
		  document.writeln(s);	
		}
	}
//=== Recommander Fiche - end

//=== Notes perso - begin
	if (a[41]){ // je suis loggué
		document.writeln('</td><td align=left class=AddCmtTxt>');
		url = "javascript:OpenPersonalNote('" + a[0] + "')";
		document.writeln('»&nbsp;<A class=AddCmt2 href="' + url + '">Note perso</A>');		
	}
//=== Notes Perso - end

//=== plan d'accès - begin
    document.writeln('</td><td align=right class=AddCmtTxt>');
    regExp=/\'/g;
    adr = a[3].replace(regExp," ");
    city = a[34].replace(regExp," ");
    url = 'javascript:OpenMap("' + city + '","' + a[33] + '","' + adr + '")';
    document.writeln('[<A class=AddCmt2 href=\'' + url + '\'>Plan d' + "'" + 'accès</A>]</SPAN>');
//=== Plan d'accès - end

    document.writeln("</TD></TR></TABLE>");
  document.writeln('</TD></TR>');

document.writeln("</TBODY></TABLE>");
document.writeln("</TD></TR></TBODY></TABLE>");
}

function DisplayQuartier(q,ref,areaHeader)
{
  if (ref != '') {
    document.writeln('<A name=' + ref + '><IMG height=16 src="/images/spacer.gif" width=8></A>');
  }
  document.writeln('<TABLE cellSpacing=0 cellPadding=0 width=780 border=0><TR><TD align=center>');
  document.writeln('<TABLE cellSpacing=0 cellPadding=0 width=740 border=0>');
  document.writeln('  <TR><TD width=740 bgColor=#ffbf55><IMG height=1 src="/images/spacer.gif" width=8></TD></TR>');
  document.writeln('  <TR><TD width=740 bgColor=#d5774a><IMG height=1 src="/images/spacer.gif" width=8></TD></TR>');
  document.writeln('  <TR><TD class=BRareaHdr align=middle width=760 bgColor=#d5774a>' + areaHeader + '"' + q + '"</TD></TR>');
  document.writeln('  <TR><TD width=740 bgColor=#d5774a><IMG height=1 src="/images/spacer.gif" width=8></TD></TR>');
  document.writeln('  <TR><TD width=740 bgColor=#7f3f00><IMG height=1 src="/images/spacer.gif" width=8></TD></TR>');
  document.writeln('</TABLE></TD>');
  document.writeln('</TR></TABLE>');
  document.writeln('<IMG height=4 src="/images/spacer.gif" width=8><br>');
}

function Q_open(url,areaHeader)
{
rootUrl=url;
document.writeln('<table cellpadding=0 cellspacing=0 border=0><tr><td width=15></td><td>');
document.writeln('<FONT class="BRareaLstHdr">&nbsp;&nbsp;' + areaHeader + ' :</FONT><img src="/images/spacer.gif" width=8 height=8><br>');
document.writeln('</td></tr></table>');
document.writeln('<table cellpadding=0 cellspacing=0 border=0 width=800><tr><td width=40></td><td width=760>');
document.writeln('<table cellpadding=0 cellspacing=1 border=0 ><tr>');
document.writeln('<td width=240><img src="/images/spacer.gif" width=1 height=1></td>');
document.writeln('<td width=240><img src="/images/spacer.gif" width=1 height=1></td>');
document.writeln('<td width=240><img src="/images/spacer.gif" width=1 height=1></td>');
col=0;
}

function Q_insert(q,nbr,url,urlDist)
{
  col++;
  if (col==1) { document.writeln('</tr><tr>'); }
  if (urlDist==1) { url = rootUrl + url; }
  document.writeln('<td>&#149;<A class="BRareaLnk" href="' + url + '">' + q + '</A><span class="BRareaNbr"> (' + nbr +')</span></td>'); 
  if (col==3) { col=0; }
}

function Q_close()

{
document.writeln('</tr></table>');
document.writeln('</td></tr></table>');
}
