href="www.theirsite.com" is a relative URL.
href="http://www.theirsite.com" is an absoloute URL.
A relative URL gets appended onto the $SERVER_NAME, which is what is happening to you. If you specify the absolute URL, the link will not get appended onto the $SERVER_NAME. That should solve your problem.
Brett