Bug 1082936 - STK messages are seen overlapping each other

Repeating the same code ... move to a function.