Awesome! Thanks for the help everyone!
By the way, if you want to display your Adsense ads in multiplie locations, like say on the 1st and 5th post in a topic, you can modify your function code as follows:
if($spTopicView->currentPost==1 OR $spTopicView->currentPost==5){ //display if 1st or 5th post
if (function_exists('show_ad')) show_ad();
}
Keep in mind that Adsense only allows 3 ads per page. So maybe you could modify even further for 1st, 5th, and 10th post. Or you could create separate functions for 3 different ad sizes and place them in 3 distinct locations (header, post1, and footer).
Thanks again for this post. It helped me find the right locations to place my ad code!