//******************************************
//            MailHelp functions
//               www.usjf.com
//  (c) United States Judo Federation, 2010
//******************************************

// JavaScript Document

function calcAddress(name, organization, type) {
	var output = name + "&#64;" + organization + "&#46;";
	if (type == "c")
		output = output + "com";
	else if (type == "e")
		output = output + "edu";
	else if (type == "o")
		output = output + "org";
	else if (type == "n")
		output = output + "net";
	else 
		output = output + type;
	return output;
}

function buildAddress(name, organization, type, caption) {
	var address = calcAddress(name, organization, type);
	document.write("<a href=\"&#109;&#97;&#105;&#108;&#116;&#111;&#58;");
	document.write(address);
	document.write("\">");
	if (caption == "")
		document.write(address);
	else
		document.write(caption);
	document.write("</a>");
}

