//////////////////////////////////////////////////////////////////////////
//                                                                       /
//                          The Caml Web Site                            /
//                                                                       /
//          Vincent Simonet, projet Cristal, INRIA Rocquencourt          /
//                                                                       /
//     Copyright 2004 Institut National de Recherche en Informatique     /
//     et en Automatique.  All rights reserved.                          /
//                                                                       /
//////////////////////////////////////////////////////////////////////////

function showcontent (url) {
    window._content.location = url;
}

function caml_antispam() {
    var elements = document.getElementsByTagName("a");
    for (var i=0; i < elements.length; i++) {
        var element = elements.item(i);
        if (element.className == "email") {
            var address = "";
            var childs = element.childNodes;
            for ( var j = 0; j < childs.length; j++) {
                var child = childs.item(j);
                if (child.nodeType == 3)
                    { address += child.nodeValue }
                else { 
                    switch(child.getAttribute("alt")) {
                    case "at sign":             
                        address+="@";
                        break;
                    case "dot sign":
                        address+=".";
                        break;
                    }
                };
                element.removeChild(child);
                j--;
            };
            var newText = document.createTextNode(address);
            element.appendChild(newText);
            element.setAttribute("href", "mailto:" + address);
        }
    }
}


function caml_onload() {
    caml_antispam();
}
