function Translation() {
    function writeLang(lang) {
        /* write the list of the avalaible languages */
        if (lang == "de") {
            var langLabel = new Array("Deutsch", "Französisch", "Englisch");
        } else if (lang == "fr") {
            var langLabel = new Array("Allemand", "Français", "Anglais");
        } else if (lang == "en") {
            var langLabel = new Array("German", "French", "English");
        } else {
            var langLabel = new Array("Lang problem");
        }
        var langList = new Array("de", "fr", "en");
        for (var i = 0; i < langLabel.length; i++)
            if (lang != langList[i]) {
                link = document.URL.slice(document.URL.lastIndexOf("/") + 1, document.URL.length);
                link = (link == "" ? "index.html" : link);
                langLabel[i] = "<a href=\""+link+"\" onClick=\"document.cookie = 'lang="+langList[i]+"';\">"+langLabel[i]+"</a>";
        }
        document.writeln("<p class=\"navigation_sprache\">"+langLabel.join(" | ")+"</p>");
    }

    function writeMenu(lang) {
        /* write the menu in the right language */
        if (lang == "fr") {
            menuLabel = new Array("Home", "Enseignement", "Recherche", "Publications", "Collection", "Events", "Equipe", "Structure", "Liens");
            adresse = new Array("Département d'Études Bibliques", "Université de Fribourg", "Miséricorde", "CH-1700 Fribourg", "Tel. +41 (0)26 300 7390", "Fax +41 (0)26 300 9754");
        } else if (lang == "en") {
            menuLabel = new Array("Home", "Teaching", "Research", "Publications", "Collection", "Events", "People", "Structure", "Links");
            adresse = new Array("Department of Biblical Studies", "University of Fribourg", "Miséricorde", "CH-1700 Fribourg", "Tel. +41 (0)26 300 7390", "Fax +41 (0)26 300 9754");
        } else {
            lang = "";
        }
        
        if (lang) {
            if (DHTML) {
                for (i = 0; i < menuLabel.length; i++) {
                    if (i < 9) j = "0"+(i+1);
                    else j = i+1;
                    if (NS) setCont("id", "menu_item_"+j, null, menuLabel[i]);
                    else setCont("id", "menu_item_"+j, null, menuLabel[i]);
                }
                for (i = 0; i < adresse.length; i++) {
                    if (i < 9) j = "0"+(i+1);
                    else j = i+1;
                    if (NS) setCont("id", "menu_adresse_"+j, null, adresse[i]);
                    else setCont("id", "menu_adresse_"+j, null, adresse[i]);
                }
            }
        }
    }

    function writeNavigationUni(lang) {
        if (lang == "fr") {
            value = "Université de Fribourg";
        } else if (lang == "en") {
            value = "University of Fribourg";
        } else {
            value = "Universität Freiburg";
        }
        if (NS) setCont("id", "navigation_uni", null, value);
        else setCont("id", "navigation_uni", null, value);
    }

    function writeNavigationTheo(lang) {
        if (lang == "fr") {
            value = "Faculté de Théologie";
        } else if (lang == "en") {
            value = "Faculty of Theology";
        } else {
            value = "Theologische Fakultät";
        }
        if (NS) setCont("id", "navigation_theo", null, value);
        else setCont("id", "navigation_theo", null, value);
    }

    function writeHeadingDepartment(lang) {
        if (lang == "fr") {
            value = "Département d'Études Bibliques";
        } else if (lang == "en") {
            value = "Department of Biblical Studies";
        } else {
            value = "Departement für Biblische Studien";
        }
        if (NS) setCont("id", "heading_department", null, value);
        else setCont("id", "heading_department", null, value);
    }

    function writeTranslation(id, lang, translation) {
        if (NS) setCont("id", id, null, translation[lang]);
        else setCont("id", id, null, translation[lang]);
    }

    this.writeLang = writeLang;
    this.writeMenu = writeMenu;
    this.writeNavigationUni = writeNavigationUni;
    this.writeNavigationTheo = writeNavigationTheo;
    this.writeHeadingDepartment = writeHeadingDepartment;
    this.writeTranslation = writeTranslation;


}
