Array.prototype.______array="______array";var JSON={org:"http://www.JSON.org",copyright:"(c)2005 JSON.org",license:"http://www.crockford.com/JSON/license.html",stringify:function(A){var B,C,D,E="",F;switch(typeof A){case"object":if(A){if(A.______array=="______array"){for(C=0;C<A.length;++C){F=this.stringify(A[C]);if(E){E+=","}E+=F}return"["+E+"]"}else{if(typeof A.toString!="undefined"){for(C in A){F=A[C];if(typeof F!="undefined"&&typeof F!="function"){F=this.stringify(F);if(E){E+=","}E+=this.stringify(C)+":"+F}}return"{"+E+"}"}}}return"null";case"number":return isFinite(A)?String(A):"null";case"string":D=A.length;E='"';for(C=0;C<D;C+=1){B=A.charAt(C);if(B>=" "){if(B=="\\"||B=='"'){E+="\\"}E+=B}else{switch(B){case"\b":E+="\\b";break;case"\f":E+="\\f";break;case"\n":E+="\\n";break;case"\r":E+="\\r";break;case"\t":E+="\\t";break;default:B=B.charCodeAt();E+="\\u00"+Math.floor(B/16).toString(16)+(B%16).toString(16)}}}return E+'"';case"boolean":return String(A);default:return"null"}},parse:function(I){var B=0;var C=" ";function D(M){throw {name:"JSONError",message:M,at:B-1,text:I}}function E(){C=I.charAt(B);B+=1;return C}function K(){while(C!=""&&C<=" "){E()}}function H(){var M,N="",O,P;if(C=='"'){outer:while(E()){if(C=='"'){E();return N}else{if(C=="\\"){switch(E()){case"b":N+="\b";break;case"f":N+="\f";break;case"n":N+="\n";break;case"r":N+="\r";break;case"t":N+="\t";break;case"u":P=0;for(M=0;M<4;M+=1){O=parseInt(E(),16);if(!isFinite(O)){break outer}P=P*16+O}N+=String.fromCharCode(P);break;default:N+=C}}else{N+=C}}}}D("Bad string")}function A(){var M=[];if(C=="["){E();K();if(C=="]"){E();return M}while(C){M.push(J());K();if(C=="]"){E();return M}else{if(C!=","){break}}E();K()}}D("Bad array")}function G(){var M,N={};if(C=="{"){E();K();if(C=="}"){E();return N}while(C){M=H();K();if(C!=":"){break}E();N[M]=J();K();if(C=="}"){E();return N}else{if(C!=","){break}}E();K()}}D("Bad object")}function F(){var M="",N;if(C=="-"){M="-";E()}while(C>="0"&&C<="9"){M+=C;E()}if(C=="."){M+=".";while(E()&&C>="0"&&C<="9"){M+=C}}if(C=="e"||C=="E"){M+="e";E();if(C=="-"||C=="+"){M+=C;E()}while(C>="0"&&C<="9"){M+=C;E()}}N=+M;if(!isFinite(N)){D("Bad number")}else{return N}}function L(){switch(C){case"t":if(E()=="r"&&E()=="u"&&E()=="e"){E();return true}break;case"f":if(E()=="a"&&E()=="l"&&E()=="s"&&E()=="e"){E();return false}break;case"n":if(E()=="u"&&E()=="l"&&E()=="l"){E();return null}break}D("Syntax error")}function J(){K();switch(C){case"{":return G();case"[":return A();case'"':return H();case"-":return F();default:return C>="0"&&C<="9"?F():L()}}return J()}};;function CheckNumber(E,F){var H="-1";var C="0123456789";var D=E.value;var B=true;var A="";for(i=0;i<D.length;i++){ch=D.charAt(i);for(j=0;j<C.length;j++){if(ch==C.charAt(j)){break}}if(j==C.length){B=false;break}if(ch!=","){A+=ch}}if(!B){E.value=E.value.substr(0,E.value.lenght-1);return(false)}var G;if(window.event){G=window.event.keyCode}else{if(F){G=F.which}}if(G=="13"){E.blur()}}function disableEnterKey(A){var B;if(window.event){B=window.event.keyCode}else{if(A){B=A.which}}return(B!=13)}function IDoUpdateValue(B,A,C){con=document.getElementById(A);piloterControl=document.getElementById(C);DoUpdateValue(B,con,piloterControl)}function DoUpdateValue(json,con,piloterControl){json=DecompressJSON(json);if(con.id==piloterControl.id){if(CheckLimit(con)){if(con.value!=json.ErgoIdentifier.Quantity){json.ErgoIdentifier.Quantity=con.value-json.ErgoIdentifier.Quantity;ManageBasketAjax(json,null)}}}else{if(CheckLimitVal(eval(con.value)+eval(json.ErgoIdentifier.Quantity))){ManageBasketAjax(json,null)}}}function CheckLimitVal(A){return CheckLimitWithValue(A)}function CheckLimit(A){return CheckLimitWithValue(A.value)}function CheckLimitWithValue(A){return CheckLimits(A,1,Get_BasketLimitAddedArticles())}function CheckLimits(B,D,C){var A=B;var E=parseInt(B);if(A==""||E*1<D*1||E*1>C*1){alertsay="Veuillez choisir une quantit\351 comprise entre "+D+" et "+C;alert(alertsay);return false}else{return true}}String.prototype.replaceAll=function(B,C){var D=this;var A=D.indexOf(B);while(A!=-1){D=D.replace(B,C);A=D.indexOf(B)}return D};function DecompressJSON(objJSON){if(objJSON.toString().indexOf("|",0)!=-1){objJSON=objJSON.replaceAll("|",'"');objJSON=objJSON.replaceAll("^",",");objJSON=eval("("+objJSON+")")}return objJSON}function ManageBasketAjax(A,B){if(A==""){return true}A=DecompressJSON(A);var C=GetWWWDOtNetPathRoot()+"/Account/Basket/ErgoBasket/BasketAjaxRequestManager.aspx?w-4&";var D=encodeURIComponent(JSON.stringify(A.ErgoIdentifier));PreventClickWhenAjaxProcessing(true);$.ajax({type:"POST",url:C,data:"strJSON="+D,dataType:"text",success:function(E){Respond(E);moveWindow()},error:function(G,F,E){HideAll()},timeout:20000})}function Respond(REQ){REQ=eval("("+REQ+")");REQ=REQ["allResult"];nav=navigator.appName;var reg="@@";if(nav=="Microsoft Internet Explorer"){reg=new RegExp("(@@)")}var tableau=REQ.split(reg);var json_data_object=eval("("+tableau[0]+")");var panelResult=json_data_object.PanelId;var reqText=tableau[1];if(panelResult==null||panelResult=="DefaultPanelID"){ShowErgoBasket(reqText);HideWaitPanet()}else{var panelTarget=document.getElementById(panelResult);if(panelTarget!=null){if(json_data_object.UiUpdateMethod==1){var old_InnerHTML=panelTarget.innerHTML;if(json_data_object.UpdateMethodPlace==0){panelTarget.innerHTML=reqText+old_InnerHTML}else{panelTarget.innerHTML=old_InnerHTML+reqText}}else{panelTarget.innerHTML=reqText}}HideWaitPanet();HidePreventerWhenAjaxProcessing()}UpdateOthersPanel(tableau[2]);if(panelResult=="none"){HideAll();return}return false}function HideAll(){HideWaitPanet();HidePreventerWhenAjaxProcessing();HideErgoPopin()}function UpdateOthersPanel(tableau){var json_options_object=eval("("+tableau+")");for(x in json_options_object){if(document.getElementById(x)){var pTarget=document.getElementById(x).innerHTML=json_options_object[x]}}}var enableJsRedirectAjax=true;var nsv=document.layers;var iev=document.all;if(!iev){var mov=document.getElementById}var fade=1;var fadetime=0;var curfadeval=100;var fadein=false;var debug=false;function SetOpacity(A,B){if(!A){return}if(!iev){A.style.opacity=B/100}else{A.style.filter="alpha(opacity="+(B)+");"}curfadeval=B}function fadeinout(B){if(!nsv){var A=document.getElementById(B)}if(A){if(fadein){curfadeval=curfadeval+fade}else{curfadeval=curfadeval-fade}if(curfadeval>=100){curfadeval=100;fadein=false}if(curfadeval<=0){curfadeval=0;fadein=true}SetOpacity(A,curfadeval)}setTimeout(fadeinout,fadetime)}jQuery.fn.center=function(){$(this).css("position","absolute");$(this).css("top",($(window).height()-$(this).height())/2+$(window).scrollTop()+"px");$(this).css("left",($(window).width()-$(this).width())/2+$(window).scrollLeft()+"px");return this};function HideErgoPopin(){if(document.getElementById("add_selectionErgoPipeAjax")!=null){document.getElementById("add_selectionErgoPipeAjax").style.display="none"}if(document.getElementById("MaskErgoPipeAjax")!=null){document.getElementById("MaskErgoPipeAjax").style.display="none"}if(document.getElementById("transLayout")!=null){$("#transLayout").hide()}if(document.getElementById("hideLayout")!=null){$("#hideLayout").hide()}}function AddHeaderErgoBasket(A,D){var C="<div class='close floatr posrel mrg_r' style='z-index:999;cursor:pointer;'><img src='"+GetWWWDOtNetBaseUrl()+'/Img/decos/pipe/bt-fermer.png\' onclick="HideErgoPopin()" /> </div>';var B="<div class='headerErgoBasket'><b class='tl'></b><div></div><b class='tr'></b></div>";if(D){B=B+C}return B+A}function AddFooterErgoBasket(A){var B="<div class='footerErgoBasket'><b class='bl'></b><div></div><b class='br'></b></div>";
return A+B}var popin;function ShowErgoBasket(B,D,E){var A="<div style='margin-left:auto; margin-right:auto;' id='add_basketErgoPipeAjax'>"+B+"</div>";A=AddHeaderErgoBasket(A,E);A=AddFooterErgoBasket(A);if(popin==null){popin=document.createElement("DIV");popin.id="add_selectionErgoPipeAjax";document.body.appendChild(popin);popin.style.position="absolute";popin.style.zIndex="300";var C=390;if(D!=null){C=D}popin.style.width=C+"px";popin.style.height="auto";popin.style.border="none";popin.style.left=(screen.width-C)/2+"px";popin.style.top=200+"px";popin.style.background="transparent"}popin.innerHTML=A;if(popin.style.display!="block"){popin.style.display="block"}if($("div#choiceMode").length>0){updateCache(popin.offsetTop,popin.clientHeight)}HideWaitPanet()}var preventer;function moveWindow(){$("#add_selectionErgoPipeAjax").center()}function moveWaitWindow(){$("#WaitErgoPipeAjax").center()}function HidePreventerWhenAjaxProcessing(){if(preventer==null){preventer=document.getElementById("MaskErgoPipeAjax")}if(preventer!=null){preventer.style.display="none"}}var waiter=null;function HideWaitPanet(){if(waiter==null){waiter=document.getElementById("WaitErgoPipeAjax")}if(waiter!=null){waiter.style.display="none"}}var popinWait;function ShowWaitPanet(){if(popinWait==null){popinWait=document.createElement("DIV");popinWait.id="WaitErgoPipeAjax";document.body.appendChild(popinWait);popinWait.innerHTML="<img src='"+GetWWWDOtNetBaseUrl()+"/Img/decos/attente_anim.gif' alt='loading....' />";popinWait.style.position="absolute";popinWait.style.zIndex="301";var A=61;popinWait.style.width=A+"px";popinWait.style.height="64px";popinWait.style.left=(screen.width-A)/2+"px";popinWait.style.top=(screen.height-30)/2+"px"}if(popinWait.style.display!="block"){popinWait.style.display="block"}moveWaitWindow()}var popinMask;function PreventClickWhenAjaxProcessing(C){if(popinMask==null){popinMask=document.createElement("DIV");popinMask.id="MaskErgoPipeAjax";popinMask.style.background="black";SetOpacity(popinMask,50);popinMask.style.width=screen.width+"px";popinMask.style.height=document.body.clientHeight+"px";popinMask.style.zIndex="299";popinMask.style.position="absolute";popinMask.style.left=0+"px";popinMask.style.top=0+"px";if(window.addEventListener){popinMask.addEventListener("click",HideWaitPanet,false)}else{popinMask.attachEvent("onclick",HideWaitPanet)}document.body.appendChild(popinMask);var A=((/\bIS_IE7\b/).test(document.documentElement.className)||(/\bIS_IE\b/).test(document.documentElement.className))?true:false;var B=(A)?document.body.clientHeight:document.body.offsetHeight;document.getElementById("MaskErgoPipeAjax").style.height=B+"px"}if(popinMask.style.display!="block"){popinMask.style.display="block"}if(C){ShowWaitPanet()}}function updateCache(A,B){document.getElementById("MaskErgoPipeAjax").style.height=A+B+"px"};;function ShowCenterPopin(B){$.each($.browser,function(J){if($.browser.msie){h1=document.documentElement.scrollTop;h2=screen.availHeight}else{h1=window.pageYOffset;h2=window.innerHeight}});if(h1!=0){var G=h2/2;var F=h1+G}else{var F=h2/2}if($("#page").width()!=null){var H=$("body #page").width()}else{if($("#page_1col").width()!=null){var H=$("#page_1col").width()}else{if($("#page_2cols").width()!=null){var H=$("#page_2cols").width()}}}if(H!=null){ch2=H/2}else{ch2=H/2}var A=F;var C=$("#"+B).height();var I=$("#"+B).width();var D=A-(C/2);var E=ch2-(I/2);$("#"+B).css({display:"block",left:E+"px",top:D+"px"})}function HideBasketPopin(){$("#BasketPopin").css({display:"none",left:"0px",top:"0px"})}function ShowBasketPopinFC(E){if(E!=""){var B;var D=document.getElementById(E);var G=findPos(D);var F=$("#BasketPopin").outerWidth();var A=996;var C=A-(F/2);if((G[0]+F)>C){B=C-F}else{B=G[0]-60}$("#BasketPopin").css({display:"block",left:B+"px",top:(G[1]-140)+"px"})}else{$("#BasketPopin").css({display:"block",left:(500)+"px",top:(300)+"px"})}}function RedirectPage(A){window.location=A};;
