I edited the code to put the syntax highlighting syntax. Reading http://www.go4expert.com/showthread.php?t=168 will help you.

Also regarding your query it looks like you are looking for a solution but did not mention where exactly the problem you are facing or what is the nature of the problem. Please clarify on this so that we can help you in this regard.