i can't understand how it fits in with the rest of the code from that.
i'd have a better idea of what you're trying to do if you post the full code.