﻿var css_browser_selector = function() { var d = navigator.userAgent.toLowerCase(), g = function(b) { return d.indexOf(b) != -1 }, f = document.getElementsByTagName("html")[0], a = (!(/opera|webtv/i.test(d)) && /msie (\d)/.test(d)) ? ("ie ie" + RegExp.$1) : g("gecko/") ? "gecko" : g("opera/9") ? "opera opera9" : /opera (\d)/.test(d) ? "opera opera" + RegExp.$1 : g("konqueror") ? "konqueror" : g("applewebkit/") ? "webkit safari" : g("mozilla/") ? "gecko" : "", k = (g("x11") || g("linux")) ? " linux" : g("mac") ? " mac" : g("win") ? " win" : ""; var l = a + k + " js"; f.className += f.className ? " " + l : l } (); try { document.execCommand("BackgroundImageCache", false, true) } catch (e) { } var TsDocRef = null; var X_nameNavigateur = "FF"; var X_versionNavigateur = 0; mon_navigateur(navigator.appVersion); function mon_navigateur(d) { var c = d.split(";"); for (var b in c) { if (c[b].indexOf("MSIE") > -1) { X_nameNavigateur = "IE"; var a = c[b].replace("MSIE", ""); X_versionNavigateur = a.replace(" ", "") } } } function $LoadPopupAlerte() { if ($("alerte_dispo_select")) { $("alerte_dispo_select").options.length = 0 } if ($("TsMemoTaille") && $("alerte_dispo_select")) { var b = $c($("TsMemoTaille"), "option"); for (var a = 0; a < b.length; a++) { $("alerte_dispo_select").options[a] = new Option($("TsMemoTaille").options[a].text, $("TsMemoTaille").options[a].value) } $("alerte_dispo_select").selectedIndex = parseInt($("TsMemoTaille").getAttribute("index")) } if ($("alerte_dispo_select").options.length == 0) { $("alerte_dispo_select").options[0] = new Option($("TsIdProduit").value, $("TsIdProduit").value); $("popup_alerte_produit").style.display = "none" } if ($("alerte_dispo_select").options.length == 0) { $("popup_alerte_produit").style.display = "none" } if ($("titre_page_produit") && $("alerte_dispo_titre")) { $("alerte_dispo_titre").innerHTML = $("titre_page_produit").innerHTML + " est en rupture de stock ! " } if ($("alerte_id_secteur")) { $("alerte_id_secteur").value = window.TsIdSecteur } if ($("alerte_fin_url")) { $("alerte_fin_url").value = $("TsFinUrl").value } if ($("alerte_lib_secteur")) { $("alerte_lib_secteur").value = $("TsLibSecteur").value } if ($("alerte_lib_famille")) { $("alerte_lib_famille").value = $("TsLibFamille").value } if ($("alerte_mail_utilisateur")) { $("alerte_mail_utilisateur").value = $("TsMailUtilisateur").value } if (document.getElementById("mail")) { document.getElementById("mail").value = $("alerte_mail_utilisateur").value } } var ongletTgCourant = ""; function changeOngletTg(a, b) { if (a == "0") { setInvisible("gondolas-products-1"); setInvisible("gondolas-products-2"); setVisible("gondolas-products-0"); if ($n("header_gondolas_1") != null) { $n("header_gondolas_1").className = "" } if ($n("header_gondolas_2") != null) { $n("header_gondolas_2").className = "" } } else { if (a == "1") { setInvisible("gondolas-products-0"); setInvisible("gondolas-products-2"); setVisible("gondolas-products-1"); if ($n("header_gondolas_0") != null) { $n("header_gondolas_0").className = "" } if ($n("header_gondolas_2") != null) { $n("header_gondolas_2").className = "" } } else { if (a == "2") { setInvisible("gondolas-products-0"); setInvisible("gondolas-products-1"); setVisible("gondolas-products-2"); if ($n("header_gondolas_0") != null) { $n("header_gondolas_0").className = "" } if ($n("header_gondolas_1") != null) { $n("header_gondolas_1").className = "" } } } } $n("header_gondolas_" + a).className = "active" } var compteurSport; function mouseOutSport(a, b) { compteurSport = setTimeout("mouseOut('" + a + "','" + b + "')", 100) } function mouseOver(a, b) { if ($n(a)) { $n(a).className = "sport2actif" } if ($n(b)) { $n(b).style.display = "block" } if ($n("iframe_" + b)) { $n("iframe_" + b).style.display = "block"; $n("iframe_" + b).style.width = $n(b).offsetWidth + "px"; $n("iframe_" + b).style.height = $n(b).offsetHeight + "px" } clearTimeout(compteurSport) } function mouseOut(a, b) { clearTimeout(compteurSport); if ($n(a)) { $n(a).className = "sport2" } if ($n(b)) { $n(b).style.display = "none" } if ($n("iframe_" + b)) { $n("iframe_" + b).style.display = "none" } } function categEffect(d, c, b, a) { if (c && (c.timer == undefined || c.timer == null)) { c.fromLine = b; c.toLine = a; c.timer = new Timer(c, tickOpen, stopTickOpen, 10, a - b); c.timer.start(); setInvisible(d) } } function tickOpen(f, d, c) { var b = $c(f, "li"); var a = f.fromLine + d - 1; setVisible(b[a]) } function stopTickOpen(c, b, a) { } function Timer(a, f, d, b, c) { this.owner = a; this.callback = f; this.stopCallback = d; this.ms = b; this.nbTicks = c; this.tickNumber = 0 } Timer.prototype = { start: function() { var a = this; this.intervalId = setInterval(function() { a._tick(a.ms) }, this.ms) }, stop: function() { this.owner.timer = null; clearInterval(this.intervalId); this.stopCallback(this.owner, this.tickNumber, this.nbTicks) }, _tick: function() { ++this.tickNumber; this.callback(this.owner, this.tickNumber, this.nbTicks); if (this.tickNumber == this.nbTicks) { this.stop() } } }; function setClass(c, b) { var a = $n(b); if (!a) { return false } a.className = c } function setVisible(a) { if (!$n(a)) { return false } $n(a).style.display = "block"; $n(a).style.visibility = "visible" } function setInvisible(a) { if (!$n(a)) { return false } $n(a).style.display = "none"; $n(a).style.visibility = "hidden" } function makeVisileFilters(b, a) { if (!$n(b)) { return false } if (!$n(a)) { return false } setInvisible(b); setVisible(a) } function $ClearPropagation(a) { if (!a) { a = window.event } a.preventDefault ? a.preventDefault() : a.returnValue = false; a.stopPropagation ? a.stopPropagation() : a.cancelBuble = true } function openPopPup(c, a, b) { window.open(c, a, b) } function Contains(c, a) { for (var b = 0; b < c.length; b++) { if (c[b] == a) { return true } } return false } function $n(a) { return (typeof a == "string") ? a = document.getElementById(a) : a } function $t(a) { return $n(a).tagName ? $n(a).tagName.toLowerCase() : "" } function $c(g, f) { var b = f ? f.toLowerCase().split("|") : null; var c = new Array; if (!$n(g).childNodes) { return null } for (var d = 0; d < $n(g).childNodes.length; d++) { if (!b) { if ($n(g).childNodes[d].tagName) { c[c.length] = $n(g).childNodes[d] } } else { if (Contains(b, $t($n(g).childNodes[d]))) { c[c.length] = $n(g).childNodes[d] } } } return c } function $p(c, b) { if (!c) { return null } var a = b ? b.toLowerCase().split("|") : null; return $t(c) == "body" ? null : (Contains(a, $t(c)) ? $n(c) : $p($n(c).parentNode, b)) } function GetSrcElt(a) { a = a || window.event; if (a.srcElement) { return a.srcElement } else { if (a.target) { return a.target } } return null } function AddClassName(b, c) { var a = c.split("|"); for (i in a) { if (b.indexOf(a[i]) > -1) { continue } if (b.length > 0) { b += " " + a[i] } else { b = a[i] } } return b } function DeleteClassName(c, d) { var b = d.split("|"); for (i in b) { if (c.indexOf(b[i]) <= -1) { continue } var a = c.split(" "); for (j in a) { if (a[j] == b[i]) { a[j] = "" } } c = a.join(" ") } return c } function Contains(c, a) { for (var b = 0; b < c.length; b++) { if (c[b] == a) { return true } } return false } function $(a) { return (typeof a == "string") ? a = document.getElementById(a) : a } function $t(a) { return $(a).tagName ? $(a).tagName.toLowerCase() : "" } function $c(g, f) { var b = f ? f.toLowerCase().split("|") : null; var c = new Array; if (!$(g).childNodes) { return null } for (var d = 0; d < $(g).childNodes.length; d++) { if (!b) { if ($(g).childNodes[d].tagName) { c[c.length] = $(g).childNodes[d] } } else { if (Contains(b, $t($(g).childNodes[d]))) { c[c.length] = $(g).childNodes[d] } } } return c } function $p(c, b) { if (!c) { return null } var a = b ? b.toLowerCase().split("|") : null; return $t(c) == "body" ? null : (Contains(a, $t(c)) ? $(c) : $p($(c).parentNode, b)) } function GetSrcElt(a) { if (!a) { a = window.e } if (a.srcElement) { return a.srcElement } if (a.target) { return a.target } return null } function isValidEmail(b) { var a = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; return a.test(b) } function checkPlatformOxylaneID(a) { var d = null; if (window.XMLHttpRequest) { d = new XMLHttpRequest() } else { if (window.ActiveXObject) { try { d = new ActiveXObject("Msxml2.XMLHTTP") } catch (b) { try { d = new ActiveXObject("Microsoft.XMLHTTP") } catch (c) { d = null } } } else { alert("Your browser does not support XMLHTTPRequest...") } } if (d) { d.open("GET", a, true); d.onreadystatechange = function() { if (d.readyState == 4 && d.responseText) { } }; d.send(null) } } function showGrilleOver(a, b) { $("product_" + a).style.zIndex = 2; $("description_autres_" + a).style.display = "block" } function hideGrilleOver(a, b) { $("product_" + a).style.zIndex = 1; $("description_autres_" + a).style.display = "none" } function affiche_menu(a, b) { if (document.getElementById(a) != null) { document.getElementById(a).style.display = "" } document.getElementById(b).className = "actif" } function cache_menu(a, b) { if (document.getElementById(a) != null) { document.getElementById(a).style.display = "none" } document.getElementById(b).className = "" } function cache_fr() { if (document.getElementById("frame_1euro")) { document.getElementById("frame_1euro").style.display = "none" } } function CheckCustomerState(b, c) { document.getElementById("divResult4").innerHTML = ""; document.getElementById("divResult5").style.display = "inline"; var a = null; if (window.XMLHttpRequest) { a = new XMLHttpRequest(); a.open("GET", b, false); a.send(null); dispatchResultCheckCustomerState(a, c) } else { if (window.ActiveXObject) { a = new ActiveXObject("Microsoft.XMLHTTP"); a.open("GET", b, false); a.onreadystatechange = function() { dispatchResultCheckCustomerState(a, c) }; a.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); a.send(null) } else { alert(_messageErrorAjax); return } } a.abort() } function dispatchResultCheckCustomerState(xhr_object, form) { if (xhr_object.readyState == 4) { var result = eval("(" + xhr_object.responseText + ")"); document.getElementById("divResult5").style.display = "none"; if (result.state == "success") { LanceConnexion(_urlSendConnect + "?USERNAME=" + result.USERNAME + "&PASSWORD=" + result.PASSWORD, form) } else { if (result.state == "blacklisted") { document.getElementById("divResult4").innerHTML = _messageErrorBlacklist } else { document.getElementById("divResult4").innerHTML = _messageErrorConnect } } } } function VerifyMail(b, c) { document.getElementById("emailValidate").innerHTML = ""; document.getElementById("divResult5").style.display = "inline"; var a = null; if (window.XMLHttpRequest) { a = new XMLHttpRequest(); a.open("GET", b, false); a.send(null); return dispatchResultVerifyMail(a, c) } else { if (window.ActiveXObject) { a = new ActiveXObject("Microsoft.XMLHTTP"); a.open("GET", b, false); a.onreadystatechange = function() { return dispatchResultVerifyMail(a, c) }; a.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); a.send(null) } else { alert(_messageErrorAjax); return } } a.abort() } function dispatchResultVerifyMail(xhr_object, form) { if (xhr_object.readyState == 4) { var result = eval("(" + xhr_object.responseText + ")"); document.getElementById("divResult5").style.display = "none"; if (result.state == "-1") { form.submit() } else { if (result.state == "1" || result.state == "3") { document.getElementById("emailValidate").innerHTML = _messageErrorInvalidEmail } else { if (result.state == "duplicate") { document.getElementById("emailValidate").innerHTML = _messageErrorDuplicate } else { if (result.state == "error") { document.getElementById("emailValidate").innerHTML = _messageErrorDuplicate } else { document.getElementById("emailValidate").innerHTML = _messageErrorNotSameEmail } } } } } } function LanceConnexion(b, c) { document.getElementById("divResult4").innerHTML = ""; document.getElementById("divResult5").style.display = "inline"; var a = null; if (window.XMLHttpRequest) { a = new XMLHttpRequest(); a.open("GET", b, false); a.send(null); dispatchResultConnexion(a, c) } else { if (window.ActiveXObject) { a = new ActiveXObject("Microsoft.XMLHTTP"); a.open("GET", b, false); a.onreadystatechange = function() { dispatchResultConnexion(a, c) }; a.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); return a.send(null) } else { alert(_messageErrorAjax); return } } a.abort() } function dispatchResultConnexion(a, b) { if (a.readyState == 4) { document.getElementById("divResult5").style.display = "none"; if (a.responseText.indexOf("Not") == -1) { b.submit() } else { document.getElementById("divResult4").innerHTML = _messageErrorConnect } } } function checkMailForForgotPass(b) { document.getElementById("divResult4").innerHTML = ""; if (document.getElementById("USERNAME_BUXY") != null && document.getElementById("USERNAME_BUXY").value != "") { document.getElementById("USERNAME").value = document.getElementById("USERNAME_BUXY").value; document.getElementById("divBuxyResult4").innerHTML = "" } if (document.getElementById("USERNAME") == null || document.getElementById("USERNAME").value == "") { document.getElementById("divResult4").innerHTML = _messageErrorInvalidMail; return } var a = null; if (window.XMLHttpRequest) { a = new XMLHttpRequest(); a.open("GET", b, false); a.send(null); displayResultForgotPass(a) } else { if (window.ActiveXObject) { a = new ActiveXObject("Microsoft.XMLHTTP"); a.open("GET", b, false); a.onreadystatechange = function() { displayResultForgotPass(a) }; a.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); a.send(null) } else { alert(_messageErrorAjax); return } } a.abort() } function displayResultForgotPass(a) { if (a.readyState == 4) { if (document.getElementById("USERNAME_BUXY") != null && document.getElementById("USERNAME_BUXY").value != "") { document.getElementById("divBuxyResult5").style.display = "none"; if (a.responseText.indexOf("Not") == -1) { document.getElementById("divBuxyResult4").innerHTML = _messagePasswordSend } else { document.getElementById("divBuxyResult4").innerHTML = _messageErrorPasswordSend } return } document.getElementById("divResult5").style.display = "none"; if (a.responseText.indexOf("Not") == -1) { document.getElementById("divResult4").innerHTML = _messagePasswordSend } else { document.getElementById("divResult4").innerHTML = _messageErrorPasswordSend } } } function checkNewsletterMail() { email = document.getElementById("email").value; if (email == null || email == "") { document.getElementById("newsletterValidate").innerHTML = _messageErrorMissingEmail; return false } else { if (!isValidEmail(email)) { document.getElementById("newsletterValidate").innerHTML = _messageErrorInvalidEmail; return false } } return true } function checkNotificationMail(b) { email = document.getElementById("email").value; if (email == null || email == "") { document.getElementById("notificationValidate").innerHTML = _messageErrorMissingEmail; return false } else { if (!isValidEmail(email)) { document.getElementById("notificationValidate").innerHTML = _messageErrorInvalidMailIncorrect; return false } } var a = null; if (window.XMLHttpRequest) { a = new XMLHttpRequest(); a.open("GET", b, false); a.send(null); displayResultNotificationMail(a) } else { if (window.ActiveXObject) { a = new ActiveXObject("Microsoft.XMLHTTP"); a.open("GET", b, false); a.onreadystatechange = function() { displayResultNotificationMail(a) }; a.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); a.send(null) } else { alert(_messageErrorAjax); return } } a.abort(); return true } function displayResultNotificationMail(a) { if (a.readyState == 4) { document.getElementById("notificationValidate").innerHTML = ""; if (a.responseText.indexOf("Not") == -1) { document.getElementById("notificationValidate").innerHTML = _messageNotificationProductOK; setInterval("$HidePopup()", 1000) } else { document.getElementById("notificationValidate").innerHTML = _messageNotificationProductNOK } } } function hideCombos() { return } function showCombos() { return } function selectMdr() { var c = _URL_MDR_OSMOSE; var b = "post"; if (document.getElementById("mdrCat")) { var a = document.getElementById("mdrCat").value; if (a == "2") { c = _URL_MDR_ITOOL; b = "get" } } launchSearch(c, b) } function launchSearch(d, f) { var b = document.getElementById("searchform"); if (b) { b.action = d; b.method = f; var c = document.getElementById("language").value; var a = document.getElementById("searchedText").value; if (d == _URL_MDR_ITOOL) { var g = c.toUpperCase(); document.getElementById("language").value = g; document.getElementById("text").value = a } b.submit() } } function $Load() { $Png() } var TsNameNavigateur = "FF"; var TSVersionNavigateur = 0; var TsAfficheFiltre = false; var TsDocRef = null; function $Png(TsDocument) { TsDocument = TsDocument || null; if (!$("SitewebUrl")) { return false } var browser = navigator.appName; var b_version = navigator.appVersion; var version = parseFloat(b_version); if (browser == "Microsoft Internet Explorer" && version < 7) { if ($(TsDocument)) { TsDocument = document.getElementById(TsDocument) } else { TsDocument = document.getElementById("globale") } var TsTabElements = TsDocument.getElementsByTagName("img"); for (var i = 0; i < TsTabElements.length; i++) { if (TsTabElements[i].src.match(/\.png/i) == null) { continue } with (TsTabElements[i]) { style.width = width + "px"; style.height = height + "px"; style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"; src = "/skins/images/bg-blank-big.gif" } } } } function $Request() { var a; try { a = new ActiveXObject("Msxml2.XMLHTTP") } catch (b) { } try { a = new ActiveXObject("Microsoft.XMLHTTP") } catch (b) { } try { a = new XMLHttpRequest() } catch (b) { } return a } function $Document() { if (TsDocRef == null) { if (document.documentElement && document.documentElement.clientWidth) { TsDocRef = document.documentElement } else { TsDocRef = document.body } } } function $GestionFiltre() { if (!$("filter")) { return false } if (TsAfficheFiltre) { setTimeout("$ShowFilter()", 20); setTimeout("$PositionPopup()", 20) } } function $ShowFilter() { if (!$("filter")) { $CreateFilter(); return false } if (!TsAfficheFiltre) { $("filter").style.visibility = "hidden"; window.addEventListener ? window.addEventListener("resize", $GestionFiltre, false) : window.attachEvent("onresize", $GestionFiltre); window.addEventListener ? window.addEventListener("DOMMouseScroll", $GestionFiltre, false) : window.attachEvent("DOMMouseScroll", $GestionFiltre); window.addEventListener ? window.addEventListener("scroll", $GestionFiltre, false) : window.attachEvent("onscroll", $GestionFiltre) } if (TsAfficheFiltre) { $("filter").style.display = "none" } if (!TsDocRef) { $Document() } TsLargeur = parseInt(TsDocRef.clientWidth) + parseInt(TsDocRef.scrollLeft); window.innerHeight ? TsClientHeight = window.innerHeight : TsClientHeight = TsDocRef.clientHeight; TsHauteur = parseInt(TsClientHeight) + parseInt(TsDocRef.scrollTop); if ($("globale")) { if ($("globale").offsetHeight > TsHauteur) { TsHauteur = parseInt($("globale").offsetHeight) } if ($("globale").offsetWidth > TsLargeur) { TsLargeur = parseInt($("globale").offsetWidth) } } $("filter").style.width = TsLargeur + "px"; $("filter").style.height = TsHauteur + "px"; if (!TsAfficheFiltre) { if (TsNameNavigateur == "IE" && TSVersionNavigateur < 7) { $GestionSelect("hidden") } $("filter").style.visibility = "visible"; TsAfficheFiltre = true } $("filter").style.display = "block" } function $HideFilter() { if ($("filter")) { $("filter").style.display = "none" } if (TsNameNavigateur == "IE" && TSVersionNavigateur < 7) { $GestionSelect("visible") } TsAfficheFiltre = false } function $CreateFilter() { var b = document.getElementsByTagName("body"); if (!b[0]) { return false } var d = document.createElement("div"); var a = "position:absolute;top:0;left:0;width:0px;height:0px;z-index:999998;display:none;overflow:hidden;background:" + window.TsBackgroundColor; var c = "$HidePopup();return false;"; d.setAttribute("id", "filter"); d.setAttribute("style", a); d.style.cssText = a; b[0].appendChild(d); if ($("filter")) { $ChangeOpacity(70, "filter"); $ShowFilter() } } function $OpenFilePopup(b, c) { var a = $Request(); a.open("GET", b, true); a.onreadystatechange = function() { if (a.readyState == 4) { if (a.status == 200) { $ReadFilePopup(a, c); $ShowPopup1(0); $EvalScript() } else { $("popup").innerHTML = "Erreur de lecture du fichier " + b; setTimeout("$HidePopup()", 5000) } } }; a.send(null) } function $ReadFilePopup(a, b) { if (!a) { return null } switch (b) { case "XML": var c = a.responseXML; break; case "HTML": $("popup").innerHTML = $GetContentPopup(a.responseText); break } } function $GetContentPopup(b) { var a = b.indexOf("<!-- Start popup --"); a = b.indexOf(">", a); var c = b.lastIndexOf("<!-- End popup -->"); return b.slice(a + 1, c) } function $ShowPopup(f, g, c) { if (!$("SitewebUrl")) { return false } g = g || "#fff"; window.TsBackgroundColor = g; if (!$("popup")) { $CreatePopup(f, c); return false } var b = navigator.appName; var d = navigator.appVersion; var a = parseFloat(d); if (b == "Microsoft Internet Explorer" && a < 7) { $GestionSelect("hidden") } $OpenFilePopup(f + "?nocache=" + Math.random(), "HTML") } function $ShowPopup1(c) { $ShowFilter(); $("popup").style.display = "block"; $Png("popup"); var b = $("popup").childNodes; for (var a = 0; a < b.length; a++) { if (b[a].tagName) { $("popup").style.offsetWidth = parseInt(b[a].offsetWidth) + "px"; $("popup").style.offsetHeight = parseInt(b[a].offsetHeight) + "px" } if (b[a].id && b[a].id == "popup_alerte") { $LoadPopupAlerte() } } if (document.getElementById("url_redirection") && document.getElementById("GoUrl")) { document.getElementById("GoUrl").value = document.getElementById("url_redirection").value } $PositionPopup() } function $EvalScript() { var lesExecutes = document.getElementsByName("popupexecute"); var j = 0; for (j = 0; j < lesExecutes.length; j++) { var lesScripts = lesExecutes[j].getElementsByTagName("script"); var i = 0; for (i = 0; i < lesScripts.length; i++) { if (!(lesScripts[i].innerHTML.indexOf("swfobject") > -1)) { eval(lesScripts[i].innerHTML) } } } } function $OpenFileResult(b, c) { $ShowPopup("/img/sporthome/Template/popups/loader.html", "#fff"); var a = $Request(); a.open("GET", b, true); a.onreadystatechange = function() { if (a.readyState == 4) { if (a.status == 200) { $ReadFileResult(a, c); $HidePopup(); $ShowResult1() } else { $("popup").innerHTML = '<div style="position:relative;width:400px;height;200px;color:#f00;padding:10px;background:#fff;">Erreur de lecture du fichier ' + b + "</div>"; setTimeout("$HidePopup()", 5000); return false } } }; a.send(null) } function $ReadFileResult(a, b) { if (!a) { return null } switch (b) { case "XML": window.TsResponse50 = a.responseXML; break; case "HTML": window.TsResponse00 = $GetContentResult(a.responseText, '<div id="liste_produit_content" class="block_float">', '<div style="display:none;">Fin liste_produit</div>'); window.TsResponse01 = $GetContentResult(a.responseText, '<div id="values_xml_content">', '<div style="display:none;">Fin values_xml_content</div>'); window.TsResponse02 = $GetContentResult(a.responseText, '<div id="filters_xml_content">', '<div style="display:none;">Fin filters_xml_content</div>'); break } } function $GetContentResult(c, f, b) { var a = c.indexOf(f); var d = c.lastIndexOf(b); return c.slice(a, d) } function $ShowResultTempo() { setTimeout("$ShowResult()", 50) } function $ShowResult() { var a = $InitParamsResult(); if (a == "false") { return false } $OpenFileResult("/rayonbis.aspx?id_secteur=" + window.TsIdSecteur + "&id_famille=" + window.TsIdFamille + a + "&nocache=" + Math.random(), "HTML"); return false } function $ShowResult1() { if (!$("liste_produit")) { return false } $("liste_produit").innerHTML = window.TsResponse00; if ($("values_xml")) { $("values_xml").innerHTML = window.TsResponse01 } if ($("filters_xml")) { $("filters_xml").innerHTML = window.TsResponse02 } return false } function $InitParamsResult() { var a = ""; var b = ""; if ($("TsNumPageActive").value == null || $("TsNumPageActive").value == "" || isNaN($("TsNumPageActive").value)) { $("TsNumPageActive").value = 1 } a = $("TsNumPageActive").value + "-" + $("TsChoixtri").value + "-" + $("TsOrdretri").value; b += "&Parametre=" + a; if ($("filter_profils")) { a = $CheckFilter("filter_profils"); b += "&Profils=" + a } if ($("filter_niveaux")) { a = $CheckFilter0("filter_niveaux"); b += "&Niveaux=" + a } if ($("TsMemoBudgetSmin") && $("TsMemoBudgetSmax")) { b += "&PrixMinS=" + $("TsMemoBudgetSmin").value; b += "&PrixMaxS=" + $("TsMemoBudgetSmax").value } if ($("TsMemoPoidsSmin") && $("TsMemoPoidsSmax")) { b += "&PoidsMinS=" + $("TsMemoPoidsSmin").value; b += "&PoidsMaxS=" + $("TsMemoPoidsSmax").value } if ($("filter_marques")) { a = $CheckFilter("filter_marques"); b += "&Marques=" + a } if ($("filter_types")) { a = $CheckFilter("filter_types"); b += "&Types=" + a } if ($("filter_taille")) { a = $CheckFilter("filter_taille"); b += "&Declinaisons=" + a } if ($("filter_dispos")) { a = $CheckFilter("filter_dispos"); b += "&Dispos=" + a } if ($("filter_couleurs")) { a = $CheckFilter1("filter_couleurs"); b += "&Familles=" + a } return b } function $CheckFilter(f) { if (!$(f)) { return null } var d = ""; var c = $(f).getElementsByTagName("p"); for (var b = 0; b < c.length; b++) { var a = c[b].className; if (a.indexOf("checkbox_on") != -1) { if (d == "") { d = c[b].getAttribute("paramnum") } else { d = d + "_" + c[b].getAttribute("paramnum") } } } return d } function $CheckFilter0(f) { if (!$(f)) { return null } var d = ""; var c = $(f).getElementsByTagName("a"); for (var b = 0; b < c.length; b++) { var a = c[b].className; if (a.toLowerCase().indexOf("niveau_") != -1) { if (a.toLowerCase().indexOf("_actif") != -1) { if (d == "") { d = c[b].getAttribute("paramnum") } else { d = d + "_" + c[b].getAttribute("paramnum") } } } } return d } function $CheckFilter1(f) { if (!$(f)) { return null } var d = ""; var c = $(f).getElementsByTagName("div"); for (var b = 0; b < c.length; b++) { var a = c[b].className; if (a.toLowerCase().indexOf("block_couleur_actif") != -1) { if (d == "") { d = c[b].getAttribute("paramnum") } else { d = d + "_" + c[b].getAttribute("paramnum") } } } return d } function $_CheckFilter(d, c) { c = c || window.event; if (!$(d)) { $ClearPropagation(c); return false } switch (d) { case "filter_profils": case "filter_marques": case "filter_types": case "filter_taille": var b = $(d).getElementsByTagName("p"); for (var a = 0; a < b.length; a++) { if (b[a].className.indexOf("checkbox_on") != -1) { b[a].className = "checkbox_off" } } break; case "filter_dispos": var b = $(d).getElementsByTagName("p"); for (var a = 0; a < b.length; a++) { if (b[a].className.indexOf("checkbox_off") != -1) { b[a].className = "checkbox_on" } } break; case "filter_niveaux": var b = $(d).getElementsByTagName("a"); for (var a = 0; a < b.length; a++) { if (b[a].className.toLowerCase().indexOf("niveau_") != -1 && b[a].className.toLowerCase().indexOf("_actif") != -1) { b[a].className = b[a].className.substring(0, b[a].className.toLowerCase().indexOf("_actif")) } } break; case "filter_couleurs": var b = $(d).getElementsByTagName("div"); for (var a = 0; a < b.length; a++) { if (b[a].className.toLowerCase().indexOf("block_couleur_actif") != -1) { b[a].className = "block_couleur" } } break } $ClearPropagation(c) } function $HidePopup() { $("popup").style.display = "none"; $("popup").innerHTML = ""; var b = navigator.appName; var c = navigator.appVersion; var a = parseFloat(c); if (b == "Microsoft Internet Explorer" && a < 7) { $GestionSelect("visible") } $HideFilter() } function $PositionPopup() { $Document(); var c = 0; var a = 0; window.pageXOffset ? a = window.pageXOffset : a = TsDocRef.scrollLeft; window.pageYOffset ? c = window.pageYOffset : c = TsDocRef.scrollTop; window.innerHeight ? TsClientHeight = window.innerHeight : TsClientHeight = TsDocRef.clientHeight; var d = (parseInt(TsClientHeight) - parseInt($("popup").offsetHeight)) / 2; $("popup").style.top = c + parseInt(d) + "px"; $("popup").style.left = "0px"; var b = (parseInt(TsDocRef.clientWidth) - parseInt($("popup").clientWidth)) / 2; $("popup").style.left = b + "px" } function $CreatePopup(f, c) { var d = document.getElementsByTagName("body"); if (!d[0]) { return false } var a = document.createElement("div"); var b = "position:absolute;top:0;left:0;z-index:999999;background:none;color:#fff;text-align:left;display:none;"; if (c) { b += "width:" + c + "px" } a.setAttribute("id", "popup"); a.setAttribute("style", b); a.style.cssText = b; d[0].appendChild(a); if ($("popup")) { $ShowPopup(f, window.TsBackgroundColor) } } function $ChangeOpacity(TsOpacity, TsId) { if (!$(TsId)) { return false } with ($(TsId).style) { opacity = (TsOpacity / 100); Mozopacity = (TsOpacity / 100); Khtmlopacity = (TsOpacity / 100); filter = "alpha(opacity=" + TsOpacity + ")" } } function $GestionSelect(c) { var b = document.getElementsByTagName("select"); for (var a = 0; a < b.length; a++) { b[a].style.visibility = c } } function Contains(c, a) { for (var b = 0; b < c.length; b++) { if (c[b] == a) { return true } } return false } function $(a) { return (typeof a == "string") ? a = document.getElementById(a) : a } function $t(a) { return $(a).tagName ? $(a).tagName.toLowerCase() : "" } function $c(g, f) { var b = f ? f.toLowerCase().split("|") : null; var c = new Array; if (!$(g).childNodes) { return null } for (var d = 0; d < $(g).childNodes.length; d++) { if (!b) { if ($(g).childNodes[d].tagName) { c[c.length] = $(g).childNodes[d] } } else { if (Contains(b, $t($(g).childNodes[d]))) { c[c.length] = $(g).childNodes[d] } } } return c } function $p(c, b) { if (!c) { return null } var a = b ? b.toLowerCase().split("|") : null; return $t(c) == "body" ? null : (Contains(a, $t(c)) ? $(c) : $p($(c).parentNode, b)) } function GetSrcElt(a) { if (!a) { a = window.e } if (a.srcElement) { return a.srcElement } if (a.target) { return a.target } return null } var _controlPath = null; var _localeString = null; var _xhr = null; var _inputField = null; var _autocompleteDiv = null; var _oldInputFieldValue = ""; var _currentInputFieldValue = ""; var _resultCache = new Object(); var _eventKeycode = null; var _currentSelectedIndex = -1; var _cptKeyDown = -1; function getAutoCompletions(searchString) { var params = "?text=" + searchString + "&localeString=" + _localeString; var pUrl = _controlPath + "getAutoCompletions"; var url = pUrl + params; if (_xhr && _xhr.readyState != 0) { _xhr.abort() } _xhr = getXMLHTTP(); if (_xhr) { _xhr.open("GET", url, true); _xhr.onreadystatechange = function() { if (_xhr.readyState == 4 && _xhr.responseText) { var obj = eval("(" + _xhr.responseText + ")"); var autoCompletions = obj.autoCompletions; cacheResults(searchString, autoCompletions); treatResponse(autoCompletions) } }; _xhr.send(null) } } function initAutoComplete(a, c, b) { _controlPath = a; _inputField = c; _localeString = b; setTimeout("mainLoop()", 200) } function mainLoop() { if (_currentInputFieldValue == "" && _autocompleteDiv) { hideAutocompleteDiv() } else { if (_oldInputFieldValue != _currentInputFieldValue) { var b = escapeURI(_currentInputFieldValue); var a = _resultCache[_currentInputFieldValue]; if (a) { treatResponse(a) } else { getAutoCompletions(b) } } } _oldInputFieldValue = _currentInputFieldValue; setTimeout("mainLoop()", 200); return true } function treatResponse(d) { if (!_autocompleteDiv) { _autocompleteDiv = document.getElementById("autocompleteDiv") } while (_autocompleteDiv.childNodes.length > 0) { _autocompleteDiv.removeChild(_autocompleteDiv.childNodes[0]) } if (d && d.length > 0) { showAutocompleteDiv(); for (var f = 0; f < d.length; f++) { var c = d[f]; var a = c.text; var b = location.protocol + "//" + location.host + "/" + c.autoCompleteUrl; var h = document.createElement("P"); h.innerHTML = a; var g = document.createElement("A"); g.setAttribute("href", b); h.appendChild(g); h.onmouseover = suggestOnMouseOver; h.onmouseout = suggestOnMouseOut; h.onmousedown = suggestOnMouseDown; _autocompleteDiv.appendChild(h) } } else { hideAutocompleteDiv() } _currentSelectedIndex = -1 } function onKeyDownHandler(a, b) { if (!a && window.event) { a = window.event } _eventKeycode = a.keyCode; if (_eventKeycode == 40 || _eventKeycode == 38) { if (_eventKeycode == 40) { scrollDown() } else { if (_eventKeycode == 38) { scrollUp() } } } } function scroll(a) { if (_cptKeyDown == -1 || _cptKeyDown % 3 == 2) { selectSuggestRow(a); _cptKeyDown = 0; return } _cptKeyDown++ } function scrollDown() { scroll(_currentSelectedIndex + 1) } function scrollUp() { scroll(_currentSelectedIndex - 1) } function selectSuggestRow(b) { if (!_autocompleteDiv) { return } var a = _autocompleteDiv.getElementsByTagName("p"); if (_currentSelectedIndex >= 0) { var c = a[_currentSelectedIndex]; if (c) { c.className = null } } if (b >= a.length) { b = -1 } if (b == -1) { _inputField.value = _oldInputFieldValue } if (b == -2) { b = a.length - 1 } if (b >= 0) { var d = a[b]; d.className = "selected"; _inputField.value = d.firstChild.data } if (b >= -1) { _currentSelectedIndex = b } } function onKeyUpHandler(a, b) { if (!a && window.event) { a = window.event } _eventKeycode = a.keyCode; _cptKeyDown = -1; if (_eventKeycode != 40 && _eventKeycode != 38) { _currentInputFieldValue = b.value } } function onBlurHandler(a, b) { onBlurWithoutAutoCompleteHandler(a, b); hideAutocompleteDiv() } function onBlurWithoutAutoCompleteHandler(a, b) { if (b && b.value == "") { b.value = _FIND_DEFAULT_PHRASE } } function suggestOnMouseOver() { this.className = "selected"; if (_currentSelectedIndex >= 0) { var a = _autocompleteDiv.getElementsByTagName("p"); var b = a[_currentSelectedIndex]; if (b) { b.className = null } _currentSelectedIndex = -1 } } function suggestOnMouseOut() { this.className = null } function suggestOnMouseDown() { var b = this.getElementsByTagName("a")[0]; var a = b.getAttribute("href"); document.location.href = a } function showAutocompleteDiv() { _autocompleteDiv.style.visibility = "visible" } function hideAutocompleteDiv() { if (_autocompleteDiv) { _autocompleteDiv.style.visibility = "hidden" } } function getXMLHTTP() { var c = null; if (window.XMLHttpRequest) { c = new XMLHttpRequest() } else { if (window.ActiveXObject) { try { c = new ActiveXObject("Msxml2.XMLHTTP") } catch (a) { try { c = new ActiveXObject("Microsoft.XMLHTTP") } catch (b) { c = null } } } else { alert("Your browser does not support XMLHTTPRequest...") } } return c } function cacheResults(b, a) { _resultCache[b] = a } function escapeURI(a) { if (encodeURIComponent) { return encodeURIComponent(a) } if (escape) { return escape(a) } } function submitSearchForm() { if (_currentSelectedIndex != -1) { var b = _autocompleteDiv.getElementsByTagName("p"); var c = b[_currentSelectedIndex]; var d = c.getElementsByTagName("a")[0]; var a = d.getAttribute("href"); document.location.href = a } else { selectMdr() } } function onFocusHandler(a, b) { if (b.value == _FIND_DEFAULT_PHRASE) { b.value = "" } } /*function alert(c, a) { var b = document.getElementById("alert"); b.style.display = "block"; b.innerHTML = c; return }*/function alerterror(c, a) { var b = document.getElementById("alerterror"); b.style.display = "block"; b.innerHTML = c; return } function onBlurHandler(a, b) { if (b.value == "") { b.value = _FIND_DEFAULT_PHRASE } hideAutocompleteDiv() } function onFocusHandler(a, b) { if (b.value == _FIND_DEFAULT_PHRASE) { b.value = "" } } function checkNewsletterMail(c, b) { if (b == null || b == "") { alert(_messageErrorMissingEmail); return false } else { if (!isValidEmail(b)) { alert(_messageErrorInvalidEmail); return false } } var a = null; if (window.XMLHttpRequest) { a = new XMLHttpRequest(); a.open("GET", c, false); a.send(null); displayNewsletterMail(a) } else { if (window.ActiveXObject) { a = new ActiveXObject("Microsoft.XMLHTTP"); a.open("GET", c, false); a.onreadystatechange = function() { displayNewsletterMail(a) }; a.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); a.send(null) } else { alert(_messageErrorAjax); return } } a.abort(); return true } function displayNewsletterMail(a) { if (a.readyState == 4) { if (a.responseText.indexOf("success") == -1) { alert(a.responseText) } else { alert(_messageSubscribeOK) } } } function VerifyMail(a, b) { b.submit() } var visibleMenu = ""; function viewMenu(a) { if (visibleMenu != "" && visibleMenu != a) { hideMenu(visibleMenu, 1) } if (visibleMenu != a) { document.getElementById(a).style.display = "block"; visibleMenu = a } } function hideMenu(a) { document.getElementById(a).style.display = "none"; visibleMenu = "" } function init_top(a) { if (!a) { a = 0 } else { a = 1000000 } menusListe = new Array("mainMenuGauche", "mainMenuCentre", "mainMenuDroite"); for (var b in menusListe) { contener = document.getElementById(menusListe[b]); menus = contener.getElementsByTagName("li"); for (i = 0; i < menus.length; i++) { ssmenus = menus[i].getElementsByTagName("ul"); for (j = 0; j < ssmenus.length; j++) { ssmenus[j].style.display = "none" } } } } function change_top(a) { init_top(); elemparent = document.getElementById(a); if (elemparent) { elemparent.style.display = "block"; elemparent.style.zIndex = "10000" } }
/*	SWFObject v2.0 <http://code.google.com/p/swfobject/>
Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject = function() {
	var UNDEF = "undefined", OBJECT = "object", SHOCKWAVE_FLASH = "Shockwave Flash", SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash", FLASH_MIME_TYPE = "application/x-shockwave-flash", EXPRESS_INSTALL_ID = "SWFObjectExprInst", win = window, doc = document, nav = navigator, domLoadFnArr = [], regObjArr = [], timer = null, storedAltContent = null, storedAltContentId = null, isDomLoaded = false, isExpressInstallActive = false; var ua = function() {
		var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF && typeof doc.appendChild != UNDEF && typeof doc.replaceChild != UNDEF && typeof doc.removeChild != UNDEF && typeof doc.cloneNode != UNDEF, playerVersion = [0, 0, 0], d = null; if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) { d = nav.plugins[SHOCKWAVE_FLASH].description; if (d) { d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10); playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10); playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0 } } else { if (typeof win.ActiveXObject != UNDEF) { var a = null, fp6Crash = false; try { a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7") } catch (e) { try { a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6"); playerVersion = [6, 0, 21]; a.AllowScriptAccess = "always" } catch (e) { if (playerVersion[0] == 6) { fp6Crash = true } } if (!fp6Crash) { try { a = new ActiveXObject(SHOCKWAVE_FLASH_AX) } catch (e) { } } } if (!fp6Crash && a) { try { d = a.GetVariable("$version"); if (d) { d = d.split(" ")[1].split(","); playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)] } } catch (e) { } } } } var u = nav.userAgent.toLowerCase(), p = nav.platform.toLowerCase(), webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, ie = false, windows = p ? /win/.test(p) : /win/.test(u), mac = p ? /mac/.test(p) : /mac/.test(u);
		/*@cc_on
		ie = true;
		@if (@_win32)
		windows = true;
		@elif (@_mac)
				mac = true;
			@end
		@*/
		return { w3cdom: w3cdom, pv: playerVersion, webkit: webkit, ie: ie, win: windows, mac: mac }
	} (); var onDomLoad = function() { if (!ua.w3cdom) { return } addDomLoadEvent(main); if (ua.ie && ua.win) { try { doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>"); var s = getElementById("__ie_ondomload"); if (s) { s.onreadystatechange = function() { if (this.readyState == "complete") { this.parentNode.removeChild(this); callDomLoadFunctions() } } } } catch (e) { } } if (ua.webkit && typeof doc.readyState != UNDEF) { timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions() } }, 10) } if (typeof doc.addEventListener != UNDEF) { doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null) } addLoadEvent(callDomLoadFunctions) } (); function callDomLoadFunctions() { if (isDomLoaded) { return } if (ua.ie && ua.win) { var s = createElement("span"); try { var t = doc.getElementsByTagName("body")[0].appendChild(s); t.parentNode.removeChild(t) } catch (e) { return } } isDomLoaded = true; if (timer) { clearInterval(timer); timer = null } var dl = domLoadFnArr.length; for (var i = 0; i < dl; i++) { domLoadFnArr[i]() } } function addDomLoadEvent(fn) { if (isDomLoaded) { fn() } else { domLoadFnArr[domLoadFnArr.length] = fn } } function addLoadEvent(fn) { if (typeof win.addEventListener != UNDEF) { win.addEventListener("load", fn, false) } else { if (typeof doc.addEventListener != UNDEF) { doc.addEventListener("load", fn, false) } else { if (typeof win.attachEvent != UNDEF) { win.attachEvent("onload", fn) } else { if (typeof win.onload == "function") { var fnOld = win.onload; win.onload = function() { fnOld(); fn() } } else { win.onload = fn } } } } } function main() { var rl = regObjArr.length; for (var i = 0; i < rl; i++) { var id = regObjArr[i].id; if (ua.pv[0] > 0) { var obj = getElementById(id); if (obj) { regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0"; regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0"; if (hasPlayerVersion(regObjArr[i].swfVersion)) { if (ua.webkit && ua.webkit < 312) { fixParams(obj) } setVisibility(id, true) } else { if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { showExpressInstall(regObjArr[i]) } else { displayAltContent(obj) } } } } else { setVisibility(id, true) } } } function fixParams(obj) { var nestedObj = obj.getElementsByTagName(OBJECT)[0]; if (nestedObj) { var e = createElement("embed"), a = nestedObj.attributes; if (a) { var al = a.length; for (var i = 0; i < al; i++) { if (a[i].nodeName.toLowerCase() == "data") { e.setAttribute("src", a[i].nodeValue) } else { e.setAttribute(a[i].nodeName, a[i].nodeValue) } } } var c = nestedObj.childNodes; if (c) { var cl = c.length; for (var j = 0; j < cl; j++) { if (c[j].nodeType == 1 && c[j].nodeName.toLowerCase() == "param") { e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value")) } } } obj.parentNode.replaceChild(e, obj) } } function fixObjectLeaks(id) { if (ua.ie && ua.win && hasPlayerVersion("8.0.0")) { win.attachEvent("onunload", function() { var obj = getElementById(id); if (obj) { for (var i in obj) { if (typeof obj[i] == "function") { obj[i] = function() { } } } obj.parentNode.removeChild(obj) } }) } } function showExpressInstall(regObj) { isExpressInstallActive = true; var obj = getElementById(regObj.id); if (obj) { if (regObj.altContentId) { var ac = getElementById(regObj.altContentId); if (ac) { storedAltContent = ac; storedAltContentId = regObj.altContentId } } else { storedAltContent = abstractAltContent(obj) } if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) { regObj.width = "310" } if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) { regObj.height = "137" } doc.title = doc.title.slice(0, 47) + " - Flash Player Installation"; var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn", dt = doc.title, fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt, replaceId = regObj.id; if (ua.ie && ua.win && obj.readyState != 4) { var newObj = createElement("div"); replaceId += "SWFObjectNew"; newObj.setAttribute("id", replaceId); obj.parentNode.insertBefore(newObj, obj); obj.style.display = "none"; win.attachEvent("onload", function() { obj.parentNode.removeChild(obj) }) } createSWF({ data: regObj.expressInstall, id: EXPRESS_INSTALL_ID, width: regObj.width, height: regObj.height }, { flashvars: fv }, replaceId) } } function displayAltContent(obj) { if (ua.ie && ua.win && obj.readyState != 4) { var el = createElement("div"); obj.parentNode.insertBefore(el, obj); el.parentNode.replaceChild(abstractAltContent(obj), el); obj.style.display = "none"; win.attachEvent("onload", function() { obj.parentNode.removeChild(obj) }) } else { obj.parentNode.replaceChild(abstractAltContent(obj), obj) } } function abstractAltContent(obj) { var ac = createElement("div"); if (ua.win && ua.ie) { ac.innerHTML = obj.innerHTML } else { var nestedObj = obj.getElementsByTagName(OBJECT)[0]; if (nestedObj) { var c = nestedObj.childNodes; if (c) { var cl = c.length; for (var i = 0; i < cl; i++) { if (!(c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param") && !(c[i].nodeType == 8)) { ac.appendChild(c[i].cloneNode(true)) } } } } } return ac } function createSWF(attObj, parObj, id) { var r, el = getElementById(id); if (typeof attObj.id == UNDEF) { attObj.id = id } if (ua.ie && ua.win) { var att = ""; for (var i in attObj) { if (attObj[i] != Object.prototype[i]) { if (i == "data") { parObj.movie = attObj[i] } else { if (i.toLowerCase() == "styleclass") { att += ' class="' + attObj[i] + '"' } else { if (i != "classid") { att += " " + i + '="' + attObj[i] + '"' } } } } } var par = ""; for (var j in parObj) { if (parObj[j] != Object.prototype[j]) { par += '<param name="' + j + '" value="' + parObj[j] + '" />' } } el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + ">" + par + "</object>"; fixObjectLeaks(attObj.id); r = getElementById(attObj.id) } else { if (ua.webkit && ua.webkit < 312) { var e = createElement("embed"); e.setAttribute("type", FLASH_MIME_TYPE); for (var k in attObj) { if (attObj[k] != Object.prototype[k]) { if (k == "data") { e.setAttribute("src", attObj[k]) } else { if (k.toLowerCase() == "styleclass") { e.setAttribute("class", attObj[k]) } else { if (k != "classid") { e.setAttribute(k, attObj[k]) } } } } } for (var l in parObj) { if (parObj[l] != Object.prototype[l]) { if (l != "movie") { e.setAttribute(l, parObj[l]) } } } el.parentNode.replaceChild(e, el); r = e } else { var o = createElement(OBJECT); o.setAttribute("type", FLASH_MIME_TYPE); for (var m in attObj) { if (attObj[m] != Object.prototype[m]) { if (m.toLowerCase() == "styleclass") { o.setAttribute("class", attObj[m]) } else { if (m != "classid") { o.setAttribute(m, attObj[m]) } } } } for (var n in parObj) { if (parObj[n] != Object.prototype[n] && n != "movie") { createObjParam(o, n, parObj[n]) } } el.parentNode.replaceChild(o, el); r = o } } return r } function createObjParam(el, pName, pValue) { var p = createElement("param"); p.setAttribute("name", pName); p.setAttribute("value", pValue); el.appendChild(p) } function getElementById(id) { return doc.getElementById(id) } function createElement(el) { return doc.createElement(el) } function hasPlayerVersion(rv) { var pv = ua.pv, v = rv.split("."); v[0] = parseInt(v[0], 10); v[1] = parseInt(v[1], 10); v[2] = parseInt(v[2], 10); return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false } function createCSS(sel, decl) { if (ua.ie && ua.mac) { return } var h = doc.getElementsByTagName("head")[0], s = createElement("style"); s.setAttribute("type", "text/css"); s.setAttribute("media", "screen"); if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) { s.appendChild(doc.createTextNode(sel + " {" + decl + "}")) } h.appendChild(s); if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) { var ls = doc.styleSheets[doc.styleSheets.length - 1]; if (typeof ls.addRule == OBJECT) { ls.addRule(sel, decl) } } } function setVisibility(id, isVisible) { var v = isVisible ? "visible" : "hidden"; if (isDomLoaded) { getElementById(id).style.visibility = v } else { createCSS("#" + id, "visibility:" + v) } } function getTargetVersion(obj) { if (!obj) { return 0 } var c = obj.childNodes; var cl = c.length; for (var i = 0; i < cl; i++) { if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "object") { c = c[i].childNodes; cl = c.length; i = 0 } if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param" && c[i].getAttribute("name") == "swfversion") { return c[i].getAttribute("value") } } return 0 } function getExpressInstall(obj) { if (!obj) { return "" } var c = obj.childNodes; var cl = c.length; for (var i = 0; i < cl; i++) { if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "object") { c = c[i].childNodes; cl = c.length; i = 0 } if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param" && c[i].getAttribute("name") == "expressinstall") { return c[i].getAttribute("value") } } return "" } return { registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) { if (!ua.w3cdom || !objectIdStr) { return } var obj = document.getElementById(objectIdStr); var xi = getExpressInstall(obj); var regObj = {}; regObj.id = objectIdStr; regObj.swfVersion = swfVersionStr ? swfVersionStr : getTargetVersion(obj); regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : ((xi != "") ? xi : false); regObjArr[regObjArr.length] = regObj; setVisibility(objectIdStr, false) }, getObjectById: function(objectIdStr) { var r = null; if (ua.w3cdom && isDomLoaded) { var o = getElementById(objectIdStr); if (o) { var n = o.getElementsByTagName(OBJECT)[0]; if (!n || (n && typeof o.SetVariable != UNDEF)) { r = o } else { if (typeof n.SetVariable != UNDEF) { r = n } } } } return r }, embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) { if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) { return } widthStr += ""; heightStr += ""; if (hasPlayerVersion(swfVersionStr)) { setVisibility(replaceElemIdStr, false); var att = (typeof attObj == OBJECT) ? attObj : {}; att.data = swfUrlStr; att.width = widthStr; att.height = heightStr; var par = (typeof parObj == OBJECT) ? parObj : {}; if (typeof flashvarsObj == OBJECT) { for (var i in flashvarsObj) { if (flashvarsObj[i] != Object.prototype[i]) { if (typeof par.flashvars != UNDEF) { par.flashvars += "&" + i + "=" + flashvarsObj[i] } else { par.flashvars = i + "=" + flashvarsObj[i] } } } } addDomLoadEvent(function() { createSWF(att, par, replaceElemIdStr); if (att.id == replaceElemIdStr) { setVisibility(replaceElemIdStr, true) } }) } else { if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { setVisibility(replaceElemIdStr, false); addDomLoadEvent(function() { var regObj = {}; regObj.id = regObj.altContentId = replaceElemIdStr; regObj.width = widthStr; regObj.height = heightStr; regObj.expressInstall = xiSwfUrlStr; showExpressInstall(regObj) }) } } }, getFlashPlayerVersion: function() { return { major: ua.pv[0], minor: ua.pv[1], release: ua.pv[2]} }, hasFlashPlayerVersion: hasPlayerVersion, createSWF: function(attObj, parObj, replaceElemIdStr) { if (ua.w3cdom && isDomLoaded) { return createSWF(attObj, parObj, replaceElemIdStr) } else { return undefined } }, createCSS: function(sel, decl) { if (ua.w3cdom) { createCSS(sel, decl) } }, addDomLoadEvent: addDomLoadEvent, addLoadEvent: addLoadEvent, getQueryParamValue: function(param) { var q = doc.location.search || doc.location.hash; if (param == null) { return q } if (q) { var pairs = q.substring(1).split("&"); for (var i = 0; i < pairs.length; i++) { if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { return pairs[i].substring((pairs[i].indexOf("=") + 1)) } } } return "" }, expressInstallCallback: function() { if (isExpressInstallActive && storedAltContent) { var obj = getElementById(EXPRESS_INSTALL_ID); if (obj) { obj.parentNode.replaceChild(storedAltContent, obj); if (storedAltContentId) { setVisibility(storedAltContentId, true); if (ua.ie && ua.win) { storedAltContent.style.display = "block" } } storedAltContent = null; storedAltContentId = null; isExpressInstallActive = false } } } }
} (); var css_browser_selector = function() { var d = navigator.userAgent.toLowerCase(), g = function(b) { return d.indexOf(b) != -1 }, f = document.getElementsByTagName("html")[0], a = (!(/opera|webtv/i.test(d)) && /msie (\d)/.test(d)) ? ("ie ie" + RegExp.$1) : g("gecko/") ? "gecko" : g("opera/9") ? "opera opera9" : /opera (\d)/.test(d) ? "opera opera" + RegExp.$1 : g("konqueror") ? "konqueror" : g("applewebkit/") ? "webkit safari" : g("mozilla/") ? "gecko" : "", k = (g("x11") || g("linux")) ? " linux" : g("mac") ? " mac" : g("win") ? " win" : ""; var l = a + k + " js"; f.className += f.className ? " " + l : l } (); try { document.execCommand("BackgroundImageCache", false, true) } catch (e) { } var TsDocRef = null; var X_nameNavigateur = "FF"; var X_versionNavigateur = 0; mon_navigateur(navigator.appVersion); function mon_navigateur(d) { var c = d.split(";"); for (var b in c) { if (c[b].indexOf("MSIE") > -1) { X_nameNavigateur = "IE"; var a = c[b].replace("MSIE", ""); X_versionNavigateur = a.replace(" ", "") } } } function $LoadPopupAlerte() { if ($("alerte_dispo_select")) { $("alerte_dispo_select").options.length = 0 } if ($("TsMemoTaille") && $("alerte_dispo_select")) { var b = $c($("TsMemoTaille"), "option"); for (var a = 0; a < b.length; a++) { $("alerte_dispo_select").options[a] = new Option($("TsMemoTaille").options[a].text, $("TsMemoTaille").options[a].value) } $("alerte_dispo_select").selectedIndex = parseInt($("TsMemoTaille").getAttribute("index")) } if ($("alerte_dispo_select").options.length == 0) { $("alerte_dispo_select").options[0] = new Option($("TsIdProduit").value, $("TsIdProduit").value); $("popup_alerte_produit").style.display = "none" } if ($("alerte_dispo_select").options.length == 0) { $("popup_alerte_produit").style.display = "none" } if ($("titre_page_produit") && $("alerte_dispo_titre")) { $("alerte_dispo_titre").innerHTML = $("titre_page_produit").innerHTML + " est en rupture de stock ! " } if ($("alerte_id_secteur")) { $("alerte_id_secteur").value = window.TsIdSecteur } if ($("alerte_fin_url")) { $("alerte_fin_url").value = $("TsFinUrl").value } if ($("alerte_lib_secteur")) { $("alerte_lib_secteur").value = $("TsLibSecteur").value } if ($("alerte_lib_famille")) { $("alerte_lib_famille").value = $("TsLibFamille").value } if ($("alerte_mail_utilisateur")) { $("alerte_mail_utilisateur").value = $("TsMailUtilisateur").value } if (document.getElementById("mail")) { document.getElementById("mail").value = $("alerte_mail_utilisateur").value } } var ongletTgCourant = ""; function changeOngletTg(a, b) { if (a == "0") { setInvisible("gondolas-products-1"); setInvisible("gondolas-products-2"); setVisible("gondolas-products-0"); if ($n("header_gondolas_1") != null) { $n("header_gondolas_1").className = "" } if ($n("header_gondolas_2") != null) { $n("header_gondolas_2").className = "" } } else { if (a == "1") { setInvisible("gondolas-products-0"); setInvisible("gondolas-products-2"); setVisible("gondolas-products-1"); if ($n("header_gondolas_0") != null) { $n("header_gondolas_0").className = "" } if ($n("header_gondolas_2") != null) { $n("header_gondolas_2").className = "" } } else { if (a == "2") { setInvisible("gondolas-products-0"); setInvisible("gondolas-products-1"); setVisible("gondolas-products-2"); if ($n("header_gondolas_0") != null) { $n("header_gondolas_0").className = "" } if ($n("header_gondolas_1") != null) { $n("header_gondolas_1").className = "" } } } } $n("header_gondolas_" + a).className = "active" } var compteurSport; function mouseOutSport(a, b) { compteurSport = setTimeout("mouseOut('" + a + "','" + b + "')", 100) } function mouseOver(a, b) { if ($n(a)) { $n(a).className = "sport2actif" } if ($n(b)) { $n(b).style.display = "block" } if ($n("iframe_" + b)) { $n("iframe_" + b).style.display = "block"; $n("iframe_" + b).style.width = $n(b).offsetWidth + "px"; $n("iframe_" + b).style.height = $n(b).offsetHeight + "px" } clearTimeout(compteurSport) } function mouseOut(a, b) { clearTimeout(compteurSport); if ($n(a)) { $n(a).className = "sport2" } if ($n(b)) { $n(b).style.display = "none" } if ($n("iframe_" + b)) { $n("iframe_" + b).style.display = "none" } } function categEffect(d, c, b, a) { if (c && (c.timer == undefined || c.timer == null)) { c.fromLine = b; c.toLine = a; c.timer = new Timer(c, tickOpen, stopTickOpen, 10, a - b); c.timer.start(); setInvisible(d) } } function tickOpen(f, d, c) { var b = $c(f, "li"); var a = f.fromLine + d - 1; setVisible(b[a]) } function stopTickOpen(c, b, a) { } function Timer(a, f, d, b, c) { this.owner = a; this.callback = f; this.stopCallback = d; this.ms = b; this.nbTicks = c; this.tickNumber = 0 } Timer.prototype = { start: function() { var a = this; this.intervalId = setInterval(function() { a._tick(a.ms) }, this.ms) }, stop: function() { this.owner.timer = null; clearInterval(this.intervalId); this.stopCallback(this.owner, this.tickNumber, this.nbTicks) }, _tick: function() { ++this.tickNumber; this.callback(this.owner, this.tickNumber, this.nbTicks); if (this.tickNumber == this.nbTicks) { this.stop() } } }; function setClass(c, b) { var a = $n(b); if (!a) { return false } a.className = c } function setVisible(a) { if (!$n(a)) { return false } $n(a).style.display = "block"; $n(a).style.visibility = "visible" } function setInvisible(a) { if (!$n(a)) { return false } $n(a).style.display = "none"; $n(a).style.visibility = "hidden" } function makeVisileFilters(b, a) { if (!$n(b)) { return false } if (!$n(a)) { return false } setInvisible(b); setVisible(a) } function $ClearPropagation(a) { if (!a) { a = window.event } a.preventDefault ? a.preventDefault() : a.returnValue = false; a.stopPropagation ? a.stopPropagation() : a.cancelBuble = true } function openPopPup(c, a, b) { window.open(c, a, b) } function Contains(c, a) { for (var b = 0; b < c.length; b++) { if (c[b] == a) { return true } } return false } function $n(a) { return (typeof a == "string") ? a = document.getElementById(a) : a } function $t(a) { return $n(a).tagName ? $n(a).tagName.toLowerCase() : "" } function $c(g, f) { var b = f ? f.toLowerCase().split("|") : null; var c = new Array; if (!$n(g).childNodes) { return null } for (var d = 0; d < $n(g).childNodes.length; d++) { if (!b) { if ($n(g).childNodes[d].tagName) { c[c.length] = $n(g).childNodes[d] } } else { if (Contains(b, $t($n(g).childNodes[d]))) { c[c.length] = $n(g).childNodes[d] } } } return c } function $p(c, b) { if (!c) { return null } var a = b ? b.toLowerCase().split("|") : null; return $t(c) == "body" ? null : (Contains(a, $t(c)) ? $n(c) : $p($n(c).parentNode, b)) } function GetSrcElt(a) { a = a || window.event; if (a.srcElement) { return a.srcElement } else { if (a.target) { return a.target } } return null } function AddClassName(b, c) { var a = c.split("|"); for (i in a) { if (b.indexOf(a[i]) > -1) { continue } if (b.length > 0) { b += " " + a[i] } else { b = a[i] } } return b } function DeleteClassName(c, d) { var b = d.split("|"); for (i in b) { if (c.indexOf(b[i]) <= -1) { continue } var a = c.split(" "); for (j in a) { if (a[j] == b[i]) { a[j] = "" } } c = a.join(" ") } return c } function Contains(c, a) { for (var b = 0; b < c.length; b++) { if (c[b] == a) { return true } } return false } function $(a) { return (typeof a == "string") ? a = document.getElementById(a) : a } function $t(a) { return $(a).tagName ? $(a).tagName.toLowerCase() : "" } function $c(g, f) { var b = f ? f.toLowerCase().split("|") : null; var c = new Array; if (!$(g).childNodes) { return null } for (var d = 0; d < $(g).childNodes.length; d++) { if (!b) { if ($(g).childNodes[d].tagName) { c[c.length] = $(g).childNodes[d] } } else { if (Contains(b, $t($(g).childNodes[d]))) { c[c.length] = $(g).childNodes[d] } } } return c } function $p(c, b) { if (!c) { return null } var a = b ? b.toLowerCase().split("|") : null; return $t(c) == "body" ? null : (Contains(a, $t(c)) ? $(c) : $p($(c).parentNode, b)) } function GetSrcElt(a) { if (!a) { a = window.e } if (a.srcElement) { return a.srcElement } if (a.target) { return a.target } return null } function isValidEmail(b) { var a = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; return a.test(b) } function checkPlatformOxylaneID(a) { var d = null; if (window.XMLHttpRequest) { d = new XMLHttpRequest() } else { if (window.ActiveXObject) { try { d = new ActiveXObject("Msxml2.XMLHTTP") } catch (b) { try { d = new ActiveXObject("Microsoft.XMLHTTP") } catch (c) { d = null } } } else { alert("Your browser does not support XMLHTTPRequest...") } } if (d) { d.open("GET", a, true); d.onreadystatechange = function() { if (d.readyState == 4 && d.responseText) { } }; d.send(null) } } function showGrilleOver(a, b) { $("product_" + a).style.zIndex = 2; $("description_autres_" + a).style.display = "block" } function hideGrilleOver(a, b) { $("product_" + a).style.zIndex = 1; $("description_autres_" + a).style.display = "none" } function open_close_navig(b) { if (b != null) { var a = b.parentNode; if (a != null) { var c = a.className.split(" "); if (Contains(c, "selected")) { a.className = AddClassName(DeleteClassName(a.className, "selected"), "notSelected") } else { a.className = AddClassName(DeleteClassName(a.className, "notSelected"), "selected") } } } };

