var merl = {};
merl.defaultDomain = 'rooseveltdads';
merl.defaultDomainSfx = 'com';

/* Scrambles an e-mail address to avoid webbots from finding name@domains.com
   on a page.

   Arguments:
	toAddr1		is part 1 of the user name of the e-mail address.
			toAddr1 is 'added' to toAddr2 to make up 
			the name portion of the email address as in
			name@domain.com; for example toAddr2=pitt
			and toAddr1=brad, the generated email name
			would be bradpitt@domain.com
	toAddr2		is the user name of the e-mail address
			toAddr1 is 'added' to toAddr2 to make up 
			the name portion of the email address as in
			name@domain.com; for example toAddr2=pitt
			and toAddr1=brad, the generated email name
			would be bradpitt@domain.com
    altName 	is the name that will be displayed in the link if you
    			do not want the name of the e-mail address to show up
			in the page.
    altDomain	is the domain name of the e-mail addr.  null means
    			default which is drewwatersmusic.com; otherwise
			if altName=yahoo.com, the address would be 
			name@yahoo.com.  If provided, altDomain must be
			a complete domain name such as 'yahoo.com' or 
			'gmail.com'

	In total, by example:

	hideMail('ian', 'br', '', 'merl.us')
		==> address: brian@merl.us
		    displayed name: brian

	hideMail('cko', 'ja')
		==> address: jacko@drewwatersmusic.com
		    displayed name: jacko

	hideMail('cko', 'ja', 'Michael Jackson')
		==> address: jacko@drewwatersmusic.com
		    displayed name: Michael Jackson

	hideMail('cko', 'ja', 'Michael Jackson', 'hotmail.com')
		==> address: jacko@hotmail.com
		    displayed name: Michael Jackson
*/

function hideMail(toAddr2, toAddr1, altName, altDomain) {
	var vars = [
	merl.defaultDomain, 
	'.', 
	'to', 
	'<a href=\'', 
	merl.defaultDomainSfx, 
	'mail', 
	'@', 
	'>', 
	'</a', 
	'\'', 
	':'
	];
	toAddr2 = toAddr2 || '';
	toAddr1 = toAddr1 || '';
	altDomain = altDomain || vars[0]+vars[1]+vars[4];
	altName = altName || toAddr1+toAddr2;
	var str = vars[3] + vars[5] + vars[2] + vars[10] + toAddr1 + toAddr2 + vars[6] + altDomain + vars[9] + vars[7]  + altName + vars[8] + vars[7];
	document.write(str);
}

