{if $action==="browseDomain"}
  <h3>
    {if $domainID==0}
      Okruhy tém
    {else}
      Okruh tém - {$domain}
    {/if}
  </h3>
  <div class="indent">
    <a href="index.php?site=questionDB&amp;action=addDomain&amp;courseID={$courseID}&amp;domainID={$domainID}">Nový okruh</a>
    {if $domainID!=0}
      <a href="index.php?site=questionDB&amp;action=addQuestion&amp;courseID={$courseID}&amp;domainID={$domainID}">Nová otázka</a>
    {/if}
    <br />
    <br />
    <table>
      <tr>
        <td>&nbsp;</td>
      </tr>
      {if $domainID!=0}
        <tr>
          <td><img alt="" src="images/domain.jpg" /></td>
          <td colspan="3"><a href="index.php?site=questionDB&amp;action=browseDomain&amp;courseID={$courseID}&amp;domainID={$parentDomainID}">..</a></td>
        </tr>
      {/if}
      {foreach from=$domainList item=menuItem}
        <tr>
          <td><img alt="" src="images/domain.jpg" /></td>
          <td><a title="{$menuItem.description}" href="index.php?site=questionDB&amp;action=browseDomain&amp;courseID={$courseID}&amp;domainID={$menuItem.id}">{$menuItem.subject}</a></td>
          <td><a href="index.php?site=questionDB&amp;action=editDomain&amp;courseID={$courseID}&amp;domainID={$menuItem.id}">[editovať]</a></td>
          <td><a href="javascript: Ask('Naozaj chcete okruh tém vymazať?', 'index.php?site=questionDB&amp;action=deleteDomain&amp;courseID={$courseID}&amp;domainID={$menuItem.id}');">[odstrániť]</a></td>
        </tr>
      {/foreach}
      {foreach from=$questionList item=menuItem}
        <tr>
          <td><img alt="" src="images/question.jpg" /></td>
          <td><a href="index.php?site=questionDB&amp;action=browseAnswerSets&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$menuItem.id}">{$menuItem.question}</a></td>
          <td><a href="index.php?site=questionDB&amp;action=editQuestion&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$menuItem.id}">[editovať]</a></td>
          <td><a href="javascript: Ask('Naozaj chcete otázku vymazať?', 'index.php?site=questionDB&amp;action=deleteQuestion&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$menuItem.id}');">[odstrániť]</a></td>
        </tr>
      {/foreach}
    </table>
    <br />
    <a href="index.php?site=questionDB&amp;action=addDomain&amp;courseID={$courseID}&amp;domainID={$domainID}">Nový okruh</a>
    {if $domainID!=0}
      <a href="index.php?site=questionDB&amp;action=addQuestion&amp;courseID={$courseID}&amp;domainID={$domainID}">Nová otázka</a>
    {/if}
  </div>
{elseif $action==="addDomain"}
  <h3>Nový okruh tém</h3>
  <div class="indent">
    <form action="index.php?site=questionDB&amp;action=addDomain&amp;courseID={$courseID}&amp;domainID={$domainID}" method="post">
      <table>
        <tr>
          <td>Názov</td>
          <td><input name="subject" type="text" value="" size="40" /></td>
        </tr>
        <tr>
          <td>Popis</td>
          <td><textarea name="description" rows="10" cols="40"></textarea></td>
        </tr>
        <tr>
          <td></td>
          <td><input name="submit" type="submit" value="Vytvor" /></td>
        </tr>
      </table>
    </form>
    <br />
    <br />
    <a href="index.php?site=questionDB&amp;action=browseDomain&amp;courseID={$courseID}&amp;domainID={$domainID}">Naspäť</a>
  </div>
{elseif $action==="editDomain"}
  <h3>Editovať okruh tém - {$domain.subject}</h3>
  <div class="indent">
    <form action="index.php?site=questionDB&amp;action=editDomain&amp;courseID={$courseID}&amp;domainID={$domainID}" method="post">
      <table>
        <tr>
          <td>Názov</td>
          <td><input name="subject" type="text" value="{$domain.subject}" size="40" /></td>
        </tr>
        <tr>
          <td>Popis</td>
          <td><textarea name="description" rows="10" cols="40">{$domain.description}</textarea></td>
        </tr>
        <tr>
          <td></td>
          <td><input name="submit" type="submit" value="Zmeň" /></td>
        </tr>
      </table>
    </form>
    <br />
    <br />
    <a href="index.php?site=questionDB&amp;action=browseDomain&amp;courseID={$courseID}&amp;domainID={$domainID}">Naspäť</a>
  </div>
{elseif $action==="addQuestion"}
  <h3>Nová otázka</h3>
  <div class="indent">
    <form action="index.php?site=questionDB&amp;action=addQuestion&amp;courseID={$courseID}&amp;domainID={$domainID}" method="post">
      <table>
        <tr>
          <td>Znenie otázky</td>
          <td><textarea name="question" rows="10" cols="40"></textarea></td>
        </tr>
        <tr>
          <td></td>
          <td><input name="submit" type="submit" value="Vytvor" /></td>
        </tr>
      </table>
    </form>
    <br />
    <br />
    <a href="index.php?site=questionDB&amp;action=browseDomain&amp;courseID={$courseID}&amp;domainID={$domainID}">Naspäť</a>
  </div>
{elseif $action==="editQuestion"}
  <h3>Editovať otázku - {$question.name}</h3>
  <div class="indent">
    <form action="index.php?site=questionDB&amp;action=editQuestion&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$questionID}" method="post">
      <table>
        <tr>
          <td>Znenie otázky</td>
          <td><textarea name="question" rows="10" cols="40">{$question.question}</textarea></td>
        </tr>
        <tr>
          <td></td>
          <td><input name="submit" type="submit" value="Zmeň" /></td>
        </tr>
      </table>
    </form>
    <br />
    <br />
    <a href="index.php?site=questionDB&amp;action=browseDomain&amp;courseID={$courseID}&amp;domainID={$domainID}">Naspäť</a>
  </div>
{elseif $action==="browseAnswerSets"}
  <h3>Otázka - {$question}</h3>
  <div class="indent">
    <a href="index.php?site=questionDB&amp;action=addAnswerSet&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$questionID}">Nová sada odpovedí</a>
    <br />
    <br />
    <table>
      <tr>
        <td><img alt="" src="images/domain.jpg" /></td>
        <td colspan="3"><a href="index.php?site=questionDB&amp;action=browseDomain&amp;courseID={$courseID}&amp;domainID={$domainID}">..</a></td>
      </tr>
      {foreach from=$answerSetList item=menuItem}
        <tr>
          <td><img alt="" src="images/answerSet.jpg" /></td>
          <td>{$menuItem.text}</td>
          <td><a href="index.php?site=questionDB&amp;action=editAnswerSet&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$questionID}&amp;answerSetID={$menuItem.id}">[editovať]</a></td>
          <td><a href="javascript: Ask('Naozaj chcete sadu odpovedí vymazať?', 'index.php?site=questionDB&amp;action=deleteAnswerSet&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$questionID}&amp;answerSetID={$menuItem.id}');">[odstrániť]</a></td>
        </tr>
      {/foreach}
    </table>
    <br />
    <a href="index.php?site=questionDB&amp;action=addAnswerSet&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$questionID}">Nová sada odpovedí</a>
  </div>
{elseif $action==="addAnswerSet"}
  <h3>Nová sada odpovedí</h3>
  <div class="indent">
    <table>
      <tr>
        <td><div class="underline">Znenie otázky:</div></td>
      </tr>
      <tr>
        <td>{$question}</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><div class="underline">Odpovede:</div></td>
      </tr>
      <tr>
        <td>
          <form id="form" action="index.php?site=questionDB&amp;action=addAnswerSet&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$questionID}" method="post">
            
          </form>
        </td>
      </tr>
    </table>
    
    <script language="Javascript" type="text/javascript">
    <!--
      InitializeAnswerSet("form","<a href=\"javascript: addAnswer('',false);\">Pridať ďalšiu odpoveď</a><br /><br />","<br /><input name=\"submit\" type=\"submit\" value=\"Vytvor\" />");
      addAnswer("",false);
    //-->
    </script>
    <br />
    <br />
    <a href="index.php?site=questionDB&amp;action=browseAnswerSets&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$questionID}">Naspäť</a>
  </div>
{elseif $action==="editAnswerSet"}
  <h3>Editovať sadu odpovedí</h3>
  <div class="indent">
    <table>
      <tr>
        <td><div class="underline">Znenie otázky:</div></td>
      </tr>
      <tr>
        <td>{$question}</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><div class="underline">Odpovede:</div></td>
      </tr>
      <tr>
        <td>
          <form id="form" action="index.php?site=questionDB&amp;action=editAnswerSet&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$questionID}&amp;answerSetID={$answerSetID}" method="post">
            
          </form>
        </td>
      </tr>
    </table>
    
    <script language="Javascript" type="text/javascript">
    <!--
      InitializeAnswerSet("form","<a href=\"javascript: addAnswer('',false);\">Pridať ďalšiu odpoveď</a><br /><br />","<br /><input name=\"submit\" type=\"submit\" value=\"Zmeň\" />");
      {foreach from=$answerList item=menuItem}
        addAnswer({$menuItem.text},{$menuItem.correct});
      {/foreach}
    //-->
    </script>
    <br />
    <br />
    <a href="index.php?site=questionDB&amp;action=browseAnswerSets&amp;courseID={$courseID}&amp;domainID={$domainID}&amp;questionID={$questionID}">Naspäť</a>
  </div>
{/if}
