function InitLbox(){var a = document.createElement('div');var b = a.style;a.setAttribute('id', 'LboxFond');b.display = "none";b.position = "absolute";b.top = "0px";b.left = "0px";b.backgroundColor = "#000000";b.zIndex = 10000000;document.body.appendChild(a);a.onclick = function() { HideImg(); };var c = document.createElement('div');var d = c.style;c.setAttribute('id', 'LboxCad');d.display = "none";d.position = "absolute";d.width = "100px";d.height = "100px";d.zIndex = 10000002;d.backgroundColor = "#ffffff";c.align = "center";d.textAlign = "center";var e = document.createElement('Img');e.setAttribute('id', 'LboxLoad');e.style.display = "none";e.style.position = "absolute";e.style.width = SrcLoadingW + "px";e.style.height = SrcLoadingH + "px";e.src = SrcLoading;e.style.zIndex = 10000003;document.body.appendChild(e);var f = document.createElement('img');f.setAttribute('id', 'LboxImg');f.style.margin = "10px";f.style.display = "none";f.src = Spacer;c.appendChild(f);document.body.appendChild(c);var g = document.createElement('div');g.setAttribute('id', 'LboxClose');SClose = g.style;SClose.display = "none";SClose.position = "absolute";SClose.width = "100px";SClose.height = (SrcCloseH) + "px";SClose.zIndex = 10000000;SClose.backgroundColor = "#ffffff";g.align = "center";SClose.textAlign = "center";var h = document.createElement('img');h.setAttribute('id', 'LboxImgClose');h.style.margin = "3px";h.style.width = SrcCloseW + "px";h.style.height = SrcCloseH + "px";h.align = "right";h.src = SrcClose;h.onclick = function() { HideImg(); };h.onmouseover = function() { this.style.cursor = "hand"; this.style.cursor = "pointer"; };h.onmouseout = function() { this.style.cursor = "default"; };g.appendChild(h);document.body.appendChild(g);InitOverFlow = document.body.style.overflow;for (var bi = 0; bi < document.links.length; bi++){var j = document.links[bi];if (j.className == "LBox"){j.onclick = function() { Lbox(this); return false; };}}}function Resize(){if (isShowing){Start();}}function GetWinSize(){WinW = WinWSize();WinH = WinHSize();var a = getId("LboxFond").style;a.top = "0px";a.left = "0px";}function Lbox(a){CurImg = a;bt = sT("Start()", 10);}function Start(){clearTimeout(bt);bt = sT("StartAnim()", 100);}function StartAnim(){GetWinSize();HideAll();ShowFond();}function HideImg(){isShowing = false;NegaAlpha(10, 0, 'LboxCad', '');NegaAlpha(10, 0, 'LboxClose', '');NegaAlpha(FondAlpha, 0, 'LboxFond', 'HideAll');}function HideAll(){clearTimeout(bt);getId("LboxFond").style.display = "none";getId("LboxCad").style.display = "none";getId("LboxLoad").style.display = "none";getId("LboxImg").style.display = "none";getId("LboxClose").style.display = "none";isShowing = false;}function ShowFond(){if (CurImg){isShowing = true;var a = getId("LboxFond").style;a.display = "block";a.width = "100%";a.height = getDocHeight() + "px";Alpha(0, FondAlpha, 'LboxFond', 'ShowCad');}}function ShowCad(){var a = getId("LboxCad").style;a.display = "block";a.top = ((WinH / 2) + getScrollY() - (pI(a.height) / 2)) + "px";a.left = ((WinW / 2) + getScrollX() - (pI(a.width) / 2)) + "px";Alpha(0, 10, 'LboxCad', 'ShowLoading');}function ShowLoading(){var a = getId("LboxLoad").style;a.display = "block";a.top = ((WinH / 2) + getScrollY() - (pI(a.height) / 2)) + "px";a.left = ((WinW / 2) + getScrollX() - (pI(a.width) / 2)) + "px";stopwait = false;Im = new Image();Im.onerror = function(){Im.height = "400";Im.width = "400";stopwait = true;bt = sT("AgrandiHCad()", 0);};Im.src = CurImg.href;Alpha(0, 10, 'LboxLoad', 'WaitImg');}function HideLoading(){getId("LboxLoad").style.display = "none";}function WaitImg(){if (stopwait) return;if (Im.complete){var a = Im.height / Im.width;if (Im.width > WinW - CadMargin - 10){Im.width = WinW - CadMargin - 10;Im.height = Im.width * a;}if (Im.height > WinH - CadMargin - 10){Im.height = WinH - CadMargin - 10;Im.width = Im.height / a;}bt = sT("AgrandiHCad()", 0);}else{bt = sT("WaitImg()", 100);}}function AgrandiHCad(){var a = getId("LboxCad").style;var b = 20;if (pI(a.height) > Im.height) b = b * -1;Agrandi(pI(a.height) + b, Im.height + 20, b, "LboxCad", "h");}function AgrandiWCad(){var a = getId("LboxCad").style;var b = 20;if (pI(a.width) > Im.width) b = b * -1;Agrandi(pI(a.width) + b, Im.width + 20, b, "LboxCad", "w");}function Agrandi(a, b, c, d, e){if (!RedimAnim) a = b;var f = true;if (e == 'h'){getId(d).style.height = a + 'px';getId(d).style.top = pI(getId(d).style.top) - (c / 2) + 'px';}else{getId(d).style.width = a + 'px';getId(d).style.left = pI(getId(d).style.left) - (c / 2) + 'px';}if (c > 0){if (a < b){bt = sT("Agrandi(" + (a + c) + "," + b + "," + c + ",'" + Id + "','" + Typ + "')", 20);f = false;}}else{if (a > b){bt = sT("Agrandi(" + (a + c) + "," + b + "," + c + ",'" + Id + "','" + Typ + "')", 20);f = false;}}if (f){if (e == 'h'){AgrandiWCad();}else{ShowImg();}}}function ShowImg(){HideLoading();var a = getId("LboxCad").style;a.display = "block";a.width = pI(Im.width + 20) + "px";a.height = pI(Im.height + 20) + "px";a.top = pI(((WinH - 20) / 2) + getScrollY() - (pI(Im.height) / 2)) + "px";a.left = pI(((WinW - 20) / 2) + getScrollX() - (pI(Im.width) / 2)) + "px";var b = getId("LboxImg");b.src = CurImg.href;try { b.alt = CurImg.children[0].alt; } catch (ex) {}b.style.display = "block";b.style.width = Im.width + "px";b.style.height = Im.height + "px";Alpha(1, 10, 'LboxImg', 'ShowClose');}function ShowClose(){var a = getId("LboxCad").style;var b = getId("LboxClose").style;b.display = "block";if (!ClosePleineLargeur){b.width = (SrcCloseW + 6) + "px";b.height = (SrcCloseH + 6) + "px";b.top = (pI(a.top) - pI(b.height)) + "px";b.left = (pI(a.left) + pI(a.width) - SrcCloseW - 6) + "px";}else{b.width = pI(a.width) + "px";b.height = (SrcCloseH + 6) + "px";b.top = (pI(a.top) - pI(b.height)) + "px";b.left = pI(a.left) + "px";}Alpha(1, 10, 'LboxClose', '');}function WinWSize(){var a = 0;if (typeof (window.innerWidth) == 'number'){a = window.innerWidth;} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){a = document.documentElement.clientWidth;} else if (document.body && (document.body.clientWidth || document.body.clientHeight)){a = document.body.clientWidth;}return a;}function WinHSize(){var a = 0;if (typeof (window.innerWidth) == 'number'){a = window.innerHeight;} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){a = document.documentElement.clientHeight;} else if (document.body && (document.body.clientWidth || document.body.clientHeight)){a = document.body.clientHeight;}return a;}function getScrollX(){var a = 0;if (typeof (window.pageYOffset) == 'number'){a = window.pageXOffset;} else if (document.body && (document.body.scrollLeft || document.body.scrollTop)){a = document.body.scrollLeft;} else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)){a = document.documentElement.scrollLeft;}return a;}function getScrollY(){var a = 0;if (typeof (window.pageYOffset) == 'number'){a = window.pageYOffset;} else if (document.body && (document.body.scrollLeft || document.body.scrollTop)){a = document.body.scrollTop;} else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)){a = document.documentElement.scrollTop;}return a;}function getDocHeight(){var bD = document;return Math.max(Math.max(bD.body.scrollHeight, bD.documentElement.scrollHeight), Math.max(bD.body.offsetHeight, bD.documentElement.offsetHeight), Math.max(bD.body.clientHeight, bD.documentElement.clientHeight));}function SetAlpha(a, b){if (a.style.MozOpacity){a.style.MozOpacity = b;}else if (a.filters){a.style.filter = 'alpha(opacity=' + (b * 100) + ')';}else{a.style.opacity = b;}}function Alpha(a, b, c, d){var e = getId(c);if (AlphaAnim){SetAlpha(e, (a / 10));}else{SetAlpha(e, b);a = b;}SetAlpha(e, (a / 10));if (a < b){bt = sT("Alpha(" + (a + 2) + "," + b + ",'" + id + "','" + CallFunc + "')", 20);}else if (d != ''){bt = sT(d + "()", 100);}}function NegaAlpha(a, b, c, d){var e = getId(c);if (AlphaAnim){SetAlpha(e, (a / 10));}else{SetAlpha(e, b);a = b;}if (a > b){bt = sT("NegaAlpha(" + (a - 2) + "," + b + ",'" + id + "','" + CallFunc + "')", 20);}else if (d != ''){bt = sT(d + "()", 100);}}function addLoadEvent(a){var b = window.onload;if (typeof window.onload != 'function'){if (window.onload){window.onload = a;}else{var c = window.addEventListener || document.addEventListener;var d = window.attachEvent || document.attachEvent;if (c){c('load', a, true);return true;}else if (d){var e = d('onload', a);return e;}else{}}}else{window.onload = function(){b();a();}}}function addResizeEvent(a){var b = window.resize;if (typeof window.resize != 'function'){if (window.resize){window.resize = a;}else{var c = window.addEventListener || document.addEventListener;var d = window.attachEvent || document.attachEvent;if (c){c('resize', a, true);return true;}else if (d){var e = d('onresize', a);return e;}else{}}}else{window.resize = function(){b();a();}}}function pI(ba) { return parseInt(ba); }function getId(ba) { return document.getElementById(ba); }function sT(ba, bb) { return setTimeout(ba, bb); }function setCookie(a, b, c, d, e){var f = new Date();f.setMinutes(f.getMinutes() + c);var g = b + ((f == null) ? "" : "; expires=" + f.toUTCString()) + "; domain=" + escape(d);document.cookie = a + "=" + g;}function cancelBubble(be){var b = be ? be : window.event;if (b.stopPropagation) b.stopPropagation();b.cancelBubble = true;return false;}function getAbsoluteLeft(a){var b = 0;while (a != null){b += a.offsetLeft;a = a.offsetParent;}return b;}function getAbsoluteTop(a){var b = 0;while (a != null){b += a.offsetTop;a = a.offsetParent;}return b;}function getRealHeight(a){var b = 0;b += a.offsetHeight;return b;}function getKeyValue(a, b){var c = a;var d = "";c = c.split("&");for (bi = 0; bi <= c.length - 1; bi++){var bt = c[bi].split("=");if (bt[0] == b){d = bt[1];break;}}return d;}function getDocHeight(){var bD = document;return Math.max(Math.max(bD.body.scrollHeight, bD.documentElement.scrollHeight), Math.max(bD.body.offsetHeight, bD.documentElement.offsetHeight), Math.max(bD.body.clientHeight, bD.documentElement.clientHeight));}function Add_Event(a, b, c, d){if (a.addEventListener){a.addEventListener(b, c, d ? d : false);}else{a.attachEvent('on' + b, c);}}function Remove_Event(a, b, c, d){if (a.removeEventListener){a.removeEventListener(b, c, d ? d : false);}else{a.detachEvent('on' + b, c);}}function mouseCoords(a){if (a.pageX || a.pageY){return { bx: a.pageX, by: a.pageY };}return { bx: a.clientX + document.body.scrollLeft - document.body.clientLeft, by: a.clientY + document.body.scrollTop - document.body.clientTop };}function GetClientWidth(){return f_filterResults(window.innerWidth ? window.innerWidth : 0, document.documentElement ? document.documentElement.clientWidth : 0, document.body ? document.body.clientWidth : 0);}function GetClientHeight(){return f_filterResults(window.innerHeight ? window.innerHeight : 0, document.documentElement ? document.documentElement.clientHeight : 0, document.body ? document.body.clientHeight : 0);}function GetScrollLeft(){return f_filterResults(window.pageXOffset ? window.pageXOffset : 0, document.documentElement ? document.documentElement.scrollLeft : 0, document.body ? document.body.scrollLeft : 0);}function GetScrollTop(){return f_filterResults(window.pageYOffset ? window.pageYOffset : 0, document.documentElement ? document.documentElement.scrollTop : 0, document.body ? document.body.scrollTop : 0);}function f_filterResults(a, b, c){var d = a ? a : 0;if (b && (!d || (d > b))){d = b;}return c && (!d || (d > c)) ? c : d;}function isNumeric(a){var b = "0123456789";var c = true;var d;for (bi = 0; bi < a.length && c == true; bi++){d = a.charAt(bi);if (b.indexOf(d) == -1){c = false;}}return c;}function getimages(bn, b){if (bn.nodeType == 1){var c = "";if (bn.getAttribute("src")){c = NetoyUrl(bn.getAttribute("src"));}if (bn.getAttribute("background")){c = NetoyUrl(bn.getAttribute("background"));}if (document.all){try{if (bn.currentStyle.backgroundImage != "none"){c = NetoyUrl(bn.currentStyle.backgroundImage);}}catch (ex){}}else if (document.defaultView.getComputedStyle(bn, '').getPropertyValue("background-image") != "none"){c = NetoyUrl(document.defaultView.getComputedStyle(bn, '').getPropertyValue("background-image"));}if (c != ""){b.push(c);}}var d = bn.childNodes;for (var bi = 0; bi < d.length; bi++){getimages(d[bi], b);}}function NetoyUrl(a){var b = a.toLowerCase();if (b.indexOf(".jpg") > -1 || b.indexOf(".jpeg") > -1 || b.indexOf(".gif") > -1 || b.indexOf(".png") > -1){if (b.substr(b.length - 2, 2) == '")'){b = b.substr(0, b.length - 2);}if (b.substr(0, 5) == 'url("'){b = b.substr(5);}}else{b = "";}return b;}function loadScriptDynToHead(a, b){var c = document.getElementsByTagName("head")[0] || document.documentElement;var d = document.createElement("script");d.src = a;var e = false;d.onload = d.onreadystatechange = function(){if (!e && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")){e = true;if (b) b();d.onload = d.onreadystatechange = null;if (c && d.parentNode){c.removeChild(d);}}};c.insertBefore(d, c.firstChild);}function CallTimer(){var a = "";if (!MaintReCall) a = "?checkcancel=1";$WS.ajax({type: 'GET',url: 'SessionRefresh.axd' + a,cache: false,success: function(data, textStatus, jqXHR) {eval(data);},error: function(jqXHR, textStatus, errorThrown) {}});setTimeout('CallTimer()',10000);}function ShowDiv(a){var b = document.getElementById("DivLangue");var c = document.getElementById("DivListeLangue");MyTimer = setTimeout("CacheDiv()", 1000);c.style.display = "block";contY = getAbsoluteTop(b);contX = getAbsoluteLeft(b);var d = a.split("_");var e = c.offsetWidth;var f = c.offsetHeight;var g = b.offsetWidth;var h = b.offsetHeight;var bi = 0;if (d[0] == "Bottom"){contY += h + 5;contX -= (e / 2) - (g / 2);if (d[1] == "Right"){contX += (e / 2) - (g / 2);contX += g + 5;}if (d[1] == "Left"){contX += (e / 2) - (g / 2);contX -= e - g + 5;}}if (d[0] == "Top"){contY -= f + 5;contX -= (e / 2) - (g / 2);if (d[1] == "Right"){contX += (e / 2) - (g / 2);contX += g + 5;}if (d[1] == "Left"){contX += (e / 2) - (g / 2);contX -= e + 5;}}if (d[0] == "Right"){contX += g + 5;contY -= (f / 2) - (h / 2);}if (d[0] == "Left"){contX -= e + 5;contY -= (f / 2) - (h / 2);}c.style.top = contY + "px";c.style.left = contX + "px";}function CacheDiv(){MyTimerCache = setTimeout("CacheDiv2()", 300);}function CacheDiv2(){document.getElementById("DivListeLangue").style.display = "none";}function OverLLang(){clearTimeout(MyTimer);clearTimeout(MyTimerCache);}function InitMenu(){var a = document.getElementsByTagName("html")[0];if (!a){setTimeout("InitMenu()", 500);}else{Add_Event(a, 'click', MenuHide);}}function GetCommonOffsetParent(a, b){var c = [];while (a.offsetParent){c.push(a.offsetParent);a = a.offsetParent;}var d = [];while (b.offsetParent){d.push(b.offsetParent);b = b.offsetParent;}var e = null;for (var bi = 0; bi < c.length && !e; bi++){for (var bj = 0; bj < d.length && !e; bj++){if (c[bi] === d[bj]) e = c[bi];}}return e;}function getNewAbsoluteLeft(a, b){var c = 0;while (a != null && a != b){c += a.offsetLeft;a = a.offsetParent;}return c;}function MenuOver(a, b, c, d){window.clearTimeout(MenuTimer);if (CurrentSousMenu){if (CurrentSousMenu.id != a.id + "_Items" && CurrentSousMenu.id != c + "_Items"){MenuHide();}}a.Typ = b;a.ParentId = c;var e = document.getElementById(a.id + "Left");var f = document.getElementById(a.id + "Mid");var g = document.getElementById(a.id + "Right");e.className = "Sel" + b + "Left hand";f.className = "Sel" + b + "Mid hand nowrap";g.className = "Sel" + b + "Right hand";var h = document.getElementById(c);if (h){var i = document.getElementById(h.id + "Left");var j = document.getElementById(h.id + "Mid");var k = document.getElementById(h.id + "Right");i.className = "Sel" + h.Typ + "Left hand";j.className = "Sel" + h.Typ + "Mid hand nowrap";k.className = "Sel" + h.Typ + "Right hand";}var l = document.getElementById(a.id + "_Items");if (l){l.style.top = (parseInt(getAbsoluteTop(a)) + document.getElementById(a.id + "Mid").offsetHeight) + "px";l.style.visibility = "hidden";l.style.display = "";var m = GetCommonOffsetParent(l, e);var n = (parseInt(getNewAbsoluteLeft(e, m)));if (d){var o = document.getElementById(a.id + "Left").offsetWidth + document.getElementById(a.id + "Mid").offsetWidth + document.getElementById(a.id + "Right").offsetWidth;l.style.left = (n + ((o / 2) - (l.offsetWidth / 2))) + "px";}else{l.style.left = n + "px";}l.style.visibility = "visible";CurrentSousMenu = l;CurrentSousMenu.ParentId = a.id;if (IsFromPage && b == 'Main'){var p = document.getElementById((a.id + 'FirstItem').replace('Main', ''));if (!p) p = document.getElementById((a.id + 'LastItem').replace('Main', ''));CurrentSousMenuWidth = p.offsetWidth;CurrentSousMenu.style.width = (CurrentSousMenuWidth + 20) + 'px';CurrentSousMenu.style.height = '168px';CurrentSousMenu.style.overflowY = 'auto';CurrentSousMenu.style.overflowX = 'hidden';}}}function MenuOut(a, b, c){var d = document.getElementById(a.id + "Left");var e = document.getElementById(a.id + "Mid");var f = document.getElementById(a.id + "Right");d.className = b + "Left";if (ie6) MenuBgIe6Hack(d);e.className = b + "Mid nowrap";if (ie6) MenuBgIe6Hack(e);f.className = b + "Right";if (ie6) MenuBgIe6Hack(f);MenuTimer = window.setTimeout("MenuHide()", 700);}function MenuHide(){if (CurrentSousMenu){CurrentSousMenu.style.display = "none";var a = document.getElementById(CurrentSousMenu.ParentId);if (a){var b = document.getElementById(a.id + "Left");var c = document.getElementById(a.id + "Mid");var d = document.getElementById(a.id + "Right");b.className = a.Typ + "Left hand";if (ie6) MenuBgIe6Hack(b);c.className = a.Typ + "Mid hand nowrap";if (ie6) MenuBgIe6Hack(c);d.className = a.Typ + "Right hand";if (ie6) MenuBgIe6Hack(d);}CurrentSousMenu = undefined;}}function MenuBgIe6Hack(a){if (a.runtimeStyle.backgroundImage.match(/\.png/i) !== null){alert(a.currentStyle.backgroundImage);var b = a.currentStyle.backgroundImage;var c = b.substring(5, b.length - 2);var d = 'scale';if (a.currentStyle.backgroundRepeat == 'no-repeat'){d = 'crop';}a.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='" + mode + "')";a.style.backgroundImage = 'url(' + shim + ')';}}function SelectPlaceMenu(a, b, c){try{alert(a + ' ' + b);var d = document.getElementById(CurrentSousMenu.id);MenuSelectPlace(a, b);}catch (be){}}var SrcLoading = "Images/ImgLBox/Loading.gif";var SrcLoadingW = 32;var SrcLoadingH = 32;var SrcClose = "Images/ImgLBox/close.gif";var SrcCloseW = 26;var SrcCloseH = 26;var Spacer = "Images/ImgLBox/Spacer.gif";var ClosePleineLargeur = true;var AlphaAnim = false;var RedimAnim = false;var FondAlpha = 8;var CadMargin = 150;var CurImg;var isShowing = false;var WinW = 0;var WinH = 0;var Im;var t;var InitOverFlow = "auto";var stopwait = false;addLoadEvent(function() { InitLbox(); });addResizeEvent(function() { Resize(); });var Url = {encode: function(string){return escape(this._utf8_encode(string));},decode: function(string){return this._utf8_decode(unescape(string));},_utf8_encode: function(string){string = string.replace(/\r\n/g, "\n");var utftext = "";for (var n = 0; n < string.length; n++){var c = string.charCodeAt(n);if (c < 128){utftext += String.fromCharCode(c);}else if ((c > 127) && (c < 2048)){utftext += String.fromCharCode((c >> 6) | 192);utftext += String.fromCharCode((c & 63) | 128);}else{utftext += String.fromCharCode((c >> 12) | 224);utftext += String.fromCharCode(((c >> 6) & 63) | 128);utftext += String.fromCharCode((c & 63) | 128);}}return utftext;},_utf8_decode: function(utftext){var string = "";var i = 0;var c = c1 = c2 = 0;while (i < utftext.length){c = utftext.charCodeAt(i);if (c < 128){string += String.fromCharCode(c);i++;}else if ((c > 191) && (c < 224)){c2 = utftext.charCodeAt(i + 1);string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));i += 2;}else{c2 = utftext.charCodeAt(i + 1);c3 = utftext.charCodeAt(i + 2);string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));i += 3;}}return string;}};var MaintReCall=true;var contX = 0;var MyTimer = null;var MyTimerCache = null;var ie6 = false;var CurrentSousMenu;var CurrentSousMenuWidth;var IsFromPage = false;InitMenu();var MenuTimer;