

// EXAMPLES:

// compose('clientcare','appleboxdesign','com', false, false)						// use email as display text, no subject

// compose('clientcare','appleboxdesign','com', 'Client Care', 'Online Inquiry')	// display text provided, subject provided



function compose(address, domain, ext, display, subject) {

	var recipient = address+'&#64;'+domain+'.'+ext;	// Compose email address

	if (!display) {display = recipient;}			// If nothing to display, use email address

	if (subject) {									// If subject is provided, add subject to recipient address

		recipient += "?subject="+subject.replace(/ /g, "%20");

	}

	document.write('<a href="'+'ma'+'il'+'to:'+recipient+'">'+display+'</a>');	// Write link

}