	var fleXenv = {
    fleXlist: [],
    fleXcrollInit: function () {
        if (document.getElementById) {
            document.write('<style type="text/css">.flexcroll-hide-default {overflow: hidden !important;}</style>')
        };
        this.addTrggr(window, 'load', this.globalInit)
    },
    fleXcrollMain: function (g) {
        var h = document,
            wD = window,
            nV = navigator;
        if (!h.getElementById || !h.createElement) return;
        if (typeof(g) == 'string') g = document.getElementById(g);
        if (g == null || nV.userAgent.indexOf('OmniWeb') != -1 || ((nV.userAgent.indexOf('AppleWebKit') != -1 || nV.userAgent.indexOf('Safari') != -1) && !(typeof(HTMLElement) != "undefined" && HTMLElement.prototype)) || nV.vendor == 'KDE' || (nV.platform.indexOf('Mac') != -1 && nV.userAgent.indexOf('MSIE') != -1)) {
            if (g != null) classChange(g, 'flexcroll-failed', 'flexcroll-hide-default');
            if (window.onfleXcrollFail) window.onfleXcrollFail(g);
            return
        };
        if (g.fleXcroll) {
            g.fleXcroll.updateScrollBars();
            return
        };
        if (fleXenv.checkHidden(g)) return;
        if (!g.id || g.id == '') {
            var k = "flex__",
                c = 1;
            while (document.getElementById(k + c) != null) {
                c++
            };
            g.id = k + c
        }
        g.fleXdata = new Object();
        g.fleXcroll = new Object();
        var l = g.id,
            sC = g.fleXdata,
            sfU = g.fleXcroll;
        sC.keyAct = {
            _37: ['-1s', 0],
            _38: [0, '-1s'],
            _39: ['1s', 0],
            _40: [0, '1s'],
            _33: [0, '-1p'],
            _34: [0, '1p'],
            _36: [0, '-100p'],
            _35: [0, '+100p']
        };
        sC.wheelAct = ["-2s", "2s"];
        sC.baseAct = ["-2s", "2s"];
        sC.scrollPosition = [
            [false, false],
            [false, false]
        ];
        var m = createDiv('contentwrapper', true),
            mDv = createDiv('mcontentwrapper', true),
            tDv = createDiv('scrollwrapper', true),
            pDv = createDiv('copyholder', true);
        var o = createDiv('domfixdiv', true),
            fDv = createDiv('zoomdetectdiv', true),
            stdMode = false;
        pDv.sY.border = '1px solid blue';
        pDv.fHide();
        g.style.overflow = 'hidden';
        fDv.sY.fontSize = "12px";
        fDv.sY.height = "1em";
        fDv.sY.width = "1em";
        fDv.sY.position = "absolute";
        fDv.sY.zIndex = "-999";
        fDv.fHide();
        var p = g.offsetHeight,
            brdWidth = g.offsetWidth;
        copyStyles(g, pDv, '0px', ['border-left-width', 'border-right-width', 'border-top-width', 'border-bottom-width']);
        var q = g.offsetHeight,
            intlWidth = g.offsetWidth,
            brdWidthLoss = brdWidth - intlWidth,
            brdHeightLoss = p - q;
        var s = (g.scrollTop) ? g.scrollTop : 0,
            oScrollX = (g.scrollLeft) ? g.scrollLeft : 0;
        var t = document.location.href,
            uReg = /#([^#.]*)$/;
        var u = ['textarea', 'input', 'select'];
        sC.scroller = [];
        sC.forcedBar = [];
        sC.containerSize = sC.cntRSize = [];
        sC.contentSize = sC.cntSize = [];
        sC.edge = [false, false];
        sC.touchPrevent = false;
        sC.touchFlick = false;
        sC.reqS = [];
        sC.barSpace = [0, 0];
        sC.forcedHide = [];
        sC.forcedPos = [];
        sC.paddings = [];
        sC.externaL = [false, false];
        sC.touchPos = [0, 0];
        while (g.firstChild) {
            m.appendChild(g.firstChild)
        };
        m.appendChild(o);
        g.appendChild(mDv);
        g.appendChild(pDv);
        var w = getStyle(g, 'position');
        if (w != 'absolute' && w != 'fixed') {
            g.style.position = w = "relative"
        };
        if (w == 'fixed') g.style.position = "absolute";
        var x = getStyle(g, 'text-align');
        g.style.textAlign = 'left';
        mDv.sY.width = "100px";
        mDv.sY.height = "100px";
        mDv.sY.top = "0px";
        mDv.sY.left = "0px";
        copyStyles(g, pDv, "0px", ['padding-left', 'padding-top', 'padding-right', 'padding-bottom']);
        var y = g.offsetWidth,
            postHeight = g.offsetHeight,
            mHeight;
        mHeight = mDv.offsetHeight;
        mDv.sY.borderBottom = "2px solid black";
        if (mDv.offsetHeight > mHeight) stdMode = true;
        mDv.sY.borderBottomWidth = "0px";
        copyStyles(pDv, g, false, ['padding-left', 'padding-top', 'padding-right', 'padding-bottom']);
        findPos(mDv);
        findPos(g);
        sC.paddings[0] = mDv.yPos - g.yPos;
        sC.paddings[2] = mDv.xPos - g.xPos;
        g.style.paddingTop = getStyle(g, "padding-bottom");
        g.style.paddingLeft = getStyle(g, "padding-right");
        findPos(mDv);
        findPos(g);
        sC.paddings[1] = mDv.yPos - g.yPos;
        sC.paddings[3] = mDv.xPos - g.xPos;
        g.style.paddingTop = getStyle(pDv, "padding-top");
        g.style.paddingLeft = getStyle(pDv, "padding-left");
        var z = sC.paddings[2] + sC.paddings[3],
            padHeightComp = sC.paddings[0] + sC.paddings[1];
        g.style.position = w;
        mDv.style.textAlign = x;
        copyStyles(g, mDv, false, ['padding-left', 'padding-right', 'padding-top', 'padding-bottom']);
        tDv.sY.width = g.offsetWidth + 'px';
        tDv.sY.height = g.offsetHeight + 'px';
        mDv.sY.width = y + 'px';
        mDv.sY.height = postHeight + 'px';
        tDv.sY.position = 'absolute';
        tDv.sY.top = '0px';
        tDv.sY.left = '0px';
        sC.tDivZ = tDv.sY.zIndex;
        mDv.appendChild(m);
        g.appendChild(tDv);
        tDv.appendChild(fDv);
        m.sY.position = 'relative';
        mDv.sY.position = 'relative';
        m.sY.top = "0";
        m.sY.width = "100%";
        mDv.sY.overflow = 'hidden';
        mDv.sY.left = "-" + sC.paddings[2] + "px";
        mDv.sY.top = "-" + sC.paddings[0] + "px";
        sC.zTHeight = fDv.offsetHeight;
        sC.getContentWidth = function () {
            var a = m.childNodes,
                maxCWidth = compPad = 0;
            for (var i = 0; i < a.length; i++) {
                if (a[i].offsetWidth) {
                    maxCWidth = Math.max(a[i].offsetWidth, maxCWidth)
                }
            };
            sC.cntRSize[0] = ((sC.reqS[1] && !sC.forcedHide[1]) || sC.forcedBar[1]) ? g.offsetWidth - sC.barSpace[0] : g.offsetWidth;
            sC.cntSize[0] = maxCWidth + z;
            return sC.cntSize[0]
        };
        sC.getContentHeight = function () {
            sC.cntRSize[1] = ((sC.reqS[0] && !sC.forcedHide[0]) || sC.forcedBar[0]) ? g.offsetHeight - sC.barSpace[1] : g.offsetHeight;
            sC.cntSize[1] = m.offsetHeight + padHeightComp - 2;
            return sC.cntSize[1]
        };
        sC.fixIEDispBug = function () {
            m.sY.display = 'none';
            m.sY.display = 'block'
        };
        sC.setWidth = function () {
            mDv.sY.width = (stdMode) ? (sC.cntRSize[0] - z - brdWidthLoss) + 'px' : sC.cntRSize[0] + 'px'
        };
        sC.setHeight = function () {
            mDv.sY.height = (stdMode) ? (sC.cntRSize[1] - padHeightComp - brdHeightLoss) + 'px' : sC.cntRSize[1] + 'px'
        };
        sC.createScrollBars = function () {
            sC.getContentWidth();
            sC.getContentHeight();
            tDv.vrt = new Array();
            var a = tDv.vrt;
            createScrollBars(a, 'vscroller', 1);
            a.barPadding = [parseInt(getStyle(a.sBr, 'padding-top')), parseInt(getStyle(a.sBr, 'padding-bottom'))];
            a.sBr.sY.padding = '0px';
            a.sBr.curPos = 0;
            a.sBr.vertical = true;
            a.sBr.indx = 1;
            m.vBar = a.sBr;
            prepareScroll(a, 0);
            sC.barSpace[0] = (sC.externaL[1]) ? 0 : a.sDv.offsetWidth;
            sC.setWidth();
            tDv.hrz = new Array();
            var b = tDv.hrz;
            createScrollBars(b, 'hscroller', 0);
            b.barPadding = [parseInt(getStyle(b.sBr, 'padding-left')), parseInt(getStyle(b.sBr, 'padding-right'))];
            b.sBr.sY.padding = '0px';
            b.sBr.curPos = 0;
            b.sBr.vertical = false;
            b.sBr.indx = 0;
            m.hBar = b.sBr;
            if (wD.opera) b.sBr.sY.position = 'relative';
            prepareScroll(b, 0);
            sC.barSpace[1] = (sC.externaL[0]) ? 0 : b.sDv.offsetHeight;
            sC.setHeight();
            tDv.sY.height = g.offsetHeight + 'px';
            b.jBox = createDiv('scrollerjogbox');
            tDv.appendChild(b.jBox);
            b.jBox.onmousedown = function () {
                b.sBr.scrollBoth = true;
                sC.goScroll = b.sBr;
                b.sBr.clicked = true;
                b.sBr.moved = false;
                tDv.vrt.sBr.moved = false;
                fleXenv.addTrggr(h, 'selectstart', retFalse);
                fleXenv.addTrggr(h, 'mousemove', mMoveBar);
                fleXenv.addTrggr(h, 'mouseup', mMouseUp);
                return false
            }
        };
        sC.goScroll = null;
        sC.createScrollBars();
        this.putAway(o, tDv);
        if (!this.addChckTrggr(g, 'mousewheel', mWheelProc) || !this.addChckTrggr(g, 'DOMMouseScroll', mWheelProc)) {
            g.onmousewheel = mWheelProc
        };
        this.addChckTrggr(g, 'mousewheel', mWheelProc);
        this.addChckTrggr(g, 'DOMMouseScroll', mWheelProc);
        this.addChckTrggr(m, 'touchstart', handleTouch);
        this.addChckTrggr(tDv, 'touchstart', handleTouch);
        g.setAttribute('tabIndex', '0');
        this.addTrggr(g, 'keydown', function (e) {
            if (g.focusProtect) return;
            if (!e) {
                var e = wD.event
            };
            var a = e.keyCode;
            sC.pkeY = a;
            sfU.mDPosFix();
            if (sC.keyAct['_' + a] && !window.opera) {
                sfU.setScrollPos(sC.keyAct['_' + a][0], sC.keyAct['_' + a][1], true);
                if (e.preventDefault) e.preventDefault();
                return false
            }
        });
        this.addTrggr(g, 'keypress', function (e) {
            if (g.focusProtect) return;
            if (!e) {
                var e = wD.event
            };
            var a = e.keyCode;
            if (sC.keyAct['_' + a]) {
                sfU.setScrollPos(sC.keyAct['_' + a][0], sC.keyAct['_' + a][1], true);
                if (e.preventDefault) e.preventDefault();
                return false
            }
        });
        this.addTrggr(g, 'keyup', function () {
            sC.pkeY = false
        });
        this.addTrggr(h, 'mouseup', intClear);
        this.addTrggr(g, 'mousedown', handleTextSelect);

        function handleTextSelect(e) {
            if (!e) e = wD.event;
            var a = (e.target) ? e.target : (e.srcElement) ? e.srcElement : false;
            if (!a || (a.className && a.className.match(RegExp("\\bscrollgeneric\\b")))) return;
            sC.inMposX = e.clientX;
            sC.inMposY = e.clientY;
            pageScrolled();
            findPos(g);
            intClear();
            fleXenv.addTrggr(h, 'mousemove', tSelectMouse);
            sC.mTBox = [g.xPos + 10, g.xPos + sC.cntRSize[0] - 10, g.yPos + 10, g.yPos + sC.cntRSize[1] - 10]
        };

        function tSelectMouse(e) {
            if (!e) e = wD.event;
            var a = e.clientX,
                mY = e.clientY,
                mdX = a + sC.xScrld,
                mdY = mY + sC.yScrld;
            sC.mOnXEdge = (mdX < sC.mTBox[0] || mdX > sC.mTBox[1]) ? 1 : 0;
            sC.mOnYEdge = (mdY < sC.mTBox[2] || mdY > sC.mTBox[3]) ? 1 : 0;
            sC.xAw = a - sC.inMposX;
            sC.yAw = mY - sC.inMposY;
            sC.sXdir = (sC.xAw > 40) ? 1 : (sC.xAw < -40) ? -1 : 0;
            sC.sYdir = (sC.yAw > 40) ? 1 : (sC.yAw < -40) ? -1 : 0;
            if ((sC.sXdir != 0 || sC.sYdir != 0) && !sC.tSelectFunc) sC.tSelectFunc = wD.setInterval(function () {
                if (sC.sXdir == 0 && sC.sYdir == 0) {
                    wD.clearInterval(sC.tSelectFunc);
                    sC.tSelectFunc = false;
                    return
                };
                pageScrolled();
                if (sC.mOnXEdge == 1 || sC.mOnYEdge == 1) sfU.setScrollPos((sC.sXdir * sC.mOnXEdge) + "s", (sC.sYdir * sC.mOnYEdge) + "s", true)
            }, 45)
        };

        function intClear() {
            fleXenv.remTrggr(h, 'mousemove', tSelectMouse);
            if (sC.tSelectFunc) wD.clearInterval(sC.tSelectFunc);
            sC.tSelectFunc = false;
            if (sC.barClickRetard) wD.clearTimeout(sC.barClickRetard);
            if (sC.barClickScroll) wD.clearInterval(sC.barClickScroll)
        };

        function flickClear(a) {
            if (sC.touchFlick) {
                window.clearInterval(sC.touchFlick);
                sC.touchFlick = false
            }
            if (!a) tDv.sY.zIndex = sC.tDivZ
        };

        function pageScrolled() {
            sC.xScrld = (wD.pageXOffset) ? wD.pageXOffset : (h.documentElement && h.documentElement.scrollLeft) ? h.documentElement.scrollLeft : 0;
            sC.yScrld = (wD.pageYOffset) ? wD.pageYOffset : (h.documentElement && h.documentElement.scrollTop) ? h.documentElement.scrollTop : 0
        };
        sfU.formUpdate = function () {
            for (var j = 0, inputName; inputName = u[j]; j++) {
                var a = g.getElementsByTagName(inputName);
                for (var i = 0, formItem; formItem = a[i]; i++) {
                    if (!formItem.fleXprocess) {
                        fleXenv.addTrggr(formItem, 'focus', function () {
                            g.focusProtect = true
                        });
                        fleXenv.addTrggr(formItem, 'blur', onblur = function () {
                            g.focusProtect = false
                        });
                        formItem.fleXprocess = true
                    }
                }
            }
        };
        g.scrollUpdate = sfU.updateScrollBars = function (a) {
            if (tDv.getSize[1]() === 0 || tDv.getSize[0]() === 0) return;
            m.sY.padding = '1px';
            var b = sC.reqS[0],
                reqV = sC.reqS[1],
                vBr = tDv.vrt,
                hBr = tDv.hrz,
                vUpReq, hUpReq, cPSize = [];
            tDv.sY.width = g.offsetWidth - brdWidthLoss + 'px';
            tDv.sY.height = g.offsetHeight - brdHeightLoss + 'px';
            cPSize[0] = sC.cntRSize[0];
            cPSize[1] = sC.cntRSize[1];
            sC.reqS[0] = sC.getContentWidth() > sC.cntRSize[0];
            sC.reqS[1] = sC.getContentHeight() > sC.cntRSize[1];
            var c = (b != sC.reqS[0] || reqV != sC.reqS[1] || cPSize[0] != sC.cntRSize[0] || cPSize[1] != sC.cntRSize[1]) ? true : false;
            vBr.sDv.setVisibility(sC.reqS[1]);
            hBr.sDv.setVisibility(sC.reqS[0]);
            vUpReq = (sC.reqS[1] || sC.forcedBar[1]);
            hUpReq = (sC.reqS[0] || sC.forcedBar[0]);
            sC.getContentWidth();
            sC.getContentHeight();
            sC.setHeight();
            sC.setWidth();
            if (!sC.reqS[0] || !sC.reqS[1] || sC.forcedHide[0] || sC.forcedHide[1]) hBr.jBox.fHide();
            else hBr.jBox.fShow();
            if (vUpReq) updateScroll(vBr, (hUpReq && !sC.forcedHide[0]) ? sC.barSpace[1] : 0);
            else m.sY.top = "0";
            if (hUpReq) updateScroll(hBr, (vUpReq && !sC.forcedHide[1]) ? sC.barSpace[0] : 0);
            else m.sY.left = "0";
            if (c && !a) sfU.updateScrollBars(true);
            m.sY.padding = '0px';
            sC.edge[0] = sC.edge[1] = false
        };
        g.contentScroll = sfU.setScrollPos = function (a, b, c, d) {
            var e;
            if ((a || a === 0) && sC.scroller[0]) {
                a = calcCScrollVal(a, 0);
                e = tDv.hrz.sBr;
                e.trgtScrll = (c) ? Math.min(Math.max(e.mxScroll, e.trgtScrll - a), 0) : -a;
                e.realScrollPos()
            }
            if ((b || b === 0) && sC.scroller[1]) {
                b = calcCScrollVal(b, 1);
                e = tDv.vrt.sBr;
                e.trgtScrll = (c) ? Math.min(Math.max(e.mxScroll, e.trgtScrll - b), 0) : -b;
                e.realScrollPos()
            }
            if (!c) sC.edge[0] = sC.edge[1] = false;
            if (g.onfleXcroll && !d) g.onfleXcroll();
            return sC.scrollPosition
        };
        sfU.scrollContent = function (a, b) {
            return sfU.setScrollPos(a, b, true)
        };
        sfU.scrollToElement = function (a) {
            if (a == null || !isddvChild(a)) return;
            var b = findRCpos(a);
            sfU.setScrollPos(b[0] + sC.paddings[2], b[1] + sC.paddings[0], false);
            sfU.setScrollPos(0, 0, true)
        };
        copyStyles(pDv, g, '0px', ['border-left-width', 'border-right-width', 'border-top-width', 'border-bottom-width']);
        this.putAway(pDv, tDv);
        g.scrollTop = 0;
        g.scrollLeft = 0;
        sfU.formUpdate();
        this.fleXlist[this.fleXlist.length] = g;
        classChange(g, 'flexcrollactive', false);
        sfU.updateScrollBars();
        sfU.setScrollPos(oScrollX, s, true);
        if (t.match(uReg)) {
            sfU.scrollToElement(h.getElementById(t.match(uReg)[1]))
        };
        sC.sizeChangeDetect = wD.setInterval(function () {
            var n = fDv.offsetHeight;
            if (n != sC.zTHeight) {
                sfU.updateScrollBars();
                sC.zTHeight = n
            }
        }, 2500);

        function calcCScrollVal(v, i) {
            var a = v.toString();
            v = parseFloat(a);
            return parseInt((a.match(/p$/)) ? v * sC.cntRSize[i] * 0.9 : (a.match(/s$/)) ? v * sC.cntRSize[i] * 0.1 : v)
        };

        function getStyle(a, b) {
            return fleXenv.getStyle(a, b)
        };

        function copyStyles(a, b, c, d) {
            var e = new Array();
            for (var i = 0; i < d.length; i++) {
                e[i] = fleXenv.camelConv(d[i]);
                b.style[e[i]] = getStyle(a, d[i], e[i]);
                if (c) a.style[e[i]] = c
            }
        };

        function createDiv(b, c, d, e) {
            var f = (d) ? d : h.createElement('div');
            if (!d) {
                f.id = l + '_' + b;
                f.className = (c) ? b : b + ' scrollgeneric'
            };
            f.getSize = [function () {
                return f.offsetWidth
            }, function () {
                return f.offsetHeight
            }];
            f.setSize = (e) ? [retFalse, retFalse] : [function (a) {
                f.sY.width = a
            }, function (a) {
                f.sY.height = a
            }];
            f.getPos = [function () {
                return getStyle(f, "left")
            }, function () {
                return getStyle(f, "top")
            }];
            f.setPos = (e) ? [retFalse, retFalse] : [function (a) {
                f.sY.left = a
            }, function (a) {
                f.sY.top = a
            }];
            f.fHide = function () {
                f.sY.visibility = "hidden"
            };
            f.fShow = function (a) {
                f.sY.visibility = (a) ? getStyle(a, 'visibility') : "visible"
            };
            f.sY = f.style;
            return f
        };

        function createScrollBars(a, b, c) {
            var d = document.getElementById(l + '-flexcroll-' + b);
            var e = (d != null) ? true : false;
            if (e) {
                a.sDv = createDiv(false, false, d, true);
                sC.externaL[c] = true;
                a.sFDv = createDiv(b + 'basebeg');
                a.sSDv = createDiv(b + 'baseend');
                a.sBr = createDiv(false, false, fleXenv.getByClassName(d, 'div', 'flexcroll-scrollbar')[0]);
                a.sFBr = createDiv(b + 'barbeg');
                a.sSBr = createDiv(b + 'barend')
            } else {
                a.sDv = createDiv(b + 'base');
                a.sFDv = createDiv(b + 'basebeg');
                a.sSDv = createDiv(b + 'baseend');
                a.sBr = createDiv(b + 'bar');
                a.sFBr = createDiv(b + 'barbeg');
                a.sSBr = createDiv(b + 'barend');
                tDv.appendChild(a.sDv);
                a.sDv.appendChild(a.sBr);
                a.sDv.appendChild(a.sFDv);
                a.sDv.appendChild(a.sSDv);
                a.sBr.appendChild(a.sFBr);
                a.sBr.appendChild(a.sSBr)
            }
        };

        function prepareScroll(b, c) {
            var d = b.sDv,
                sBr = b.sBr,
                i = sBr.indx;
            sBr.trgtScrll = 0;
            sBr.minPos = b.barPadding[0];
            sBr.ofstParent = d;
            sBr.mDv = mDv;
            sBr.scrlTrgt = m;
            sBr.targetSkew = 0;
            updateScroll(b, c, true);
            sBr.doBarPos = function (a) {
                if (!a) sBr.curPos = parseInt((sBr.trgtScrll * sBr.maxPos) / sBr.mxScroll);
                sBr.curPos = (Math.min(Math.max(sBr.curPos, 0), sBr.maxPos));
                sBr.setPos[i](sBr.curPos + sBr.minPos + "px");
                if (!sBr.targetSkew) sBr.targetSkew = sBr.trgtScrll - parseInt((sBr.curPos / sBr.sRange) * sBr.mxScroll);
                sBr.targetSkew = (sBr.curPos == 0) ? 0 : (sBr.curPos == sBr.maxPos) ? 0 : (!sBr.targetSkew) ? 0 : sBr.targetSkew;
                if (a) {
                    sBr.trgtScrll = parseInt((sBr.curPos / sBr.sRange) * sBr.mxScroll);
                    m.setPos[i](sBr.trgtScrll + sBr.targetSkew + "px");
                    sC.scrollPosition[i] = [-sBr.trgtScrll - sBr.targetSkew, -sBr.mxScroll]
                }
            };
            sBr.realScrollPos = function () {
                sBr.curPos = parseInt((sBr.trgtScrll * sBr.sRange) / sBr.mxScroll);
                sBr.curPos = (Math.min(Math.max(sBr.curPos, 0), sBr.maxPos));
                m.setPos[i](sBr.trgtScrll + "px");
                sC.scrollPosition[i] = [-sBr.trgtScrll, -sBr.mxScroll];
                sBr.targetSkew = false;
                sBr.doBarPos(false)
            };
            sC.barZ = getStyle(sBr, 'z-index');
            sBr.sY.zIndex = (sC.barZ == "auto" || sC.barZ == "0" || sC.barZ == 'normal') ? 2 : sC.barZ;
            mDv.sY.zIndex = getStyle(sBr, 'z-index');
            sBr.onmousedown = function () {
                sBr.clicked = true;
                sC.goScroll = sBr;
                sBr.scrollBoth = false;
                sBr.moved = false;
                fleXenv.addTrggr(h, 'selectstart', retFalse);
                fleXenv.addTrggr(h, 'mousemove', mMoveBar);
                fleXenv.addTrggr(h, 'mouseup', mMouseUp);
                return false
            };
            sBr.onmouseover = intClear;
            d.onmousedown = d.ondblclick = function (e) {
                if (!e) {
                    var e = wD.event
                };
                if (e.target && (e.target == b.sFBr || e.target == b.sSBr || e.target == b.sBr)) return;
                if (e.srcElement && (e.srcElement == b.sFBr || e.srcElement == b.sSBr || e.srcElement == b.sBr)) return;
                var a, mV = [];
                pageScrolled();
                sfU.mDPosFix();
                findPos(sBr);
                a = (sBr.vertical) ? e.clientY + sC.yScrld - sBr.yPos : e.clientX + sC.xScrld - sBr.xPos;
                mV[sBr.indx] = (a < 0) ? sC.baseAct[0] : sC.baseAct[1];
                mV[1 - sBr.indx] = 0;
                sfU.setScrollPos(mV[0], mV[1], true);
                if (e.type != "dblclick") {
                    intClear();
                    sC.barClickRetard = wD.setTimeout(function () {
                        sC.barClickScroll = wD.setInterval(function () {
                            sfU.setScrollPos(mV[0], mV[1], true)
                        }, 80)
                    }, 425)
                };
                return false
            };
            d.setVisibility = function (r) {
                if (r) {
                    d.fShow(g);
                    sC.forcedHide[i] = (getStyle(d, "visibility") == "hidden" || sC.externaL[i]) ? true : false;
                    if (!sC.forcedHide[i]) sBr.fShow(g);
                    else if (!sC.externaL[i]) sBr.fHide();
                    sC.scroller[i] = true;
                    classChange(d, "", "flexinactive")
                } else {
                    d.fHide();
                    sBr.fHide();
                    sC.forcedBar[i] = (getStyle(d, "visibility") != "hidden") ? true : false;
                    sC.scroller[i] = false;
                    sBr.curPos = 0;
                    m.setPos[i]('0px');
                    sC.scrollPosition[i] = [false, false];
                    classChange(d, "flexinactive", "")
                };
                mDv.setPos[1 - i]((sC.forcedPos[i] && (r || sC.forcedBar[i]) && !sC.forcedHide[i]) ? sC.barSpace[1 - i] - sC.paddings[i * 2] + "px" : "-" + sC.paddings[i * 2] + "px")
            };
            d.onmouseclick = retFalse
        };

        function updateScroll(a, b, c) {
            var d = a.sDv,
                sBr = a.sBr,
                sFDv = a.sFDv,
                sFBr = a.sFBr,
                sSDv = a.sSDv,
                sSBr = a.sSBr,
                i = sBr.indx;
            d.setSize[i](tDv.getSize[i]() - b + 'px');
            d.setPos[1 - i](tDv.getSize[1 - i]() - d.getSize[1 - i]() + 'px');
            sC.forcedPos[i] = (parseInt(d.getPos[1 - i]()) === 0) ? true : false;
            a.padLoss = a.barPadding[0] + a.barPadding[1];
            a.baseProp = parseInt((d.getSize[i]() - a.padLoss) * 0.75);
            sBr.aSize = Math.min(Math.max(Math.min(parseInt(sC.cntRSize[i] / sC.cntSize[i] * d.getSize[i]()), a.baseProp), 45), a.baseProp);
            sBr.setSize[i](sBr.aSize + 'px');
            sBr.maxPos = d.getSize[i]() - sBr.getSize[i]() - a.padLoss;
            sBr.curPos = Math.min(Math.max(0, sBr.curPos), sBr.maxPos);
            sBr.setPos[i](sBr.curPos + sBr.minPos + 'px');
            sBr.mxScroll = mDv.getSize[i]() - sC.cntSize[i];
            sBr.sRange = sBr.maxPos;
            sFDv.setSize[i](d.getSize[i]() - sSDv.getSize[i]() + 'px');
            sFBr.setSize[i](sBr.getSize[i]() - sSBr.getSize[i]() + 'px');
            sSBr.setPos[i](sBr.getSize[i]() - sSBr.getSize[i]() + 'px');
            sSDv.setPos[i](d.getSize[i]() - sSDv.getSize[i]() + 'px');
            if (!c) sBr.realScrollPos();
            sC.fixIEDispBug()
        };
        sfU.mDPosFix = function () {
            mDv.scrollTop = 0;
            mDv.scrollLeft = 0;
            g.scrollTop = 0;
            g.scrollLeft = 0
        };
        this.addTrggr(wD, 'load', function () {
            if (g.fleXcroll) sfU.updateScrollBars()
        });
        this.addTrggr(wD, 'resize', function () {
            if (g.refreshTimeout) wD.clearTimeout(g.refreshTimeout);
            g.refreshTimeout = wD.setTimeout(function () {
                if (g.fleXcroll) sfU.updateScrollBars()
            }, 80)
        });

        function retFalse() {
            return false
        };

        function mMoveBar(e) {
            if (!e) {
                var e = wD.event
            };
            var a = sC.goScroll,
                movBr, maxx, xScroll, yScroll;
            if (a == null) return;
            if (!fleXenv.w3events && !e.button) mMouseUp();
            maxx = (a.scrollBoth) ? 2 : 1;
            for (var i = 0; i < maxx; i++) {
                movBr = (i == 1) ? a.scrlTrgt.vBar : a;
                if (a.clicked) {
                    if (!movBr.moved) {
                        sfU.mDPosFix();
                        findPos(movBr);
                        findPos(movBr.ofstParent);
                        movBr.pointerOffsetY = e.clientY - movBr.yPos;
                        movBr.pointerOffsetX = e.clientX - movBr.xPos;
                        movBr.inCurPos = movBr.curPos;
                        movBr.moved = true
                    };
                    movBr.curPos = (movBr.vertical) ? e.clientY - movBr.pointerOffsetY - movBr.ofstParent.yPos - movBr.minPos : e.clientX - movBr.pointerOffsetX - movBr.ofstParent.xPos - movBr.minPos;
                    if (a.scrollBoth) movBr.curPos = movBr.curPos + (movBr.curPos - movBr.inCurPos);
                    movBr.doBarPos(true);
                    if (g.onfleXcroll) g.onfleXcroll()
                } else movBr.moved = false
            }
        };

        function mMouseUp() {
            if (sC.goScroll != null) {
                sC.goScroll.clicked = false;
                sC.goScroll.trgtScrll += sC.goScroll.targetSkew
            }
            sC.goScroll = null;
            fleXenv.remTrggr(h, 'selectstart', retFalse);
            fleXenv.remTrggr(h, 'mousemove', mMoveBar);
            fleXenv.remTrggr(h, 'mouseup', mMouseUp)
        };

        function handleTouch(e) {
            if (!e) e = wD.event;
            if (this == tDv) tDv.sY.zIndex = sC.tDivZ;
            if (e.targetTouches.length != 1 || (!sC.scroller[0] && !sC.scroller[1])) return false;
            var a = '',
                touchLink = (e.target && (e.target.href || (e.target.nodeType == 3 && e.target.parentNode.href))) ? true : false;
            sC.touchPos = [e.targetTouches[0].clientX, e.targetTouches[0].clientY];
            flickClear();
            fleXenv.addChckTrggr(g, 'touchmove', handleTouchMove);
            fleXenv.addChckTrggr(g, 'touchend', handleTouchEnd);
            sC.touchBar = (e.target && e.target.id && e.target.id.match(/_[vh]scrollerba[rs]e?/)) ? true : false;
            return false
        };

        function handleTouchMove(e) {
            if (!e) e = wD.event;
            if (e.targetTouches.length != 1) return false;
            fleXenv.remTrggr(g, 'mousedown', handleTextSelect);
            var a = [e.targetTouches[0].clientX, e.targetTouches[0].clientY];
            sC.touchPrevent = true;
            sC.moveDelta = [sC.touchPos[0] - a[0], sC.touchPos[1] - a[1]];
            if (sC.touchBar) {
                sC.moveDelta[0] *= -(sC.cntSize[0] / sC.cntRSize[0]);
                sC.moveDelta[1] *= -(sC.cntSize[1] / sC.cntRSize[1])
            };
            sfU.scrollContent(sC.moveDelta[0], sC.moveDelta[1]);
            sC.touchPos[0] = a[0];
            sC.touchPos[1] = a[1];
            for (var i = 0; i < 2; i++) {
                if (sC.moveDelta[i] !== 0 && sC.scroller[i] && (sC.moveDelta[1 - i] == 0 || !sC.scroller[1 - i])) {
                    if ((sC.moveDelta[i] > 0 && sC.scrollPosition[i][1] == sC.scrollPosition[i][0]) || (sC.moveDelta[i] < 0 && sC.scrollPosition[i][0] == 0)) sC.touchPrevent = false
                };
                if (!sC.scroller[i] && sC.moveDelta[1 - i] !== 0 && Math.abs(sC.moveDelta[i] / sC.moveDelta[1 - i]) > 1.1) sC.touchPrevent = false
            };
            if (sC.touchPrevent) {
                e.preventDefault();
                tDv.sY.zIndex = '9999'
            } else {
                tDv.sY.zIndex = sC.tDivZ
            }
        };

        function handleTouchEnd(e) {
            if (!e) e = wD.event;
            e.preventDefault();
            if (e.targetTouches.length > 0) return false;
            fleXenv.remTrggr(g, 'touchmove', handleTouchMove);
            fleXenv.remTrggr(g, 'touchend', handleTouchEnd);
            if ((sC.scroller[0] && Math.abs(sC.moveDelta[0]) > 6) || (sC.scroller[1] && Math.abs(sC.moveDelta[1]) > 6)) {
                var a = 0;
                flickClear(true);
                sC.touchFlick = window.setInterval(function () {
                    sfU.scrollContent(easeInOut(sC.moveDelta[0], 0, 10, a, 0.3), easeInOut(sC.moveDelta[1], 0, 10, a, 0.3));
                    a++;
                    if (a > 10) flickClear()
                }, 100)
            }
        };

        function mWheelProc(e) {
            if (!e) e = wD.event;
            if (!this.fleXcroll) return;
            var a = this,
                vEdge, hEdge, hoverH = false,
                delta = 0,
                iNDx;
            sfU.mDPosFix();
            hElem = (e.target) ? e.target : (e.srcElement) ? e.srcElement : this;
            if (hElem.id && hElem.id.match(/_hscroller/)) hoverH = true;
            if (e.wheelDelta) delta = -e.wheelDelta;
            if (e.detail) delta = e.detail;
            delta = (delta < 0) ? -1 : +1;
            iNDx = (delta < 0) ? 0 : 1;
            sC.edge[1 - iNDx] = false;
            if ((sC.edge[iNDx] && !hoverH) || (!sC.scroller[0] && !sC.scroller[1])) return;
            if (sC.scroller[1] && !hoverH) scrollState = sfU.setScrollPos(false, sC.wheelAct[iNDx], true);
            vEdge = !sC.scroller[1] || hoverH || (sC.scroller[1] && ((scrollState[1][0] == scrollState[1][1] && delta > 0) || (scrollState[1][0] == 0 && delta < 0)));
            if (sC.scroller[0] && (!sC.scroller[1] || hoverH)) scrollState = sfU.setScrollPos(sC.wheelAct[iNDx], false, true);
            hEdge = !sC.scroller[0] || (sC.scroller[0] && sC.scroller[1] && vEdge && !hoverH) || (sC.scroller[0] && ((scrollState[0][0] == scrollState[0][1] && delta > 0) || (scrollState[0][0] == 0 && delta < 0)));
            if (vEdge && hEdge && !hoverH) sC.edge[iNDx] = true;
            else sC.edge[iNDx] = false;
            if (e.preventDefault) e.preventDefault();
            return false
        };

        function isddvChild(a) {
            while (a.parentNode) {
                a = a.parentNode;
                if (a == g) return true
            }
            return false
        };

        function findPos(a) {
            var b = a,
                curleft = curtop = 0;
            if (b.offsetParent) {
                while (b) {
                    curleft += b.offsetLeft;
                    curtop += b.offsetTop;
                    b = b.offsetParent
                }
            } else if (b.x) {
                curleft += b.x;
                curtop += b.y
            };
            a.xPos = curleft;
            a.yPos = curtop
        };

        function findRCpos(a) {
            var b = a;
            curleft = curtop = 0;
            while (!b.offsetHeight && b.parentNode && b != m && getStyle(b, 'display') == "inline") {
                b = b.parentNode
            };
            if (b.offsetParent) {
                while (b != m) {
                    curleft += b.offsetLeft;
                    curtop += b.offsetTop;
                    b = b.offsetParent
                }
            };
            return [curleft, curtop]
        };

        function classChange(a, b, c) {
            fleXenv.classChange(a, b, c)
        };

        function easeInOut(a, b, c, d, e) {
            c = Math.max(c, 1);
            var f = b - a,
                stepp = a + (Math.pow(((1 / c) * d), e) * f);
            return (stepp > 0) ? Math.floor(stepp) : Math.ceil(stepp)
        }
    },
    globalInit: function () {
        if (fleXenv.catchFastInit) window.clearInterval(fleXenv.catchFastInit);
        fleXenv.prepAnchors();
        fleXenv.initByClass();
        if (window.onfleXcrollRun) window.onfleXcrollRun()
    },
    classChange: function (a, b, c) {
        if (!a.className) a.className = '';
        var d = a.className;
        if (b && !d.match(RegExp("(^|\\s)" + b + "($|\\s)"))) d = d.replace(/(\S$)/, '$1 ') + b;
        if (c) d = d.replace(RegExp("((^|\\s)+" + c + ")+($|\\s)", "g"), '$2').replace(/\s$/, '');
        a.className = d
    },
    prepAnchors: function () {
        var d = /#([^#.]*)$/,
            urlExt = /(.*)#.*$/,
            regExer = /(^|\s)flexcroll-in-page-link($|\s)/,
            matcH, claSS, i, anchoR, anchorList = document.getElementsByTagName("a"),
            urlBase = document.location.href;
        if (urlBase.match(urlExt)) urlBase = urlBase.match(urlExt)[1];
        for (i = 0; anchoR = anchorList[i]; i++) {
            claSS = (anchoR.className) ? anchoR.className : '';
            if (anchoR.href && !anchoR.fleXanchor && anchoR.href.match(d) && ((anchoR.href.match(urlExt) && urlBase === anchoR.href.match(urlExt)[1]) || claSS.match(regExer))) {
                anchoR.fleXanchor = true;
                fleXenv.addTrggr(anchoR, 'click', function (e) {
                    if (!e) e = window.event;
                    var a = (e.srcElement) ? e.srcElement : this;
                    while (!a.fleXanchor && a.parentNode) {
                        a = a.parentNode
                    };
                    if (!a.fleXanchor) return;
                    var b = document.getElementById(a.href.match(d)[1]),
                        eScroll = false;
                    if (b == null) b = (b = document.getElementsByName(a.href.match(d)[1])[0]) ? b : null;
                    if (b != null) {
                        var c = b;
                        while (c.parentNode) {
                            c = c.parentNode;
                            if (c.fleXcroll) {
                                c.fleXcroll.scrollToElement(b);
                                eScroll = c
                            }
                        };
                        if (eScroll) {
                            if (e.preventDefault) e.preventDefault();
                            document.location.href = urlBase + "#" + a.href.match(d)[1];
                            eScroll.fleXcroll.mDPosFix();
                            return false
                        }
                    }
                })
            }
        }
    },
    initByClass: function (a) {
        fleXenv.initialized = true;
        var b = fleXenv.getByClassName(document.getElementsByTagName("body")[0], "div", (a) ? a : 'flexcroll');
        for (var i = 0, tgDiv; tgDiv = b[i]; i++) if (!tgDiv.fleXcroll) fleXenv.fleXcrollMain(tgDiv)
    },
    scrollTo: function (a, b) {
        if (typeof(a) == 'string') a = document.getElementById(a);
        if (a == null) return false;
        var c = a;
        while (c.parentNode) {
            c = c.parentNode;
            if (c.fleXcroll) {
                if (b) {
                    document.location.href = "#" + b
                };
                c.fleXcroll.scrollToElement(a);
                c.fleXcroll.mDPosFix();
                return true
            }
        };
        return false
    },
    updateScrollBars: function (a, b) {
        for (var i = 0, fleXdiv; fleXdiv = fleXenv.fleXlist[i]; i++) {
            fleXdiv.fleXcroll.updateScrollBars();
            if (b) fleXdiv.fleXcroll.formUpdate()
        };
        if (a) fleXenv.prepAnchors()
    },
    camelConv: function (a) {
        var a = a.split('-'),
            reT = a[0],
            i;
        for (i = 1; parT = a[i]; i++) {
            reT += parT.charAt(0).toUpperCase() + parT.substr(1)
        };
        return reT
    },
    getByClassName: function (a, b, c) {
        if (typeof(a) == 'string') a = document.getElementById(a);
        if (a == null) return false;
        var d = new RegExp("(^|\\s)" + c + "($|\\s)"),
            clsnm, retArray = [],
            key = 0;
        var e = a.getElementsByTagName(b);
        for (var i = 0, pusher; pusher = e[i]; i++) {
            if (pusher.className && pusher.className.match(d)) {
                retArray[key] = pusher;
                key++
            }
        }
        return retArray
    },
    checkHidden: function (a) {
        if (a == null) return true;
        var b;
        while (a.parentNode) {
            b = fleXenv.getStyle(a, 'display');
            if (b == 'none') return true;
            a = a.parentNode
        };
        return false
    },
    getStyle: function (a, b) {
        if (window.getComputedStyle) return window.getComputedStyle(a, null).getPropertyValue(b);
        if (a.currentStyle) return a.currentStyle[fleXenv.camelConv(b)];
        return false
    },
    catchFastInit: window.setInterval(function () {
        var a = document.getElementById('flexcroll-init');
        if (a != null) {
            fleXenv.initByClass();
            window.clearInterval(fleXenv.catchFastInit)
        }
    }, 100),
    putAway: function (a, b) {
        a.parentNode.removeChild(a);
        a.style.display = "none";
        b.appendChild(a)
    },
    addTrggr: function (a, b, c) {
        if (!fleXenv.addChckTrggr(a, b, c) && a.attachEvent) {
            a.attachEvent('on' + b, c)
        }
    },
    addChckTrggr: function (a, b, c) {
        if (a.addEventListener) {
            a.addEventListener(b, c, false);
            fleXenv.w3events = true;
            window.addEventListener("unload", function () {
                fleXenv.remTrggr(a, b, c)
            }, false);
            return true
        } else
        return false
    },
    remTrggr: function (a, b, c) {
        if (!fleXenv.remChckTrggr(a, b, c) && a.detachEvent) a.detachEvent('on' + b, c)
    },
    remChckTrggr: function (a, b, c) {
        if (a.removeEventListener) {
            a.removeEventListener(b, c, false);
            return true
        } else
        return false
    }
};

