Seperate header or footer
Design and Skin Customization
Start by putting a {debug} in the footer.tpl. When viewed you'll get a popup of all the smarty parameters available to you in this template. Have a look through them to see what is unique to the pages you want to test for. Check the $_post array to start with. You can then include those variables in your if statement -
{if $_post.xxxx == 'whatever'}
Code
{elseif $_post.xxxx == 'something_else'}
Different Code
{/if}
Hope that helps
--edit--
adjusting code typo from = to ==
= is an assigning operator
== is a comparison checker