Influence of thermal fluctuations on an underdamped Josephson tunnel junction