So you know for the future, please note, you should use the Scripting forum for general scripting questions here.
Also, the forums provide the ability to post code using code-tags so we can easily refer to it by line-number, against error messages which contain line numbers etc.
Thanks.