This document (PDF) will probably answer your questions (and then some).