// Script by Stephen Wettone - http://wettone.com/code/emailhiding
//
// The parameters are as follows:
//
// name		: The username part of the email, which comes before the @ symbol.
// domain	: The part of the email which comes after the @ symbol.
// desc 	: The description for the link. This is the clickable part. If this is not specified, then the email address will be shown.
// pre 		: Optional text to appear before the clickable link.
// post 	: Optional text to appear after the clickable link.

function makelink( name, domain, desc, pre, post ) {
    if ( pre != null && pre != "" )
        document.write( pre );
    
    document.write( '<a href="mailto:' );
    document.write( name + '&#64;' );
    document.write( domain + '">' );
    
    if ( desc != null && desc != "" )
        document.write( desc )
    else
        document.write( name + '&#64;' + domain );
    
    document.write( '</a>' );
    
    if ( post != null && post != "" )
        document.write( post );
}