
function addMailTo(elementId, attributeName, name, nonsense, domain, addText) {
	var element = document.getElementById(elementId);
	if (element == null) throw "Couldn't add mailto to element: no element with id "+elementId;
	var defaultDomain = 'wl.co.nz';
	if (domain == null) domain = defaultDomain;
	var email = name+'@'+domain;
	element[attributeName] = 'mailto:'+email;
	if (addText) element.innerHTML = email;
}