function getMail() {
    // Some trivial obfuscation to foil spammers
    //             0       1       2      3      4     5      6    7
    var parts = ["ori", "micro", "gur",  "el", "soft", "com", "@", "."];
    var partorder = [0, 2, 3, 6, 1, 4, 7, 5];

    var str = "";
    for (part in partorder) {
        str += parts[partorder[part]];
    }
    return str;
}

function getMailURI() {
   return "mailto:"+ getMail();
}

function mailMe(obj) {
    obj.href = getMailURI();
    return true;
}

function showMail() {
    document.write(getMail());
}

function replaceMail(id) {
	var oldEmailNode = document.getElementById(id);
	var newEmailNode = document.createTextNode(getMail());
	oldEmailNode.parentNode.replaceChild(newEmailNode,oldEmailNode);
} 

function toggleDisp(id) {
	var vis = document.getElementById(id).style.display;
	if (vis == "block") {
		document.getElementById(id).style.display = "none";
	} else {
	document.getElementById(id).style.display = "block";
	}
}
