function tabprix(mode,pdb) {

if (pdb.length>0) {

// on n'affiche rien si ce n'est pas un nombre

var exprg = new RegExp("^[ 0-9]+.?[ 0-9]*$");
if (exprg.test(pdb)) {

  document.write("<table>")
  var p = 1.0 ;
  var j = 1 ;
  for (i = 1 ; i <= 10 ; i++) {
       window.document.writeln('<tr>')
       window.document.writeln('<td align=right><font size="5" color="#008000"><b>',j,'</td>')
       window.document.writeln('<td align=right><font size="5" color="#008000"><b> art.&nbsp;&nbsp; &nbsp;</td>')
       p = pdb*j ;
       if (mode==1) { p = p * 1.284 }
       if (mode==3) { p = p * 0.95  }
       window.document.writeln('<td align=right><font size="5" color="#800000"><b> ',p.toFixed(2))
       if (mode==1) { document.write(" $ </td>") ;}
       if (mode==2) { document.write(" &euro;</td>") }
       if (mode==3) { document.write(" &euro;</td>") }
       window.document.writeln('</tr>')
       j = j + 1 ;
       if (i>=5) { j = j + 4 } ;
       if (i>=9) { j = j + 20 } ;
   } // fin de pour

  document.write("</table>")

} // fin de si sur expression régulière

} // fin de si sur pdb non vide

} ; // fin de fonction tabprix
