I just posted some code for a task scheduler on the playground the other day, you may want to take a peek, maybe you can adapt it to your needs.
The Arduino's processor is inherently single-threaded and cannot multi-task. As has been mentioned there are however ways to create the illusion of multi-tasking. Annonomus Penguin hit on those pretty well.
Also check out TimerOne (It's probably better ;)