//     Copyright © 2006 Patricia Jacquat. Tous droits réservés.

function decode(encoded) {
    var decoded = Base64.decode(encoded);
    document.write("<a href=\"mai" + "lto:" + decoded + "\">" + decoded + "</a>");
}

function startParagraph() {
    document.write("<p>");
}

function finishParagraph() {
    document.write("</p>");
}

function xhtmlParagraph(parentId) {
    var paragraph = document.createElement("p");
    document.getElementById(parentId).appendChild(paragraph);
    return paragraph;
}

function xhtmlDecode(parent, encoded) {
    var decoded = Base64.decode(encoded);
    var link = document.createElement("a");
    link.setAttribute("href", "mai" + "lto:" + decoded);
    xhtmlText(link, decoded);
    parent.appendChild(link);
}

function xhtmlText(parent, value) {
    parent.appendChild(document.createTextNode(value));
}
