@stras :- Thanks for your advice.

I have no more idea as it was a favour asked by a friend to just make him understand this chunk of code. But I was not able to understand as I don't know as2 so thought may be u people could just make it clear.

Thanks anyways