Also that is some rather messy coding matey you may want to clean up there are a few validation errors and it could be laid out better to make it easyer to read and edit.
Your also using and invalid doc type too, these are the correct ones.
Linky link