It might be too late if someone has already claimed this, but we do have a specific thread for this over in the dedicated TCG section:
http://www.pokecommunity.com/showthread.php?t=322342
I will now edit the code out of your post here and suggest that you post it there instead!