Continuity - minimum and maximum

Hi. I'd really appreciate any help you can give me on this.

If $\displaystyle f: \Re \to \Re $ is a continuous, periodic function, then prove $\displaystyle f $ has a maximum and minimum.

================================================== =======

A periodic function is where if you have any K>0, then for all $\displaystyle x \in \Re $, $\displaystyle f(x + K) = f(x) $. And we need to show that a set $\displaystyle S = \{ f(x) | x \in \Re \} $ has a maximum and minimum.

I'm thinking that we need to show it is bounded first of all. But I have no idea how I could do that. I'm just jotting down some thoughts, so I don't know whether they are relevant.

$\displaystyle | f(x+K) - f(x) | = 0 < \epsilon $ for all $\displaystyle \epsilon > 0 $

This question in the textbook is under the section of the "The extreme value theorem" so I think that must be relavent.

Please help. (Doh)

Regards,

Joel.