function EmailUnobsfuscate() {
	
	// find all links in HTML
	var link = document.getElementsByTagName && document.getElementsByTagName("a");
	var email, e;
	
	// examine all links
	for (e = 0; link && e < link.length; e++) {
	
		// does the link have use a class named "welly"
		if ((" "+link[e].className+" ").indexOf(" welly ") >= 0) {
		
			// get the obfuscated email address
			welly = link[e].firstChild.nodeValue.toLowerCase() || "";
			
			// transform into real welly address
			welly = welly.replace(/dot/ig, ".");
			welly = welly.replace(/\(at\)/ig, "@");
			welly = welly.replace(/\s/g, "");
			
			// is welly valid?
			if (/^[^@]+@[a-z0-9]+([_\.\-]{0,1}[a-z0-9]+)*([\.]{1}[a-z0-9]+)+$/.test(welly)) {
			
				// change into a real mailto link
				link[e].href = "mailto:" + welly;
				link[e].firstChild.nodeValue = welly;
		
			}
		}
	}
}


window.onload = EmailUnobsfuscate;
