%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% beamerouterthemetechnicolor.sty --- 
%% Author          : Marc Joye
%% Last Modified On: Sun Jul 24 22:32:14 2011
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newif\ifmj@numbering\mj@numberingfalse
\ifx\undefined\mj@numberingouter\else
  \csname mj@numbering\mj@numberingouter\endcsname
\fi
\DeclareOptionBeamer{numbering}[true]{\csname mj@numbering#1\endcsname}
\ProcessOptionsBeamer


\mode<presentation>

%--------------------------------------------------------------------
%--- Navigation symbols
%--------------------------------------------------------------------
\setbeamertemplate{navigation symbols}[only frame symbol]
% No navigation symbols in handout or trans mode
\only<handout| trans>{\setbeamertemplate{navigation symbols}{}}


%--------------------------------------------------------------------
%--- Headline and footline
%--------------------------------------------------------------------
% Slide number as default cartouche
\def\mj@cartouche{%
  %\newcommand*\handoutname{handout}
  \hskip3em\ifmj@numbering\llap{\insertframenumber{}\,/\,\inserttotalframenumber}\fi\quad%
  %\ifx\beamer@currentmode\handoutname\else
    \usebeamertemplate***{navigation symbols}
  %\fi%
  \hskip4.5em\rlap{\insertdate}}

\defbeamertemplate*{headline}{technicolor theme}{}
\defbeamertemplate*{footline}{technicolor theme}{%
  \vbox to\z@{\vss%
    \beamer@tempdim=\paperwidth
    \advance\beamer@tempdim by -\beamer@leftmargin
    \advance\beamer@tempdim by -73pt %59.5 + 7 + 13.5
    \hskip\beamer@leftmargin%
      \vbox to\z@{\vskip1pt%
        \begin{beamercolorbox}[wd=\beamer@tempdim,ht=2.25ex,dp=1ex]{structure}
          \Tiny\mj@cartouche
        \end{beamercolorbox}\vss}\par
    \hskip\beamer@leftmargin%
      \hbox to\beamer@tempdim{\usebeamercolor[fg]{footline}{\rule{\beamer@tempdim}{.67pt}}}%
    \vskip13.4pt}}

\defbeamertemplate*{sidebar right}{technicolor theme}{%
  \vfill%
  \llap{\insertlogo\hskip7pt}%
  \vskip5pt}


\mode<all>