There are major errors in this that prevent it from being approved. Here are some of them:
The code is very bad and needs to be cleaned up. I suggest you go to scripting help.
If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.