kg4wsv has the right suggestion.
What's happening is that normally in C/C++, functions must be declared (with a single line giving their name, return type and arguments as in kg4wsv's post) before they're used. The actual definition of the function (i.e. its code) can then come later, but the compiler (which turns your sketch into a binary file for the microcontroller on the Arduino board) needs to know the name and type of function before you call it.
The Arduino environment attempts to automatically generate those function declarations for you by looking for the functions you define in your sketch and silently inserting the declarations before passing the code to the compiler. Unfortunately, this detection of your functions doesn't work perfectly, and seems to miss functions whose return type has multiple words (like "unsigned int"). I've added this to the bug list: https://developer.berlios.de/bugs/?func=detailbug&bug_id=11447&group_id=3590
, but in the meantime, you can follow kg4wsv's suggestion and creating the function declarations yourself, you can put the the function above the places where you call it, or you can change it to return an int.