// +-----------------+
// | Les traductions |
// +-----------------+

// Copyright Frank Milard - http://www.asaisir.com/a-la-page
// Vous pouvez utiliser ou modifier ce script librement
// sous reserve de laisser le copyright visible
// Last modified by Yann-Gael Gueheneuc, 10/22/00.

// IE4      = (document.all)    ? 1 : 0;
// NS4      = (document.layers) ? 1 : 0;
// VERSION4 = (IE4 | NS4)       ? 1 : 0;

if (!(document.all || document.layers)) {
    event = null;
}

function helpDown () {
    if (document.all) {
        // MSIE4
        document.all.helpBox.style.visibility = "hidden";
    } else {
        // NS4
        document.helpBox.visibility = "hidden";
    }
}

function helpOver (event, text) {
    if (!(document.all || document.layers)) {
        return;
    }

    var ptrObj, ptrLayer;
    if (document.all) {
        // MSIE4
        ptrObj = event.srcElement;
        ptrLayer = document.all.helpBox;
    } else {
        // NS4
        ptrObj = event.target;
        ptrLayer = document.helpBox;
    }
    if (!ptrObj.onmouseout) {
        ptrObj.onmouseout = helpDown;
    }

    var mouseX, mouseY;
    if (document.all) {
        // MSIE4
        mouseX = window.event.clientX + document.body.scrollLeft;
        mouseY = window.event.clientY + document.body.scrollTop;
    }
    else {
        // NS4
        mouseX = event.pageX;
        mouseY = event.pageY;
    }

    var str = "<DIV CLASS='helpBoxDIV'>" + text + "</DIV>";
    if (document.all) {
        // MSIE4
        ptrLayer.innerHTML = str;
        ptrLayer.style.left = mouseX + 20;
        ptrLayer.style.top  = mouseY + 20;
        ptrLayer.style.visibility = "visible";
    } else {
        // NS4
        ptrLayer.document.write(str);
        ptrLayer.document.close();
        ptrLayer.left = mouseX + 20;
        ptrLayer.top  = mouseY + 20;
        ptrLayer.visibility = "show";
    }
}

function helpOverPlus (event, frenchText, englishText, germanText, portugueseText, russianText) {
    var newText = "";
    if (frenchText != "") {
        newText += "<IMG WIDTH='18' HEIGHT='12' SRC='/Images/FlagFrance.gif' BORDER='0'></IMG>&#160;" + frenchText;
    }
    if (englishText != "") {
        if (newText != "") {
            newText += "<BR>";
        }
        newText += "<IMG WIDTH='18' HEIGHT='12' SRC='/Images/FlagUnitedKingdom.gif' BORDER='0'></IMG>&#160;" + englishText;
    }
    if (germanText != "") {
        if (newText != "") {
            newText += "<BR>";
        }
        newText += "<IMG WIDTH='18' HEIGHT='12' SRC='/Images/FlagGermany.gif' BORDER='0'></IMG>&#160;" + germanText;
    }
    if (portugueseText != "") {
        if (newText != "") {
            newText += "<BR>";
        }
        newText += "<IMG WIDTH='18' HEIGHT='12' SRC='/Images/FlagBrazil.gif' BORDER='0'></IMG>&#160;" + portugueseText;
    }
    if (russianText != "") {
        if (newText != "") {
            newText += "<BR>";
        }
        newText += "<IMG WIDTH='18' HEIGHT='12' SRC='/Images/FlagRussia.gif' BORDER='0'></IMG>&#160;<FONT FACE='ER Bukinist 1251'>" + russianText + "</FONT>";
    }

    helpOver (
        event,
        newText
    );
}

function changeContent(language) {
    if (this.location.href.indexOf('?') == -1) {
        this.location = this.location.href.split("?language=")[0] + "?language=" + language;
    }
    else {
        if (this.location.href.indexOf('?language') > -1) {
            this.location = this.location.href.split("?language=")[0] + "?language=" + language;
        }
        else {
            this.location = this.location.href.split("&language=")[0] + "&language=" + language;
        }
    }
}
