Let's take a look at the original code.
<script>document.write('<a target="_blank" href="YOURFORMLINK&referrer='+document.URL+'"'+'>Tell a Friend</a>');</script>
It's not the tidiest or most useable code in the world, nor is it the fastest. Let's put this through jsbeautifier -- an invaluable resource -- and see how it looks. We'll put it back to being a one-liner at the end.
<script>
document.write('Tell a Friend');