function CSBfleXcroll(a) {
    fleXenv.fleXcrollMain(a)
};
fleXenv.fleXcrollInit();
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	
	
	
	
	
	
	
	
	
	
	
	// wrapper menu
	var menu = document.createElement('div');
	menu.id="menu"; menu.style.width="0px";
	var spacer = document.createElement('div');
	spacer.style.height="10%";
	var menu2 = document.getElementById('menu2');
	menu.appendChild(spacer);
	menu.appendChild(menu2.cloneNode(true)); 
	menu2.parentNode.replaceChild(menu, menu2);
	
	// DOM pages
	
	var page = document.getElementById("page"),
	accordeon = document.getElementById("accordeon"),
	toggle2 = document.getElementById('toggle2'), 
	toggle3 = document.getElementById('toggle3'), 
	toggle4 = document.getElementById('toggle4'),
	toggle5 = document.getElementById('toggle5');
	
	if(document.getElementById("accueil")===null){
		var accueil = document.createElement('div');
		accueil.id="accueil";
		page.insertBefore(accueil, accordeon);
	}else{
		var accueil = document.getElementById("accueil");
	}
	
	if(document.getElementById("rejoindre")===null){
		var rejoindre = document.createElement('div');
		rejoindre.id="rejoindre";
		page.insertBefore(rejoindre, accordeon);
	}else{
		var rejoindre = document.getElementById("rejoindre");
	}
	
	if(document.getElementById("contact")===null){
		var contact = document.createElement('div');
		contact.id="contact";
		page.insertBefore(contact, accordeon);
	}else{
		var contact = document.getElementById("contact");
	}
	
	if(document.getElementById("equipes")===null){
		var equipes = document.createElement('div');
		equipes.id="equipes";
		insertAfter(accordeon, equipes, toggle2);
	}else{
		var equipes = document.getElementById("equipes");
	}
	
	if(document.getElementById("competences")===null){
		var competences = document.createElement('div');
		competences.id="competences";
		insertAfter(accordeon, competences, toggle3);
	}else{
		var competences = document.getElementById("competences");
	}
	
	if(document.getElementById("news")===null){
		var news = document.createElement('div');
		news.id="news";
		insertAfter(accordeon, news, toggle4);
	}else{
		var news = document.getElementById("news");
	}
	
	if(document.getElementById("presse")===null){
		var presse = document.createElement('div');
		presse.id="presse";
		insertAfter(accordeon, presse, toggle5);
	}else{
		var presse = document.getElementById("presse");
	}
	
	var curiculum = document.getElementById('curiculum');
	
	// fonctions courantes
	
	function blindRight(element, final_width, callback){
		var current_width, timer = setInterval(function(){
			current_width = Math.ceil(parseInt(element.style.width, 10)),
			change = Math.ceil((final_width-current_width)/5);
			if(current_width<final_width){element.style.width=current_width+change+"px";}
			else{element.style.width=final_width+"px"; clearInterval(timer); if(typeof callback!="undefined"){callback();}}
		}, 50);
	}
	
	function blindLeft(element, callback) {
		var current_width, timer = setInterval(function(){
			current_width = Math.ceil(parseInt(element.style.width, 10)),
			change = Math.ceil(current_width/5);
			if(current_width>0){element.style.width=current_width-change+"px";}
			else{element.style.width="0px"; clearInterval(timer); if(typeof callback!="undefined"){callback();}}
		}, 50);
	}
	
	function blindBottom(element, final_height, callback){
		var current_height, timer = setInterval(function(){
			current_height = Math.ceil(parseInt(element.style.height, 10)),
			change = Math.ceil((final_height-current_height)/3);
			if(current_height<final_height){element.style.height=current_height+change+"px";}
			else{element.style.height=final_height+"px"; clearInterval(timer); if(typeof callback!="undefined"){callback();}}
		}, 50);
	}
	
	function blindTop(element, callback) {
		var current_height, timer = setInterval(function(){
			current_height = Math.ceil(parseInt(element.style.height, 10)),
			change = Math.ceil(current_height/3);
			if(current_height>0){element.style.height=current_height-change+"px";}
			else{element.style.height="0px"; clearInterval(timer); if(typeof callback!="undefined"){callback();}}
		}, 50);
	}
	
	
	function fadeIn(args, callback){
	  if(typeof args.fadeTo=="undefined"){args.fadeTo=100;}
	  if(typeof args.speed=="undefined"){args.speed=10;}
	  var element; if(typeof args.element=="undefined"){element=args;}else{element=args.element;}
	  var speed=args.speed, fadeTo=args.fadeTo;
	  var i=0, j;
	  element.style.filter = "alpha(opacity="+i+")";
	  element.style.display="block";
	  var timer = setInterval(function() {
		if(i<fadeTo){
		  i+=speed; j = i*0.01;
		  element.style.opacity = j;
		  element.style.MozOpacity = j;
		  element.style.KhtmlOpacity = j;
		  element.style.filter = "alpha(opacity="+i+")";
		}else{
			clearInterval(timer); if(fadeTo===100){element.style.filter="none";} if(typeof callback!="undefined"){callback();}}
	  }, 50);
	}

	function fadeOut(args, callback){
	  var i, j;
	  if(typeof args.fadeFrom=="undefined"){i=100;}else{i=args.fadeFrom;}
	  if(typeof args.speed=="undefined"){args.speed=10;}
	  var element; if(typeof args.element=="undefined"){element=args;}else{element=args.element;}
	  var speed=args.speed,
	  timer = setInterval(function() {
		if(i>0){
		  i+=-speed; j = i*0.01;
		  element.style.opacity = j;
		  element.style.MozOpacity = j;
		  element.style.KhtmlOpacity = j;
		  element.style.filter = "alpha(opacity="+i+")";
		}else{
			clearInterval(timer); element.style.filter="none"; element.style.display="none"; if(typeof callback!="undefined"){callback();}}
	  }, 50);
	}
	
	function ajax(arg, callback){
		var xhr;
		if(arg.elem.innerHTML=="" || arg.elem=="reload"){
			if (window.XMLHttpRequest || window.ActiveXObject){
				if (window.ActiveXObject){
					try {xhr = new ActiveXObject("Msxml2.XMLHTTP");}
					catch(e) {xhr = new ActiveXObject("Microsoft.XMLHTTP");}
				} else {xhr = new XMLHttpRequest();}
			}
			else{
				if(typeof arg.fail!="undefined"){arg.fail();}
			}

			xhr.onreadystatechange = function(){
				if (xhr.readyState==4){if(typeof callback !="undefined"){callback(xhr.responseText);}}
			};
			
			xhr.open("GET", arg.page, true);
			xhr.send(null);
		}else{
			if(typeof callback !="undefined"){callback("");}
		}
	}

	function insertAfter(parent, node, referenceNode){
	parent.insertBefore(node, referenceNode.nextSibling);
	}
	
	// variables globales
	
	var liste_pages_save,
	menu_li = menu.getElementsByTagName('li'),
	position, vitesse,
	avocats_length = avocats.length, j=avocats_length,
	lien_img;
	if(get_ancre=="news"){lien_img="accueil";}
	else if(get_ancre=="presse"){lien_img="accueil";}
	else if(in_array(get_ancre, avocats)){lien_img="equipes";}
	else if(get_ancre=="competences"){lien_img="competence";}
	else{lien_img=get_ancre;}
	for(j=0; j<avocats_length; j++){
		if(avocats[j] == get_ancre){
			var rowid = j;
		}
	}
	if(get_ancre=='competences'){var align="right center";}else{var align="center";}
	presse.ouvert=news.ouvert=equipes.ouvert=competences.ouvert=false;
	var pages = [];
	pages[2] = "equipes";
	pages[3] = "competences";
	pages[4] = "news";
	pages[5] = "presse";
	var cl;
	equipes.style.display=competences.style.display=news.style.display=presse.style.display="none";
	
	// style en fonction de la résolution
	
	if(window.screen.width >= 1200){
	var folder = '1280/',
	retrait = '250px',
	retraitequipes = '20px';
	document.getElementById('logo').src='1280/bloclogo.png';
	}

	else if(window.screen.width < 1200 && window.screen.width > 800){
	var folder= '1024/',
	retrait = '200px',
	retraitequipes = '20px';
	document.getElementById('logo').src='1024/bloclogo.png';
	document.getElementById('logo').style.marginLeft='-135px';
	}
		
	else if(window.screen.width <= 800){
	var folder= '800/',
	retrait = '150px',
	retraitequipes = '0px';
	document.getElementById('logo').src='800/bloclogo.png';
	document.getElementById('logo').style.marginLeft='-105px';
	}
	
	// dimensions et position des fenêtres
	
	function contentSize(){
		var largeur = document.body.clientWidth, hauteur = document.body.clientHeight;
		accueil.style.width=rejoindre.style.width=contact.style.width=largeur-145-largeur/3.3+"px";
		accueil.style.left=rejoindre.style.left=contact.style.left=largeur*0.27-3+"px";
		accueil.style.top=rejoindre.style.top=contact.style.top="0px";
		equipes.style.width=competences.style.width=news.style.width=presse.style.width=largeur-13-largeur/3.3+"px";
		
		var contentcontact = document.getElementById("contentcontact");
		contentcontact.style.width=largeur-200-largeur/3.3 +"px";

		var accueil_scroll = document.getElementById("accueil_scroll");
		accueil_scroll.style.width=largeur-200-largeur/3.3 +"px";

		
		var rejoindre_scroll = document.getElementById("rejoindre_scroll");
		rejoindre_scroll.style.width=largeur-200-largeur/3.3 +"px";
		var form = document.getElementById("form");
		form.style.width=largeur-150-largeur/3.3+"px";

		var liste_news_scroll = document.getElementById("liste_news_scroll");
		liste_news_scroll.style.width = largeur-160-largeur/3.3+"px";		
		liste_news_scroll.style.height = 0.752*hauteur-100+"px";	
		
		var liste_presse_scroll = document.getElementById("liste_presse_scroll");
		liste_presse_scroll.style.width = largeur-160-largeur/3.3+"px";		
		liste_presse_scroll.style.height = 0.752*hauteur-100+"px";	

		var listeGauche = document.getElementById('listeGauche');
		var content2 = document.getElementById("content2");
		content2.style.height = 0.752*hauteur-215+"px";
		listeGauche.style.width=largeur-420-largeur/3.3+"px";
		var speeds = document.getElementById('speeds');
		content2.style.width=speeds.style.width=largeur-150-largeur/3.3+"px";
	}
	
	// fonctions de navigation
	
	function bg(partie){
		if(partie=='equipes'){document.body.style.background = '#c7bfb6 url(' + folder + 'equipes.jpg) no-repeat ' + retraitequipes + ' center';}
		else if(partie=='competences'){document.body.style.background = '#c7bfb6 url(' + folder + 'competence.jpg) no-repeat right center';}
		else if(partie=='contact' || partie=='rejoindre' || partie=='accueil'){document.body.style.background = '#c7bfb6 url(' + folder + partie + '.jpg) no-repeat ' + retrait + ' center';}
		else if(partie=='news'){document.body.style.background = '#c7bfb6 url(' + folder + 'accueil.jpg) no-repeat ' + retrait + ' center';}
		else if(partie=='presse'){document.body.style.background = '#c7bfb6 url(' + folder + 'accueil.jpg) no-repeat ' + retrait + ' center';}
	}
	
	function fermer(partie){
		fadeOut(partie, function(){
			if(partie.className!="cv"){bg('accueil');}
		});
	}
	
	function pauseDefile(){
		vitesse = 0;
	}
	
	function hideCV(callback){		
		var div_cv = curiculum.getElementsByTagName('div'),
		div_cv_length = div_cv.length, i=div_cv_length, j=0;
		for (i=div_cv_length; i--;){
			if (div_cv[i].className=='cv' && div_cv[i].style.display=="block"){
				fadeOut(div_cv[i], function(){if(typeof callback!="undefined"){callback();}});
				break;
			}else{
				j++;
				if(j==div_cv_length-1){if(typeof callback!="undefined"){callback();}}
			}
		}
	}
	
	function handler(partie, toggle, callback){
		var partie_elem=document.getElementById(partie),
		largeur = Math.ceil(document.body.clientWidth-160-document.body.clientWidth*0.27);
		function handler_operate(){
			hideCV(function(){
				bg(partie);
				if(partie_elem.style.display=='none'){
					partie_elem.style.width="0px"; partie_elem.style.display="block";
					blindRight(partie_elem, largeur, function(){
						toggle2.onclick = function(){toggleActive("equipes", this);};
						toggle3.onclick = function(){toggleActive("competences", this);}; 
						toggle4.onclick = function(){toggleActive("news", this);};
						toggle5.onclick = function(){toggleActive("presse", this);};
						if(typeof callback!="undefined"){
							callback();
							// initialisation de la barre de défilement
							var listeGauche = document.getElementById("listeGauche"), listeDroite = document.getElementById("listeDroite"), content3 = document.getElementById("content3"), liste_news_scroll = document.getElementById("liste_news_scroll"), liste_presse_scroll = document.getElementById("liste_presse_scroll");
							if(partie=="equipes"){
								if(listeGauche.className!="flexcrollactive"){fleXenv.fleXcrollMain(listeGauche); fleXenv.fleXcrollMain(listeDroite);}
								else{listeGauche.fleXcroll.updateScrollBars(); listeDroite.fleXcroll.updateScrollBars();}
								caroussel();
							}
							if(partie=="competences"){
								if(content3.className!="flexcrollactive"){fleXenv.fleXcrollMain(content3);}
								else{content3.fleXcroll.updateScrollBars();}
								position=0;
							}
							if(partie=="news"){
								if(liste_news_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(liste_news_scroll);}
								else{liste_news_scroll.fleXcroll.updateScrollBars(true, false);}
								position=0;
							}
							if(partie=="presse"){
								if(liste_presse_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(liste_presse_scroll);}
								else{liste_presse_scroll.fleXcroll.updateScrollBars(true, false);}
								position=0;
							}
						}
					});
					toggle.style.backgroundPosition='-36px';
					toggle.onmouseout = function(){this.style.backgroundPosition='-36px';};
					
					for (var i = 2 ; i < 6 ; i++){
						if(pages[i] != partie){
							togglei = document.getElementById('toggle'+i);
							togglei.style.backgroundPosition='0px';
							togglei.onmouseover = function() {this.style.backgroundPosition='-36px';};
							togglei.onmouseout = function() {this.style.backgroundPosition='0px';};
						}
					}
					
					if(equipes != partie_elem && equipes.style.display =="block"){
						pauseDefile();
						blindLeft(equipes, function(){equipes.style.display="none";});
					}
					else if(competences != partie_elem && competences.style.display =="block"){
						blindLeft(competences, function(){competences.style.display="none";});
					}
					else if(news != partie_elem && news.style.display =="block"){
						blindLeft(news, function(){news.style.display="none";});
					}
					else if(presse != partie_elem && presse.style.display =="block"){
						blindLeft(presse, function(){presse.style.display="none";});
					}
				}else{
					if(partie == "equipes"){pauseDefile();}
					blindLeft(partie_elem, function(){
						position=0;
						toggle2.onclick = function(){toggleActive("equipes", this);};
						toggle3.onclick = function(){toggleActive("competences", this);}; 
						toggle4.onclick = function(){toggleActive("news", this);};
						toggle5.onclick = function(){toggleActive("presse", this);};
						partie_elem.style.display="none";
						bg('accueil');
						if(typeof callback!="undefined"){callback();}
					});
					toggle.style.backgroundPosition='0px';
					toggle.onmouseover = function() {this.style.backgroundPosition='-36px';};
					toggle.onmouseout = function() {this.style.backgroundPosition='0px';};
				}
			});
		}	
		if(accueil.style.display=="block"){fadeOut(accueil, handler_operate);}else if(rejoindre.style.display=="block"){fadeOut(rejoindre, handler_operate);}else if(contact.style.display=="block"){fadeOut(contact, handler_operate);}else{handler_operate();}
	}
	
	// animation d'ouverture
	
	function ancre(callback){
		if(typeof rowid=="undefined"){
			if(get_ancre=='equipes' || get_ancre=='competences' || get_ancre=='news' || get_ancre=='presse'){
				handler(get_ancre, toggle2, callback);
			}else{
				fadeIn(document.getElementById(get_ancre), function(){
					callback();
					if(get_ancre=="rejoindre"){
						var rejoindre_scroll = document.getElementById("rejoindre_scroll");
						if(rejoindre_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(rejoindre_scroll);}
					}else if(get_ancre=="accueil"){
						var accueil_scroll = document.getElementById("accueil_scroll");
						if(accueil_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(accueil_scroll);}
					}
				});
			}
		}else if(typeof rowid!="undefined"){
			handler('equipes', toggle2);
			setTimeout(function(){fadeIn(document.getElementById(avocats[rowid]));},1300); vitesse = 0;
		}
	}
	function resizeAccordion(){
		var largeur_accordion = Math.ceil(document.body.clientWidth-160-document.body.clientWidth*0.27);
		if(equipes.style.display=='block'){equipes.style.width=largeur_accordion+"px";}
		if(competences.style.display=='block'){competences.style.width=largeur_accordion+"px";}
		if(news.style.display=='block'){news.style.width=largeur_accordion+"px";}
		if(presse.style.display=='block'){presse.style.width=largeur_accordion+"px";}
		fleXenv.updateScrollBars();
	}
	
	var speed, speed2, texteDefilant, longueur, cadre;
			
	function defile(){
		position-=vitesse;
		if(position > 0){
			vitesse= 0;
			setTimeout(function() {vitesse=1;} , 1000);
			speed2.onmouseover = function(){
				vitesse=0; 
				this.src='images/speedred2.png';
				};
			speed2.onmouseout = function(){
				if(vitesse!==1){
					vitesse=-1; 
				};
				this.src='images/speedgray2.png';
			};
		}
		else if(position<-longueur + cadre.offsetWidth +1 )
		{
			vitesse= 0;
			setTimeout(function() {vitesse= -1;}, 1000);
			speed.onmouseover = function(){
				vitesse=0; 
				this.src='images/speedred.png';
			};
			speed.onmouseout = function(){
				if(vitesse!==-1){
					vitesse=1; 
				} 
				this.src='images/speedgray.png';
			};
		}else{
			speed2.onmouseover = function(){
				vitesse=-10; 
				this.src='images/speedred2.png';
			};
			speed2.onmouseout = function(){
				if(vitesse!==1){
					vitesse= -1; 
				}
				this.src='images/speedgray2.png';
			};
			speed.onmouseover = function(){
				vitesse=10; 
				this.src='images/speedred.png';
			};
			speed.onmouseout = function(){
				if(vitesse!==-1){
					vitesse=1; 
				}
				this.src='images/speedgray.png';
			};
		}
		texteDefilant.style.left=Math.round(position)+'px';
	}
	function caroussel(){vitesse=1;}

	function preloading(){
		var menu_width = document.body.clientWidth*0.27,
		fond_menu = document.getElementById('fondmenu'); fond_menu.style.width=menu_width+'px';
			
		var li_length = menu_li.length, i=li_length;
		for (i=li_length ; i--;){
		  menu_li[i].style.width= menu_width*0.53+'px';
		}
		
		fadeOut(document.getElementById("preload_content"), function(){
			document.getElementById("logo").style.visibility="visible";
			blindRight(menu, menu_width, function(){
				menu.style.width="27%";
				document.body.style.background = '#c7bfb6 url(' + folder + lien_img +'.jpg) no-repeat '+ retrait+' '+align+'';
				fadeOut(document.getElementById("preload"), function(){	
					document.body.removeChild(document.getElementById('preload'));
					fond_menu.style.width='100%';
					var j=li_length;
					for(j=li_length ; j--;){
						menu_li[j].style.width= '53%';
					}
					setTimeout(function(){
						ajax({page:"equipes.php?js_lang="+js_lang+"",elem:equipes}, function(data){
							if(data!=""){equipes.innerHTML=data;}
							
							var noms_defilants = document.getElementById("texteDefilant").getElementsByTagName("span"), noms_defilants_length=noms_defilants.length, g;
							
							for(g=noms_defilants_length; g--;){
								if(noms_defilants[g].innerHTML=="Claire GUIONNET MOALIC"){noms_defilants[g].style.letterSpacing="-0.5px";}
							}
							
							// caroussel
							speed = document.getElementById('speed').getElementsByTagName('img')[0];
							speed2 = document.getElementById('speed2').getElementsByTagName('img')[0];
							texteDefilant=document.getElementById('texteDefilant');
							vitesse=0;
							position=0;
							texteDefilant.style.width=113*n_lignes+ "px";
							longueur=113*n_lignes;
							
							//suite
							
							toggle2.style.visibility="visible";
							ajax({page:"competences.php?js_lang="+js_lang+"",elem:competences}, function(data){
								if(data!=""){competences.innerHTML=data;}
								var content3 = document.getElementById("content3"),
								largeur = document.body.clientWidth;
								content3.style.width=largeur-200-largeur/3.3 +"px";
								var comp_divs = content3.getElementsByTagName("div"),
								comp = [], compHeight = [], nws = [], prss = [], li_nws = [], li_prss = [], nwsHeight = [], prssHeight = [], comp_divs_length = comp_divs.length, comp_clone, compi = comp_divs_length, max_i=0;
								
								comp_clone=document.createElement("div");
								comp_clone.id="clone_comp";
								comp_clone.style.visibility = 'hidden';
								comp_clone.style.width=largeur-117-largeur/3.3+"px";
								document.body.appendChild(comp_clone);
								
								for(compi=0;compi<comp_divs_length; compi++){
									(function(i){
										if(comp_divs[i].className=="accordion_content"){
											cmp_clone=comp_divs[i].cloneNode(true);
											cmp_clone.style.visibility = 'hidden';
											comp_clone.appendChild(cmp_clone);
											compHeight[max_i] = cmp_clone.offsetHeight;
											comp_divs[i].style.height="0px";
											comp[max_i] = comp_divs[i];
											max_i++;
										}
									})(compi);
									if(compi==comp_divs_length-1){document.body.removeChild(comp_clone);}
								}
								var h4 = content3.getElementsByTagName("h4"),
								h4_length=h4.length, h_i;
								
								function toggleHeight(i, target_str){
									if(target_str=="comp"){
										var elem_scroll = content3;
									}else if(target_str=="nws"){
										var elem_scroll = document.getElementById("liste_news_scroll");
									}else if(target_str=="prss"){
										var elem_scroll = document.getElementById("liste_presse_scroll");
									}
									function actualiser(){
										elem_scroll.fleXcroll.updateScrollBars();
									}
										
									var thisHeight, i;
									if(target_str=="comp"){
										target=comp; thisHeight=compHeight; toggler=h4;
									}else if(target_str=="nws"){
										target=nws; thisHeight=nwsHeight; toggler=li_nws;
									}else if(target_str=="prss"){
										target=prss; thisHeight=prssHeight; toggler=li_prss;
									}
									if(parseInt(target[i].style.height)===0){
										var timer = setInterval(actualiser, 100);
										blindBottom(target[i], thisHeight[i], function(){
											clearInterval(timer);
											toggler[i].onclick=function(){toggleHeight(i, target_str); toggler[i].onclick=function(){};};
										});
									}else{
										var timer = setInterval(actualiser, 100);
										blindTop(target[i], function(){
											clearInterval(timer);
											toggler[i].onclick=function(){toggleHeight(i, target_str); toggler[i].onclick=function(){};};
										});
									}
								}
								
								for(h_i=0; h_i<h4_length; h_i++){
									(function(i){
										h4[i].onclick=function(){toggleHeight(i, "comp"); h4[i].onclick=function(){};};
									})(h_i);
								}
								toggle3.style.visibility="visible";
								ajax({page:"news.php?js_lang="+js_lang+"",elem:news}, function(data){
									if(data!=""){news.innerHTML=data;} 		
									var nws_divs = document.getElementById("liste_news_scroll").getElementsByTagName("div");
									
									if(type=="social"){document.getElementById("onglet_fiscal").className=""; document.getElementById("onglet_social").className="actif";}
									else{document.getElementById("onglet_fiscal").className="actif"; document.getElementById("onglet_social").className="";}
									
									function switch_init(){
										var nws_divs_length = nws_divs.length, li_i, nwsi, max_i=0;
										
										for(nwsi=0; nwsi<nws_divs_length; nwsi++){
											if(nws_divs[nwsi].className=="li"){li_nws[max_i]=nws_divs[nwsi]; max_i++;}
										}
										
										var j=0, news_clone, nws_clone;
										
										news_clone=document.createElement("div");
										news_clone.id="clone_news";
										news_clone.style.visibility = 'hidden';
										var news_width =largeur-160-largeur/3.3;
										news_clone.style.width=news_width+"px";
										document.body.appendChild(news_clone);
										var text_date;
										
										for(nwsi=0; nwsi<nws_divs_length; nwsi++){
											(function(i){
												if(nws_divs[i].className=="li"){
													var this_text =  nws_divs[i].getElementsByTagName("em")[0].getElementsByTagName("span")[0];
													this_text.style.width="95px";
													if(this_text.innerHTML!=text_date){text_date = this_text.innerHTML;}
													else{this_text.style.visibility="hidden";}
													nws_divs[i].getElementsByTagName("span")[1].style.width=news_width-170+"px";
												}
												if(nws_divs[i].className=="news_content"){
													nws_clone=nws_divs[i].cloneNode(true);
													nws_clone.style.visibility = 'hidden';
													news_clone.appendChild(nws_clone);
													nwsHeight[j] = nws_clone.offsetHeight;
													nws_divs[i].style.height="0px";
													nws[j] = nws_divs[i];
													j++
												}
											})(nwsi);
											if(nwsi==nws_divs_length-1){document.body.removeChild(news_clone);}
										}

										for(li_i=0; li_i<max_i; li_i++){
											(function(i){
												li_nws[i].onclick=function(){toggleHeight(i, "nws"); li_nws[i].onclick=function(){};};
											})(li_i);
										}
										
										var pages = document.getElementById("liste_pages").getElementsByTagName("a"), pages_length=pages.length, p;
										for(p=0; p<pages_length; p++){
											(function(i){
												pages[i].onclick=function(){
													(function(i){
														onglet(type,i*15);
														return false;
													})(i);
												}
											})(p);
										}
									}	
									switch_init();
									var liste_news_scroll = document.getElementById("liste_news_scroll"),
									bouton_rechercher = document.getElementById('bouton_rechercher'),
									chargement = document.getElementById('chargement');
									
									liste_pages_save = document.getElementById("liste_pages").innerHTML;
									
									function rechercher(){
										chargement.style.display="block";
										var recherche = document.getElementById("recherche").value;
										var liste_news_scroll_contentwrapper = document.getElementById("liste_news_scroll_contentwrapper");
										if(js_lang=="fr"){search_var = "fr_recherche";}else if(js_lang=="en"){search_var = "en_recherche";}
										fadeOut(liste_news_scroll_contentwrapper, function(){
											ajax({page:"recherche.php?"+search_var+"="+recherche+"",elem:"reload"}, function(data){
												liste_news_scroll_contentwrapper.innerHTML=data;
												chargement.style.display="none";
												switch_init();
												liste_news_scroll.fleXcroll.setScrollPos(0, 0);
												fadeIn(liste_news_scroll_contentwrapper, function(){
													liste_news_scroll.fleXcroll.updateScrollBars();
												});
												document.getElementById("liste_pages").innerHTML=document.getElementById("nb_result").innerHTML;
												document.getElementById("nb_result").innerHTML="";
												document.getElementById("default_result_button").onclick=function(){onglet(type); return false;}
											});
										});
									}

									function onglet(partie, from){
										var chargement = document.getElementById('chargement'),
										liste_news_scroll_contentwrapper = document.getElementById("liste_news_scroll_contentwrapper"),
										$ajax;
										chargement.style.display="block";
										fadeOut(liste_news_scroll_contentwrapper, function(){
											if(typeof from !="undefined"){$ajax="onglets.php?js_lang="+js_lang+"&onglet="+partie+"&from="+from+"";}
											else{$ajax="onglets.php?js_lang="+js_lang+"&onglet="+partie+"";}
											ajax({page:$ajax, elem:"reload"}, function(data){
												liste_news_scroll_contentwrapper.innerHTML=data;
												chargement.style.display="none";
												var new_list = document.getElementById("liste_pages_js").innerHTML;
												document.getElementById("liste_pages_js").innerHTML="";
												document.getElementById("liste_pages").innerHTML=new_list;
												switch_init();
												liste_news_scroll.fleXcroll.setScrollPos(0, 0);
												fadeIn(liste_news_scroll_contentwrapper, function(){
													liste_news_scroll.fleXcroll.updateScrollBars();
												});
											});
										});
									}
									
									document.getElementById("onglet_fiscal").onclick=function(){onglet("fiscal"); type="fiscal"; document.getElementById("onglet_fiscal").className="actif"; document.getElementById("onglet_social").className=""; return false;}
									document.getElementById("onglet_social").onclick=function(){onglet("social"); type="social"; document.getElementById("onglet_fiscal").className=""; document.getElementById("onglet_social").className="actif"; return false;}
									
									if(js_lang=="en"){
										bouton_rechercher.onmouseup = bouton_rechercher.onmouseout = function() {bouton_rechercher.src='images/search.png';};
										bouton_rechercher.onmousedown = function() {bouton_rechercher.src='images/searchclick.png';};
									}
									else if(js_lang=="fr"){
										bouton_rechercher.onmouseup = bouton_rechercher.onmouseout = function() {bouton_rechercher.src='images/rechercher.png';};
										bouton_rechercher.onmousedown = function() {bouton_rechercher.src='images/rechercherclick.png';};
									}
								  
									bouton_rechercher.onclick = function() {rechercher();}
									
									toggle4.style.visibility="visible";
									
/////////////////////////////////// début PRESSE
									ajax({page:"presse.php?js_lang="+js_lang+"",elem:presse}, function(data){
										if(data!=""){presse.innerHTML=data;} 		
										var prss_divs = document.getElementById("liste_presse_scroll").getElementsByTagName("div");
										
										function switch_init_presse(){
											var prss_divs_length = prss_divs.length, li_i, prssi, max_i=0;
											
											for(prssi=0; prssi<prss_divs_length; prssi++){
												if(prss_divs[prssi].className=="li"){li_prss[max_i]=prss_divs[prssi]; max_i++;}
											}
											
											var j=0, presse_clone, prss_clone;
											
											presse_clone=document.createElement("div");
											presse_clone.id="clone_presse";
											presse_clone.style.visibility = 'hidden';
											var presse_width =largeur-160-largeur/3.3;
											presse_clone.style.width=presse_width+"px";
											document.body.appendChild(presse_clone);
											var text_date;
											
											for(prssi=0; prssi<prss_divs_length; prssi++){
												(function(i){
													if(prss_divs[i].className=="li"){
														prss_divs[i].getElementsByTagName("span")[1].style.width=presse_width-170+"px";
													}
													if(prss_divs[i].className=="presse_content"){
														prss_clone=prss_divs[i].cloneNode(true);
														prss_clone.style.visibility = 'hidden';
														presse_clone.appendChild(prss_clone);
														prssHeight[j] = prss_clone.offsetHeight;
														prss_divs[i].style.height="0px";
														prss[j] = prss_divs[i];
														j++
													}
												})(prssi);
												if(prssi==prss_divs_length-1){document.body.removeChild(presse_clone);}
											}

											for(li_i=0; li_i<max_i; li_i++){
												(function(i){
													li_prss[i].onclick=function(){toggleHeight(i, "prss"); li_prss[i].onclick=function(){};};
												})(li_i);
											}
											
											var pages_presse = document.getElementById("liste_pages_presse").getElementsByTagName("a"), pages_presse_length=pages_presse.length, p;
											for(p=0; p<pages_presse_length; p++){
												(function(i){
													pages_presse[i].onclick=function(){
														(function(i){
															onglet_presse(i*15);
															return false;
														})(i);
													}
												})(p);
											}
										}	
										switch_init_presse();
										var liste_presse_scroll = document.getElementById("liste_presse_scroll"),
										bouton_rechercher_presse = document.getElementById('bouton_rechercher_presse'),
										chargement_presse = document.getElementById('chargement_presse');
										
										liste_pages_presse_save = document.getElementById("liste_pages_presse").innerHTML;
										
										function rechercher_presse(){
											chargement_presse.style.display="block";
											var recherche = document.getElementById("recherche_presse").value;
											var liste_presse_scroll_contentwrapper = document.getElementById("liste_presse_scroll_contentwrapper");
											if(js_lang=="fr"){search_var = "fr_recherche";}else if(js_lang=="en"){search_var = "en_recherche";}
											fadeOut(liste_presse_scroll_contentwrapper, function(){
												ajax({page:"recherche_presse.php?"+search_var+"="+recherche+"",elem:"reload"}, function(data){
													liste_presse_scroll_contentwrapper.innerHTML=data;
													chargement_presse.style.display="none";
													switch_init_presse();
													liste_presse_scroll.fleXcroll.setScrollPos(0, 0);
													fadeIn(liste_presse_scroll_contentwrapper, function(){
														liste_presse_scroll.fleXcroll.updateScrollBars();
													});
													document.getElementById("liste_pages_presse").innerHTML=document.getElementById("nb_result_presse").innerHTML;
													document.getElementById("nb_result_presse").innerHTML="";
													document.getElementById("default_result_button_presse").onclick=function(){onglet_presse(); return false;}
												});
											});
										}

										function onglet_presse(from){
											var chargement = document.getElementById('chargement_presse'),
											liste_presse_scroll_contentwrapper = document.getElementById("liste_presse_scroll_contentwrapper"),
											$ajax;
											chargement_presse.style.display="block";
											fadeOut(liste_presse_scroll_contentwrapper, function(){
												if(typeof from !="undefined"){$ajax="onglets_presse.php?js_lang="+js_lang+"&onglet=presse&from="+from+"";}
												else{$ajax="onglets_presse.php?js_lang="+js_lang+"&onglet=presse";}
												ajax({page:$ajax, elem:"reload"}, function(data){
													liste_presse_scroll_contentwrapper.innerHTML=data;
													chargement_presse.style.display="none";
													var new_list = document.getElementById("liste_pages_presse_js").innerHTML;
													document.getElementById("liste_pages_presse_js").innerHTML="";
													document.getElementById("liste_pages_presse").innerHTML=new_list;
													switch_init_presse();
													liste_presse_scroll.fleXcroll.setScrollPos(0, 0);
													fadeIn(liste_presse_scroll_contentwrapper, function(){
														liste_presse_scroll.fleXcroll.updateScrollBars();
													});
												});
											});
										}
										
										if(js_lang=="en"){
											bouton_rechercher_presse.onmouseup = bouton_rechercher_presse.onmouseout = function() {bouton_rechercher_presse.src='images/search.png';};
											bouton_rechercher_presse.onmousedown = function() {bouton_rechercher_presse.src='images/searchclick.png';};
										}
										else if(js_lang=="fr"){
											bouton_rechercher_presse.onmouseup = bouton_rechercher_presse.onmouseout = function() {bouton_rechercher_presse.src='images/rechercher.png';};
											bouton_rechercher_presse.onmousedown = function() {bouton_rechercher_presse.src='images/rechercherclick.png';};
										}
									  
										bouton_rechercher_presse.onclick = function() {rechercher_presse();}
										
										toggle5.style.visibility="visible";
/////////////////////////////////// fin PRESSE

										ajax({page:"accueil.php?js_lang="+js_lang+"",elem:accueil}, function(data){
											if(data!=""){accueil.innerHTML=data;}
											ajax({page:"rejoindre.php?js_lang="+js_lang+"",elem:rejoindre}, function(data){
												if(data!=""){rejoindre.innerHTML=data;}
												ajax({page:"contact.php?js_lang="+js_lang+"",elem:contact}, function(data){
													if(data!=""){contact.innerHTML=data;}
													ajax({page:"curiculum.php?avocat=tous&js_lang="+js_lang+"",elem:curiculum}, function(data){
														if(data!=""){curiculum.innerHTML=data;}
														cadre=document.getElementById('cadre'),
														cl=cadre.offsetWidth;
														contentSize(); window.onresize=function(){contentSize(); resizeAccordion();}
														var liens = document.getElementsByTagName('a'),
														liens_length = liens.length, i=liens_length;
														for (i=liens_length ; i--;) {
															if (liens[i].className == 'lien_ext'){
																liens[i].onclick = function()  
																{
																	window.open(this.href); return false;
																};
															}
														}
														// ouverture de la page demandée ou de la page d'accueil
														ancre(function(){setInterval(defile,50);});
													});
												});
											});
										});
								});
							});
						});
					} , 300);
					
					// préhargement des images de fond
					
					var images_fond = ["accueil", "equipes", "competence", "contact", "rejoindre"];
					var inc=0;
					function load_images(){
						if(inc<5){
							if(images_fond[inc]!=lien_img){
								var img = new Image();
								img.src=folder+images_fond[inc]+".jpg";
								inc++;
								img.onload=function(){load_images();};
							}
							else{inc++; load_images();}
						}
					}
					load_images();
					});
				});
			});
		});
	}
	
	function in_array(needle, haystack){
		var key = ''; 
		
			for (key in haystack){
				if (haystack[key] === needle){return true;}
			}
		 return false;
	}
	
	var fond_ancre = new Image(); fond_ancre.src=folder+lien_img+".jpg"; fond_ancre.onload=function(){preloading();};
	function toggleActive(partie, toggle, callback){
		var val = menu_li_length-1;
		handler(partie, toggle, function(){
			for(m=val; m--;){
					menu_li[m].getElementsByTagName("a")[0].onclick=function(){
					if(this.id!="brochure_lien"){run(this.href.split("?page=")[1]);}
					else{window.open(this.href);}
					return false;
				};
			}
			if(typeof callback!="undefined"){callback();}
		});
		toggle2.onclick=toggle3.onclick=toggle4.onclick=toggle5.onclick=function(){};
		for(i=val; i--;){
			menu_li[i].getElementsByTagName("a")[0].onclick=function(){
				if(toggle.id!="brochure_lien"){}
				return false;
			};
		}
	}

	function run(partie){
		var partie_elem = document.getElementById(partie);
		if(equipes.style.display !="none" || competences.style.display !="none" || news.style.display !="none" || presse.style.display !="none"){
			if(equipes.style.display !="none"){
				toggleActive("equipes", toggle2, function(){
					if(partie=="rejoindre"){
						var rejoindre_scroll = document.getElementById("rejoindre_scroll");
						if(rejoindre_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(rejoindre_scroll);}
						else{rejoindre_scroll.fleXcroll.updateScrollBars(true, false);}
					}else if(partie=="accueil"){
						var accueil_scroll = document.getElementById("accueil_scroll");
						if(accueil_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(accueil_scroll);}
						else{accueil_scroll.fleXcroll.updateScrollBars(true, false);}
					}
					fadeIn(partie_elem); bg(partie); pauseDefile(); hideCV();
				});
			}else if(competences.style.display !="none"){
				toggleActive("competences", toggle3, function(){
					if(partie=="rejoindre"){
						var rejoindre_scroll = document.getElementById("rejoindre_scroll");
						if(rejoindre_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(rejoindre_scroll);}
						else{rejoindre_scroll.fleXcroll.updateScrollBars(true, false);}
					}else if(partie=="accueil"){
						var accueil_scroll = document.getElementById("accueil_scroll");
						if(accueil_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(accueil_scroll);}
						else{accueil_scroll.fleXcroll.updateScrollBars(true, false);}
					}
					fadeIn(partie_elem); bg(partie); hideCV();
				});
			}else if(news.style.display !="none"){
				toggleActive("news", toggle4, function(){
					if(partie=="rejoindre"){
						var rejoindre_scroll = document.getElementById("rejoindre_scroll");
						if(rejoindre_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(rejoindre_scroll);}
						else{rejoindre_scroll.fleXcroll.updateScrollBars(true, false);}
					}else if(partie=="accueil"){
						var accueil_scroll = document.getElementById("accueil_scroll");
						if(accueil_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(accueil_scroll);}
						else{accueil_scroll.fleXcroll.updateScrollBars(true, false);}
					}
					fadeIn(partie_elem); bg(partie);
				});
			}else if(presse.style.display !="none"){
				toggleActive("presse", toggle5, function(){
					if(partie=="rejoindre"){
						var rejoindre_scroll = document.getElementById("rejoindre_scroll");
						if(rejoindre_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(rejoindre_scroll);}
						else{rejoindre_scroll.fleXcroll.updateScrollBars(true, false);}
					}else if(partie=="accueil"){
						var accueil_scroll = document.getElementById("accueil_scroll");
						if(accueil_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(accueil_scroll);}
						else{accueil_scroll.fleXcroll.updateScrollBars(true, false);}
					}
					fadeIn(partie_elem); bg(partie);
				});
			}
			
			for (var i = 2 ; i < 6 ; i++)  {
			togglei = document.getElementById('toggle'+i);
			togglei.style.backgroundPosition='0px';
			togglei.onmouseover = function() {this.style.backgroundPosition='-36px';};
			togglei.onmouseout = function() {this.style.backgroundPosition='0px';};
			}
		}
		else{
			if(accueil.style.display=="block"){
				fadeOut({element:accueil, speed:20}, function(){fadeIn(partie_elem, function(){
					if(partie=="rejoindre"){
						var rejoindre_scroll = document.getElementById("rejoindre_scroll");
						if(rejoindre_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(rejoindre_scroll);}
						else{rejoindre_scroll.fleXcroll.updateScrollBars(true, false);}
					}else if(partie=="accueil"){
						var accueil_scroll = document.getElementById("accueil_scroll");
						if(accueil_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(accueil_scroll);}
						else{accueil_scroll.fleXcroll.updateScrollBars(true, false);}
					}
				}); bg(partie);});
			}
			else if(rejoindre.style.display=="block"){
				fadeOut({element:rejoindre, speed:20}, function(){fadeIn(partie_elem, function(){
					if(partie=="rejoindre"){
						var rejoindre_scroll = document.getElementById("rejoindre_scroll");
						if(rejoindre_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(rejoindre_scroll);}
						else{rejoindre_scroll.fleXcroll.updateScrollBars(true, false);}
					}else if(partie=="accueil"){
						var accueil_scroll = document.getElementById("accueil_scroll");
						if(accueil_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(accueil_scroll);}
						else{accueil_scroll.fleXcroll.updateScrollBars(true, false);}
					}
				}); bg(partie);});
			}
			else if(contact.style.display=="block"){
				fadeOut({element:contact, speed:20}, function(){fadeIn(partie_elem); bg(partie);});
			}else{
				fadeIn(partie_elem, function(){
					if(partie=="rejoindre"){
						var rejoindre_scroll = document.getElementById("rejoindre_scroll");
						if(rejoindre_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(rejoindre_scroll);}
					}else if(partie=="accueil"){
						var accueil_scroll = document.getElementById("accueil_scroll");
						if(accueil_scroll.className!="flexcrollactive"){fleXenv.fleXcrollMain(accueil_scroll);}
					}
				}); bg(partie);
			}
		}
	}
	
	toggle2.onclick = function(){toggleActive("equipes", this);};
	toggle3.onclick = function(){toggleActive("competences", this);};
	toggle4.onclick = function(){toggleActive("news", this);};
	toggle5.onclick = function(){toggleActive("presse", this);};
	
	// CV
	
	function afficheCV(cv){
		vitesse=0; fadeIn(cv, function(){
			cv_scroll = cv.getElementsByTagName("div")[3]
			if(cv_scroll.className.match(/flexcrollactive/)=="false"){cv_scroll.fleXcroll.updateScrollBars(true, false);}
			else{fleXenv.fleXcrollMain(cv_scroll);}
		});
	}
	
	// liens menu
	
	var menu_li_length=menu_li.length, val_menu_li_length =menu_li_length-1; m=menu_li_length;
	for(m=val_menu_li_length; m--;){
		if(menu_li[m].id!="cabinet"){
			menu_li[m].onclick=function(){
				if(this.id!="brochure_lien" && this.id!="cabinet"){run(this.getElementsByTagName("a")[0].href.split("?page=")[1]);}
				else{window.open(this.href);}
				return false;
			};
		}
		else{}
	}

	function uploadRun() 
	{
		document.getElementById("uploadStatus").innerHTML = "<img src='images/x.gif'  alt='' title='Téléhargement en cours...' />";
		document.getElementById("uploadSubmit").disabled = true;
		return true;
    }
        
	function uploadEnd(sError, sPath) 
	{
       if(sError == 'OK')
	   {
			document.getElementById("uploadStatus").innerHTML = "<img src='images/v.png'  alt='' title='Téléchargement réussi' />";
			document.getElementById("fichier").value = sPath;
       }
		else
		{
            document.getElementById("uploadStatus").innerHTML = "<img src='images/x.png'  alt='' title='"+sError+"' />";
        }
        document.getElementById("uploadSubmit").disabled = false;
	}


	function SendForm()
	{
		var nom = document.getElementById("nom").value;
		var prenom = document.getElementById("prenom").value;
		var tel = document.getElementById("tel").value;
		var email = document.getElementById("email").value;
		var precisions = document.getElementById("precisions").value;
		var fichier = document.getElementById("fichier").value;
		ajax({page:"mail_rejoindre.php?nom="+nom+"&prenom="+prenom+"&tel="+tel+"&email="+email+"&precisions="+precisions+"&fichier="+fichier+""}, function(data){
			MailOK();
		});
			
		function MailOK()
		{
			document.getElementById('BTsubmit').style.visibility = 'hidden';
			document.getElementById('BTsubmit').style.display = 'none';
			document.getElementById('textOK').style.visibility = 'visible';
			document.getElementById('textOK').style.display = 'block';
		}
	}
