Ставить в низ
<script type="text/javascript">
var a = document.getElementsByTagName("a")for( i=0; i<a.length; i++ )
{
if( a[i].href.indexOf("http://" + document.domain + "/click.php?http://") != -1 )
{
a[i].href = "http://" + a[i].href.substring(a[i].href.lastIndexOf("http://")+7)
}
}
</script>