// USITC common javascript library
// This file contains JavaScript methods that can be used on any page of the USITC website.

// void: displayContactLabel 
// Descriprtion: Writes obfuscated JS to create mail to link.
// INPUTS:	 
//	label: the label of the link
// 	contactPrefix: the name of the account
// 	host: the smtp host
 
function  displayContactLabel(label, contactPrefix, host) 
{
	if 	((label != null && label != "") && 
				(contactPrefix != null && contactPrefix != "") &&
				(host != null && host != ""))
	{
		// We have all values		
	 	document.write("<a  href=\"" + "&#109;&#97;&#105;&#108;" + "&#116;&#111;:" + contactPrefix + "&#64;" + host+ "\">" + label + "</a>");
	} else if ((label != null && label != "") && 
							(contactPrefix == null || contactPrefix == "") && 
							(host == null || host == "")) 
	{
		// We only have a label
	 	document.write(label);
	} else {
		// do othing	
	} 	
}