var ImageLoader = {
	show: function(obj) {
		var $j = jQuery.noConflict();
		$j('#imgSelectedContainer').css('display', 'block');
		$j('#imgSelected').attr('src', $j('#' + obj).attr('src'));
	},
	hideAll: function() {
		var $j = jQuery.noConflict();
		$j('#imgSelectedContainer').css('display', 'none');
		$j('#imgSelected').attr('src', '');
	}
}

var Search = {
	popup: function() {
		var $j = jQuery.noConflict();
		$j(document).ready(function() {
			$j("#dialog").dialog({
				modal: true,
				width: 500
			});
		});
	}
}

var FAQ = {
    init: function() {
        var $j = jQuery.noConflict();
        $j(document).ready(function() {
            $j('#accordion').accordion({ autoHeight: false, active: false, collapsible: true });          
        });
    },
	note: function(url, idQuestion, value, diagnose, idCat, idP) {
		var $j = jQuery.noConflict();
		$j.post(url, { id: idQuestion, note: value, diagnose: diagnose, idcat: idCat, idP: idP },
			function(data, textStatus) {
				if (data.success) {
					$j('#divSatisfait').dialog('destroy');
					$j('#divSatisfait').html(data.innerdiv).dialog({
						modal: true,
						width: 500
					});
				}
			}, "json");
	}
}

var Diagnose = {
	dptChange: function(obj) {
		var $j = jQuery.noConflict();
		$j('#tableDiagnoseForm2').css('display', obj.value != '0' ? '' : 'none');
	},

	loadDpt: function(obj) {
		var $j = jQuery.noConflict();
		$j('#tableDiagnoseForm2').css('display', $j('#' + obj).val() != '0' ? '' : 'none');
	},

	sendForm: function(url, json) {
		var $j = jQuery.noConflict();
		$j.post(url, json,
			function(data, textStatus) {
				if (data.success) {
				    $j('#divEnvoiOk').dialog('destroy');
					$j('#divEnvoiOk').html(data.message).dialog({
						modal: true,
						width: 500
					});
					//alert(data.message);
					//window.location = data.returnUrl;
				}
			}, "json");
	}
}
