% Written by Pasi Eronen (pe at iki dot fi) for T-110.551 spring 2004
% Changes for Spring 2005 made by Nadja Kasinskaja, 2005-01-12
% Changes for Spring 2006 made by Sanna Liimatainen, 2006-01-12

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{iwork2006}[2005/01/12 TKK T-110.5190 Seminar on Internetworking]

% Basic stuff
\LoadClass[10pt,twocolumn,a4paper]{article}
\RequirePackage{times}
\RequirePackage[T1]{fontenc}
\RequirePackage[dvips]{graphicx}

% Adjust margins
\addtolength{\textwidth}{14mm}
\addtolength{\hoffset}{-7mm}
\addtolength{\textheight}{45mm}
\addtolength{\voffset}{-18mm}

% Abbreviated bibliography style
\bibliographystyle{abbrv}

% Set headers and footers (depending on "cameraready" option)
\RequirePackage{fancyhdr}
\newif\if@cameraready
\@camerareadyfalse
\DeclareOption{cameraready}{\@camerareadytrue}
\ProcessOptions

%isodate from manuals of University of Oulu, time removed
%http://www.oulu.fi/atkk/tkpalv/unix/isodate.html
%referred 2004-02-18
%added and dates in the document changed by Nadja Kasinskaja

\newcommand{\twodigits}[1]{\ifnum #1<10 0\fi \number#1}

\newcommand{\isodate}{%
  \the\year-\twodigits{\month}-\twodigits{\day}}

%endof isodate

\pagestyle{fancyplain}
\addtolength{\headsep}{-10pt}
\fancyhead{}
\fancyfoot{}
\fancyhead[LO]{\fancyplain{}{TKK T-110.5190 Seminar on Internetworking}}
\if@cameraready
  \fancyhead[RO]{\fancyplain{}{2006-05-4/5}}
\else
  \fancyhead[RO]{\fancyplain{}
                 %%{Draft {\number\day}.{\number\month}.{\number\year}}}
                 {Draft \isodate}}    
  \fancyfoot[CO]{\thepage}
\fi
\date{}
