Please use code tags, explained in the link below, when posting code. It makes it far easier on us to find problems when we can actually read the code someone has posted. Additionally this really belongs in the Scripting section of the forums.