You may remember a few posts ago, I was being all about working with people who just want a prototype, etc.. Well, after reading some Dilbert, I've taken it apon myself to snow them under with paperwork. Then when they complain that it doesn't do what they want, I will retort with "well it was in the specification that way...".
Anyway, here are a couple of templates that I have found, the first one has proven fairly useful in the past in opening discussion about an application. The second, I haven't tested yet, but it all seems to be there.
Software Requirement Specification
Software Design Document
ps. I hate documentation, but it is easy to do while my brain is as fried as it is.