﻿function SetEmail(id) {
	var object = this.GetObjectById(id);

	if (object != null) {
		var mail = this.GetEmailPrefix() + "@" + this.GetEmailSuffix();
		object.innerHTML = '<a href="mailto:' + mail + '" title="Email schreiben">' + mail + '</a>';
	}
}

function SetEmailInfo(id) {
	var object = this.GetObjectById(id);

	if (object != null) {
		object.innerHTML = "<a href=\"javascript: void(0);\" onclick=\"javascript:SetEmail('email');\" title=\"Email anzeigen\">Klicken um anzuzeigen</a>";
	}
}

function GetObjectById(id)
{
    if (document.getElementById) { return document.getElementById(id); }
    else if (document.all) { return document.all[id]; }
    else if (document.layers) { return document.layers[id]; }
    else { return null; }
}

function GetEmailPrefix() {
    return "i" + "nf" + "o";
}

function GetEmailSuffix() {
    return "einr" + "ichtung-s" + "chuster" + ".de";
}
