I recommend reading JFP Announcement (which should have beend read before posting), in particular the code formatting section...I have edited your post to format the lengthy code you posted.

To...