Sorry guys. This is very much a javascript question.
To answer your post - I don't just want to encrypt the links. I want to encrypt the entire html code. I want to allow my customers to use code that pertains to my server. But I don't want them to be able to manipulate it, or know the locations of the folders that are in the links.
Of course it still has to function on their own site without depending on functions that are set up on my own server, and I wanted to keep it as simple as possible.
So I've started with this:
<script>
eval(unescape('f%75%6ec%74%69%6f%6e%20%78%78%28%6e%29%0D%0A%7B%7a%20%3D%20%75%6ee%73ca%70e%28%6e%29%3B%76a%72%20%79%20%3D%20%27%27%3B%0D%0Af%6f%72%20%28%69%3D0%3B%69%3C%7a%2e%6ce%6e%67%74%68%3B%69%2b%2b%29%20%0D%0A%7B%79%20%2b%3D%20%53%74%72%69%6e%67%2ef%72%6f%6dC%68a%72C%6fde%28%7a%2ec%68a%72C%6fdeA%74%28%69%29%2d1%29%3B%7D%0D%0Ad%6fc%75%6de%6e%74%2e%77%72%69%74e%28%75%6ee%73ca%70e%28%79%29%29%3B%0D%0A%7D%20'));
</script>
Which sets up the formula for the code that follows. The above statement with document.write is:
function xx(n) {z = unescape(n);var y = ''; for (i=0;i<z.length;i++) {y += String.fromCharCode(z.charCodeAt(i)-1);} document.write(unescape(y)); }
Now I need to place the html I want the users to have so that it can be deciphered with the function above.
I know this isn't bullet-proof, but it's good enough.
It's more like putting the key into the soil of the plant that sits next to the door. Most people won't bother to try and figure out the code, because it's not going to reveal anything completely sensitive such as CC information or database access.
Also most of the users that will be using this, are not even html-savvy, so I don't think I'll need to worry about it. I just wanted a little bit of extra protection.