made headers and footers generate from the same code.

This also added the CSS from Sales ...