@tiancar : Please check out this thread for how to post code on the forums, for future reference : Using code tags properly