Corion, i used your code because i couldn't understand the replies given my holli and swamy_rio. I am able to understand your code better than mine and others. That's why i posted that. Since you advised me not to use if else constructs in my code, i didn't use that. The only solution i got is from your reply. So please forgive me if anything wrong done to you. Thanks.

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other