Edit 5th and 6th line, replace ad.php and ad.gif to whatever link and image you want to use:
HTML Code:
<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="left"><img src="$stylevar[imgdir_misc]/logo.gif" border="0" alt="" /></td>
<td align="right"><a href="ad.php"><img src="ad.gif" border="0" alt="" /></a></td>
</tr>
</table>