Please edit your first post here (DON'T add another one!) and, as the forum rules require, enclose your code inside "CODE" tags. Without it, the code is almost unreadable and not very usable for testing your code and helping you.
Use the small pencil button
below your post to edit it, select the code section and press the <CODE/> button, then save it.
Thanks.