function exercice(num,trait,niveau) {
 document.write("<TABLE BORDER=0 cellspacing=0 cellpadding=0>");
 document.write("<TR>");
 document.write(" <TD>");
 document.write("  <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>");
 document.write("   <TR><TD COLSPAN=3><IMG SRC='/img/ech_haut.gif' WIDTH=228 HEIGHT=6></TD></TR>");
 document.write("   <TR><TD><IMG SRC='/img/ech_gauche.gif' WIDTH=20 HEIGHT=202></TD><TD><IMG SRC='exo/exo"+num+".gif' WIDTH=202 HEIGHT=202></TD><TD><IMG SRC='/img/ech_droite.gif' WIDTH=6 HEIGHT=202></TD></TR>");
 document.write("   <TR><TD COLSPAN=3><IMG SRC='/img/ech_bas.gif' WIDTH=228 HEIGHT=20></TD></TR>");
 document.write("  </TABLE>");
 document.write(" </TD>");
 document.write(" <TD VALIGN=TOP WIDTH=240 align=center>");
 document.write("  <b>Les "+trait+" jouent et gagnent</b><br>");
 for (i=0; i<niveau; i++) {document.write("<IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18>");}
 document.write("  <br><div align=left>&nbsp;&nbsp;&nbsp;<A HREF=javascript:solution('"+num+"')><img src='/img/fleche.gif' width=10 height=8 border=0 align=bottom hspace=2>Solution</A></div>");
 document.write("  <br><IMG SRC='exo/solution.gif' NAME=sol"+num+" WIDTH=210 HEIGHT=140>");
 document.write(" </TD>");
 document.write("</TR>");
 document.write("</TABLE>");
}

function solution(num) {
 document.e["sol"+num].src="exo/sol"+num+".gif"
}

function menu_exercices(num) {
 document.write("<br><table border=1 cellspacing=1 cellpadding=0 background='/img/fond2.jpg'>");
 document.write("<tr><th width=500 background='/img/fond4.jpg' class=moyen>Exercices</th></tr>");
 document.write("<tr><td width=500 align=center>");
 document.write("<table border=0 cellspacing=0 cellpadding=0>");
 document.write("<tr>");
 document.write(" <td width=180 valign=top>");
 document.write("  <b>4 Niveaux de difficult&eacute;s:</b>");
 document.write("  <table border=0 cellspacing=0 cellpadding=0>");
 document.write("   <tr><td width=65><li>Facile</td><td><IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18></td></tr>");
 document.write("   <tr><td><li>Moyen</td><td><IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18><IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18></td></tr>");
 document.write("   <tr><td><li>Difficile</td><td><IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18><IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18><IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18></td></tr>");
 document.write("   <tr><td><li>Etudes</td><td><IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18><IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18><IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18><IMG SRC='/img/etoile.gif' WIDTH=18 HEIGHT=18></td></tr>");
 document.write("  </table>");
 document.write(" </td>");
 document.write(" <td width=300 valign=top align=center>");
 document.write("  <b>Autres pages d'exercices:</b><br>");
 for (i=1; i<=8; i++) {
  if (i>1) document.write("|");
  if (i==num) {document.write("&nbsp;<b>"+i+"</b>&nbsp;");}
  else {document.write("&nbsp;<a href='exercices"+i+".html'>"+i+"</a>&nbsp;");}
 }
 document.write(" </td>");
 document.write("</tr>");
 document.write("</table>");
 document.write("</td></tr>");
 document.write("</table>");
}
