﻿// Obscures a text email address from spam-bots
function Obscure( account, domain, suffix )
{
 // Build the addr and return the text
 string = account + "@" + domain + "." + suffix;
 return( string );
}

// Obscures a mail link from spam-bots ( subject parameter is optional)
function ObscureLink( account, domain, suffix, linkText, subject )
{
 // Be a little sneaky about making a link - this is the lame
 // part - but it can't hurt...
 string = "<";
 string += "a ";
 string += "hr";
 string += "ef";
 string += "=\"";
 string += "ma";
 string += "il";
 string += "to:"

 // Add the address
 string += Obscure( account, domain, suffix );

 // Do a subject if one was provided
 if (null != subject)
 {
    string += "?sub";
    string += "ject=";
    string += subject;
 }
 // close the link start
 string += "\">";

 // Add the link text
 string += linkText;

 // And finish the link
 string += "</"
 string += "a>";

 return( string );
}