I am not really a coder... so can't help you there.. but you might want to post that question separately.. as it is really a new question and belongs in the programming forum.

And then please mark this thread as Solved.