Not going to help until 3 things happen....

1) You wrap that up in code tags to preserve indenting,
2) You tell us what the errors are, and
3) You give some indication of *where* the errors are since we don't want to have to count line numbers.