There was an even bigger flaw in the code.
Edited the first post so it has the new updated code and a fixed example script.

Sometimes it is so easy to overlook things that totally screw up your script. \:\/
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.