\ProvidesPackage{beamerthemeprogressbar}[2007/06/21]

% Beamer theme by Sylvain Bouveret <sylvain[dot]bouveret[aT]cert[DoT]fr>
% jun. 2010 version 0.41
%
% based on the LaTeX-Beamer package :
% Copyright 2003 by Till Tantau <tantau@users.sourceforge.net>
%
% This program can be redistributed and/or modified under the terms
% of the GNU Public License, version 2.

\RequirePackage{tikz}
\RequirePackage{bibunits}


\usecolortheme{progressbar}
\useinnertheme{progressbar}
\usefonttheme{progressbar}
\useoutertheme{progressbar}

\setbeamertemplate{navigation symbols}{}

\AtBeginDocument{%
  \typeout{..................................................................}
  \typeout{You are using the progressbar beamer theme (Sylvain B.)}
  \typeout{Version: 0.41 June 2010.}
  \typeout{..................................................................}
}

\renewcommand{\appendix}[1][0void0]
{
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
  % This piece of code is supposed to introduce a bias in the
  % number of slides
  \makeatletter
  \immediate\write\@auxout{\string\@writefile{nav}%
    {\noexpand\headcommand{\noexpand\def\noexpand\insertintermediateframenumber{\the\c@framenumber}}}}
  \renewcommand{\insertintermediateframenumber}{\inserttotalframenumber}
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
  
  \def\tmparg{#1}
  \def\tmpargref{0void0}
  \ifx\tmparg\tmpargref\else
  \begin{frame}[plain]
    \vfill
    \begin{center}
      \usebeamerfont{title}\usebeamercolor{title}{\color{fg}\ #1\ }
    \end{center}
    \vfill
  \end{frame}
  \fi
  \makeatother
}
