function formatDateKeyword() {
    var s = document.getElementById("dateKeyword");
    if (s) {
        for (var i=0; i<s.childNodes.length; i++) {
            c = s.childNodes[i];
            if (c.nodeValue) {
                now = c.nodeValue;
                now = now.replace(/\$Date:.*\(.*,\s+(.*)\).*\$/, "$1");
                c.nodeValue = now;
            }
        }
    }
}

function getElementsByClass(cls, node, tag) {
    var els = new Array();
    var nodes = node.getElementsByTagName(tag);
    cls = " " + cls + " ";

    var i, j;
    for (i=0, j=0; i<nodes.length; i++) {
        if ((" " + nodes[i].className + " ").indexOf(cls) != -1) {
            els[j++] = nodes[i];
        }
    }

    return els;
}

function insertEmail() {
    var e = "ch";
    var a = "rscrsne.o";
    var b = "i@hiuklcm";
    var i;

    for (i=0; i<a.length; i++) {
        e = e + a[i] + b[i];
    }
 
    var els = getElementsByClass("insertemail", document, "*");
    for (i=0; i<els.length; i++) {
        els[i].appendChild(document.createTextNode(e));
    }
}

function onPageLoad() {
    formatDateKeyword();
    insertEmail();
}
    

