\documentclass{article}
% Čeština
\usepackage{czech} % Podpora české sazby.
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

% Web
\usepackage[pdftex,usesf,nodirectory,rightpanel,czech]{web}

% AcroTeX
\usepackage[pdftex,execJS,czech]{exerquiz}
\def\RBW{4cm}  % Šířka odpovědního políčka.
\def\SFW{3cm}  % Šířka ScoreField.
\def\GFW{3cm}  % Šířka GradeField.
\def\PtFW{3cm} % Šířka PointsField.
\def\PcFW{3cm} % Šířka PercentField.

% eCards
\usepackage[memLogo]{eCards}
\makeatletter
    \ecLogo{\includegraphics[width=.8\@panelwidth]{logo.pdf}}
\makeatother
\cardsFinishedMsg{Test is finished.}
\renewcommand\noHintJSAction{app.alert("No help is given.")}
\renewcommand{\headCard}
{%
    \vspace*{\stretch{.1}}%
    \begin{center}%
    \Large\textbf{QUESTION}\par\vspace*{.25in}%
    \begin{minipage}{.85\linewidth}%
        \large\unskip\noindent\ignorespaces%
}
\renewcommand{\headHint}
{%
    \vspace*{\stretch{.1}}%
    \begin{center}%
        \Large\textbf{HELP}\par\vspace*{.25in}%
        \begin{minipage}{.85\linewidth}%
        \large\unskip\noindent\ignorespaces%
}
\renewcommand{\headAnswer}
{%
    \vspace*{\stretch{.1}}%
    \begin{center}%
        \Large\textbf{SOLUTION} \\\vspace*{.25in}%
        \begin{minipage}{.85\linewidth}%
        \large\unskip\noindent\ignorespaces%
}
\parindent0pt

% Layout
\margins[40mm]{7mm}{7mm}{7mm}{7mm} % panel, levý, pravý, horní, dolní
\screensize{140mm}{185mm}

\makeatletter
\def\buttonfont{\fontsize{7pt}{7pt}\itshape\selectfont}
\newNaviIcon[m]{\Home}%
    {\iconWidth}{\iconHeight}%
    {\buttonfont Titel page}%
    {FirstPage}
% \newNaviIcon[l]{\Textbook}%
%     {\iconWidth}{\iconHeight}%
%     {\buttonfont Textbook}%
%     {\href{interaktivni-priklady.pdf}}
\newNaviIcon[j]{\Begin}%
    {\iconWidth}{\iconHeight}%
    {\buttonfont Start Exercise}%
    {\beginJS}
\newNaviIcon[j]{\NextCard}%
    {\iconWidth}{\iconHeight}%
    {\buttonfont Other Question}%
    {getNextCard();}
\newNaviIcon[j]{\hintNextCard}%
    {\iconWidth}{\iconHeight}%
    {\buttonfont Other Question}%
    {getNextCard();}
\newNaviIcon[j]{\Hint}%
    {\iconWidth}{\iconHeight}%
    {\buttonfont Help}%
    {\if\@ecNoHints y\noHintJSAction%
        \else\ifnum\nMarker=0this.gotoNamedDest("\hintDest");\fi\fi}
\newNaviIcon[j]{\Soln}%
    {\iconWidth}{\iconHeight}%
    {\buttonfont Solution}%
    {\ifnum\nMarker=2\relax\else%
        this.gotoNamedDest("\solnDest");\fi}
\newNaviIcon[j]{\hintSoln}%
    {\iconWidth}{\iconHeight}%
    {\buttonfont Solution}%
    {this.gotoNamedDest("\solndest");}
\def\defineSoln{%
    \newNaviIcon[j]{\Soln}%
    {\iconWidth}{\iconHeight}%
    {\buttonfont Solution}%
    {this.gotoNamedDest("\solndest");}%
    \def\sqWrongRespJS{app.alert(\eqsqwgmsg,3);
        this.gotoNamedDest("\solndest");}%
}
\newNaviIcon[j]{\FullScreen}%
    {\iconWidth}{\iconHeight}%
    {\buttonfont Full Screen}{\fsJS}
\newNaviIcon[m]{\Close}
    {\iconWidth}{\iconHeight}%
    {\buttonfont Quit}%
    {Quit}

