\cgidef{ -tex
%%%%   Convert an HTX to Javascript. 
%.Version 1.1 01-Jan-2009: accept #1=II/253/file
\flag #2{"#2",}
\sep {\html{</td><td>}}
{flags} #3{var \basename{#1} = new Array(}{"" );
  \basename{#1}.name="#1";
  \basename{#1}.edit="#2";\ifmatch{*=*}{#3}{
  \basename{#1}.options="#3";}\fi}
}
%%%%%%%%% Example
%\begin{flags}{SDSS_status}{x}{}
%\flag{0x0001}{OK_RUN      \sep Object is usable}
%\flag{0x0002}{RESOLVED    \sep Object has been resolved against other runs.}
%\end{flags}
%%%%%%%%%%%%%%%%%
