slib_lang_exists_tmp=yes

slib_title=Chemical components
slib_parms=4\
 , chemical equation\
 , [optional] the word <tt>htmlbuttons</tt> followed by a space and one number\
 , [optional] the word <tt>shuffle</tt>\
 , [optional] a list of words to be appended, enclosed in brackets. Some words are magical: \
 <tt>extra</tt> expands to '+,->' ; <tt>redox_extra</tt> expands to 'H^+_aq,OH^-_aq,H2O,e^-'.

slib_out= Outputs a matrix of the reactives in the first line, and the products in \
the second line. <br>If the parameter <tt>htmlbuttons</tt> is specified, the output \
is some code to make clickable buttons; then, the number refers to a reply \
field which will receive the results of the buttons' events. <br>If the \
parameter <tt>shuffle</tt> is specified, the buttons are shuffled. <br>These buttons \
can be made active if the following javascript code is added in the page: \
<pre style="color:green;">\
&lt;script type="text/javascript"&gt;\
function getInput(n){\
  f=window.document.forms[0];\
  for(i=0; i&lt;f.elements.length; i=i+1){\
    if (f.elements[i].name=="reply"+n) { \
      return f.elements[i];\
    }\
  }\
  return null;\
}\
function appendToInput(n,msg){\
  var i=getInput(n);\
  i.value=i.value+msg+' ';\
  i.focus();\
}\
&lt;/script&gt;\
</pre>

slib_comment=use the syntax accepted by the command chemeq
