function noSpam() {
	var link = noSpam.arguments[0]; // text for the link
	var subject = noSpam.arguments[1]; // if there's a subject line to the message
	var pre = noSpam.arguments[2];  // number of segments before the @

	var myat = String.fromCharCode(64);   // @
	var mydot = String.fromCharCode(46);  // .
	var addr = '';

	// starting from the third argument,
	// read the segments and build the address:
	var i;
	for (i = 3; i < noSpam.arguments.length; i++) {
		if (addr) {
			// check whether this element (any but the first)
			// comes after the @ or a dot:
			addr += (i == pre + 2) ? myat : mydot;
		}
		addr += noSpam.arguments[i];
	}

	var str = '';
	if (link) {
		// you could break this down further so that
		// the 'mailto' is less apparent:
		str = '<a href="mailto:' + addr;
		
		if (subject) {
			// code to display the subject
			str += '?subject=' + subject;
		}
		
		str += '">';

		// if the first argument was literally 'addr', the text for the link
		// is the address itself, otherwise it's the text of the argument:
		str += (link == 'addr') ? addr : link;
		
		str += '<\/a>';  // close the tag
	}
	else {
		// if the first argument is '' just print the address
		// without making it a link at all:
		str = addr;
	}

	document.write (str);
}