\buildpanel{%
    \vspace*{.0325\textheight}
    \ifx\@ecLogoLink\@empty\@@Logo
    \else\href{\@ecLogoLink}{\@@Logo}\fi\vfill
    \rotatebox{-90}{\parbox{2.15in}{\large \color{buttonbackground}\textsl{Acro\!\TeX{} eDucation Bundle}\\
%     \small
	\smash{\raisebox{3pt}{\color{blue}\textsl{eCards}\hfill}}}}
	\vfill
    \panelNaviGroup
    \vspace*{.01\textheight}
}

\renewcommand\panelNaviGroup{%
    \newdimen\panelspace
    \setlength\panelspace{.01\textheight}
    \def\pvspace{\vspace*{.7\panelspace}}
    \def\pbigvspace{\vspace*{2\panelspace}}
    \def\iconWidth{.8\@panelwidth}

    {\ifnum\thepage=1\navibarTextColor{buttondisable}\fi\Home}\\%\pbigvspace
%     \Textbook\\
	\pbigvspace
    \ifnum\thepage=1%
        \Begin\\\pbigvspace
     \else%
        \NextCard\\\pvspace
        {\ifnum\nMarker>0\relax
            \navibarTextColor{buttondisable}\fi
         \if\@ecNoHints y\relax
            \navibarTextColor{buttondisable}\fi\Hint}\\\pvspace
        {\ifnum\nMarker=2\relax
            \navibarTextColor{buttondisable}\fi\Soln}\\\pbigvspace
    \fi
    \FullScreen\\\pvspace
    \Close\\
}
\makeatother

\makeatletter
\renewcommand\maketitle{%
  \newpage
  \null
  \vskip 2em%
  \begin{center}%
  \let \footnote \thanks
    {\LARGE \webtitle \par}%
    \vskip 1.5em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \webauthor
      \end{tabular}\par}%
    \vskip 1em%
    {\large 3. 5. 2012}%
  \end{center}%
  \par
  \vskip 1.5em}
\makeatother

% http://colorschemedesigner.com/
\definecolor{backgroundcolor}{rgb}   {0.812,0.902,0.863}
\definecolor{panelbackground}{rgb}   {0.188,0.749,0.510}
\definecolor{buttonbackground}{rgb}  {0.780,0.290,0.220}
\definecolor{buttondisable}{rgb}     {0.812,0.902,0.863}
\definecolor{buttontext}{rgb}        {0.000,0.000,0.000}
\definecolor{cardbackground}{rgb}    {0.812,0.902,0.863}
\definecolor{hintbackground}{rgb}    {0.902,0.855,0.812}
\definecolor{solutionbackground}{rgb}{255,254,175}
\textBgColor{backgroundcolor}
\panelBgColor{panelbackground}
\navibarTextColor{buttontext}
\navibarBgColor{buttonbackground}
\cardColor{cardbackground}
\hintColor{hintbackground}
\solnColor{webyellow}

% Matematika
\usepackage{amsmath} 
\newcommand{\E}{\mathrm{e}}
\newcommand{\D}{\mathrm{d}}
%definice poli pro zapis MA odpovedi
%mf{odpoved}
\def\mf#1{\setlength{\fboxrule}{0pt}\setlength{\fboxsep}{1bp}\fbox{\RespBoxMath[\rectW{.25in}\Q{1}\textSize{0}]{#1}{1}{.0001}{[0,1]}}}
%.25in je idealka na 4 znaky

% Oddělovače
\newcommand{\spRow}{\rowsep{4pt}}
\newcommand{\spItem}{\vspace*{8pt}}


\title{Procvičovací příklady -- eCards}
\author{Silvie \v{S}abacká}

\begin{document}

\maketitle

\centerline{\includegraphics[width=.5\textwidth]{logo.pdf}}

\ifecListing
    \begin{center}\Large\bfseries
        Seznam otázek, nápověd a odpovědí.
    \end{center}\bigskip
\fi

\begin{card}
Zadání otázky.
\begin{response}
      \begin{hint}
		\textbf{Otázka:} Zopakování zadání
		\bigskip
		
        \textbf{Nápověda:} .....
      \end{hint}
      
	  \begin{answer}
 	   \textbf{Otázka:} Zopakování zadání
       \bigskip
       
       \textbf{Řešení:} 
      \end{answer}
    \end{response}
\end{card}
\end{document}
