I'm having some issues statting out a badger Animal Companion for a 6th level Ranger in D&D 3.5 Can anyone provide step by step instructions that I can follow whenever I create an animal companion?

Specifically, I'm looking for things like:
<br />
1. Take the HD from the basic animal in the Monster Manual, then add additional HD based on the half the Ranger's level. These HD also add to Str...
<br />
2. Figure BAB based on....

For some reason, these rules always throw me for a loop and I always miss something.