function testIE6(fnct){if(navigator.appName.toLowerCase().indexOf("internet explorer")!=-1){var myVersion=navigator.appVersion.split(" (")[1].split(")")[0].split(";");for(var i=0;i<myVersion.length;i++){if(myVersion[i].toLowerCase().indexOf("msie 6.0")!=-1){fnct()}}}}
function Set_Cookie(name,value,expires,path,domain,secure){var today=new Date();today.setTime(today.getTime());if(expires){expires=expires*1000*60*60*24}var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+((expires)?";expires="+expires_date.toGMTString():"")+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+((secure)?";secure":"")}function CookieExist(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return true}return false}function TestCookieExist(){Set_Cookie('TEST_COOKIES','value',365,'/','','');if(!CookieExist('TEST_COOKIES'))return false;Set_Cookie('TEST_COOKIES','value',-1,'/','','');return true}function TestCookieExistVisible(p_id){if(document.getElementById(p_id)&&!TestCookieExist()){document.getElementById(p_id).style.display='block'}else if(document.getElementById(p_id)&&TestCookieExist()){document.getElementById(p_id).style.display='none'}}
var focused=false;var DGS=(function DGS(params){if(!(this instanceof arguments.callee)){return new DGS(params);}
this.id="DGS Javascript Object";this.loaderImg="img/common/loader.gif";this.version={major:0,minor:1,patch:0,flag:"",toString:function(){with(d.version){return major+"."+minor+"."+patch+flag;}}};this.t=new Date().getTime();this.calcTime="Calculation time: "+((new Date().getTime()-this.t)/1000.0)+"s";this.elmts=[];this.defaults={useGoogleLoad:false,jsLib:"jquery",jsLibVersion:"1.3.2",jsLibIsloaded:false,useJsLibLocalLoad:false,jsLibLocalUrl:"/scripts/lib/Jquery/jquery-1.3.2.min.js",jsPluginPath:"/scripts/lib/ottawan/",loadedJsListing:'',debugMode:false,pluginList:{selector:'selector.js',thumbnails:'thumbnails.js',modimodo:'modimodo.js',browser:'browser.js',tabs:'tabs.js',cookies:'cookie.js',gmap:'gmap.js',rounded:'rounded-shadows.js',roundedLight:'rounded-simple.js',select:'select.js',carousel:'carousel.js',accordians:'accordians.js'},ieFirebugLiteUrl:'http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'};this.settings={useGoogleLoad:(params&&params.useGoogleLoad)?params.useGoogleLoad:this.defaults.useGoogleLoad,jsLib:(params&&params.jsLib)?params.jsLib:this.defaults.jsLib,jsLibVersion:(params&&params.jsLibVersion)?params.jsLibVersion:this.defaults.jsLibVersion,jsLibIsloaded:(params&&params.jsLibIsLoaded)?params.jsLibIsLoaded:this.defaults.jsLibIsLoaded,useJsLibLocalLoad:(params&&params.useJsLibLocalLoad)?params.useJsLibLocalLoad:this.defaults.useJsLibLocalLoad,jsLibLocalUrl:(params&&params.jsLibLocalUrl)?params.jsLibLocalUrl:this.defaults.jsLibLocalUrl,jsPluginPath:(params&&params.jsPluginPath)?params.jsPluginPath:this.defaults.jsPluginPath,loadedJsListing:this.defaults.loadedJsListing,debugMode:(params&&params.debugMode)?params.debugMode:(window.location.hash.indexOf('debugmode=true')!=-1)?true:this.defaults.debugMode,pluginList:(params&&params.pluginList)?params.pluginList:this.defaults.pluginList,ieFirebugLiteUrl:(params&&params.ieFirebugLiteUrl)?params.ieFirebugLiteUrl:this.defaults.ieFirebugLiteUrl};this.actions={that:this,pluginUrl:function(obj,name){return obj.settings.jsPluginPath+obj.settings.pluginList[name];},log:function(message){if(window.instance&&window.instance.settings.debugMode){try{console.log.apply(console,arguments);}
catch(e){try{opera.postError.apply(opera,arguments);}
catch(e){alert(Array.prototype.join.call(arguments," "));}}}},debug:function(object,message,number){window.instance.actions.log("DGS.debug(): Error \n -> "+object+"\n -> line "+number+" \n -> in file "+message);return true;},initLogMode:function(obj){if(!window.console){(function(){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i){window.console[names[i]]=function(){};}})();}
if(obj.settings.debugMode&&!window.console&&obj.browser.IE){this.jsLoader(obj.settings.ieFirebugLiteUrl,function(){firebug.env.height=150;},'fireguglite');}},jsLoader:function(file,callback,id){var s=document.createElement("script");s.type="text/javascript";if(id)s.id="script-"+id;if(s.readyState){s.onreadystatechange=function(){if(s.readyState=="loaded"||s.readyState=="complete"){s.onreadystatechange=null;if(callback){callback();}}};}
else{s.onload=function(){if(callback){callback();}};}
s.src=file;for(i=0;i<document.getElementsByTagName("head")[0].getElementsByTagName("script").length;i++){if(document.getElementsByTagName("head")[0].getElementsByTagName("script")[i].src==s.src){document.getElementsByTagName("head")[0].removeChild(document.getElementsByTagName("head")[0].getElementsByTagName("script")[i]);}}
document.getElementsByTagName("head")[0].appendChild(s);},imagePreload:function(imgUrl,id,obj){obj.elmts[id]=new Image();obj.elmts[id].src=imgUrl;},attachEvent:function(elm,type,handle){if(elm.addEventListener){elm.addEventListener(type,handle,false);}
else if(elm.attachEvent){elm.attachEvent("on"+type,handle);}}};this.init=function(obj){window.instance=obj;obj.prototype=DGS.prototype;obj.actions.initLogMode(obj);obj.actions.imagePreload(obj.loaderImg,"preload",obj);};});var OT=new DGS();OT.init(OT);(function($){var debugg=false;if((debugg)){jQuery(document).ready(function(){$("body").prepend('<div id="debugg" class="box"><h2><a href="#logger" id="toggle-logger">Logger</a></h2><ol id="logger"></ol></div>');});}
jQuery.fn.debug=function(){return this.each(function(){jQuery.log(this);});};jQuery.log=function(message){if((window.console)&&(window.console.debug)&&(debugg)){window.console.debug(message);jQuery("#debugg h2").empty().text("Debugg on");}
else{jQuery("#debugg ol").append("<li>"+message+"</li>");}};}(jQuery));((function($){jQuery.fn.miniToggle=function(options){var defaults={hiddenClass:"hidden",hideAll:false,params:{opacity:"toggle",height:"toggle"},animations:{speed:400,easing:"swing"},catchThis:function(){return this.hash;},onBeforeStart:function(){},onComplete:function(){}};var settings=$.extend(true,{},defaults,options);return this.each(function(){function onToggle(event){event.stopPropagation();event.preventDefault();jQuery(this).toggleClass(settings.hiddenClass);var toggleTarget=settings.catchThis.call(this);jQuery(toggleTarget).animate(settings.params,settings.animations.speed,settings.animations.easing,function(){settings.onComplete.call(this);});if(settings.hideAll){$('.submenu').not(toggleTarget).prev('a').addClass('hidden');$('.submenu').not(toggleTarget).hide();}
return false;}
jQuery("a[class*=toggle]").live("click",onToggle);return false;});};})(jQuery));function onToggleZoom(event){event.stopPropagation();event.preventDefault();return false;}
function displayLessQuantity(){var inputQuantity=jQuery(this).siblings("input[@type=text]");var inputQuantityHidden=jQuery(this).siblings("input[@type=hidden]");var inputValue=parseInt(inputQuantityHidden.attr("value"));if(inputValue!=1){inputQuantity.attr("value",inputValue-1);inputQuantityHidden.attr("value",inputValue-1);}
return false;}
function displayMoreQuantity(){var inputQuantity=jQuery(this).siblings("input[@type=text]");var inputQuantityHidden=jQuery(this).siblings("input[@type=hidden]");var inputValue=parseInt(inputQuantityHidden.attr("value"));if(inputValue<1000){inputQuantity.attr("value",inputValue+1);inputQuantityHidden.attr("value",inputValue+1);}
return false;}
function GetTextBox(){if(document.getElementById('ctl00_m_ContentPlaceHolder_m_orderBasket_hiddenQty')!=null){return document.getElementById('ctl00_m_ContentPlaceHolder_m_orderBasket_hiddenQty');}
else{return document.getElementById('ctl00:m_ContentPlaceHolder:m_orderBasket:hiddenQty')}}
function AddQty(Id){var txtBox=GetTextBox();var _string=txtBox.value;var _string2='';var splitted=_string.split('|');for(var i=0;i<splitted.length;i++){var lineItemID=splitted[i].split(';');if(lineItemID[0]==Id){if((parseInt(lineItemID[1])+1)<100){_string2=_string.replace(Id+';'+lineItemID[1]+'|',Id+';'+(parseInt(lineItemID[1])+1)+'|');}
else{_string2=_string;}}}
txtBox.value=_string2;}
function SubQty(Id){var txtBox=GetTextBox();var _string=txtBox.value;var _string2='';var splitted=_string.split('|');for(var i=0;i<splitted.length;i++){var lineItemID=splitted[i].split(';');if(lineItemID[0]==Id){if(parseInt(lineItemID[1]-1)>0){_string2=_string.replace(Id+';'+lineItemID[1]+'|',Id+';'+(parseInt(lineItemID[1])-1)+'|');}
else{_string2=_string;}}}
txtBox.value=_string2;}
function eventsNavTop(){SecondNav();jQuery('#navTop .main li').bind('mouseenter',function(){if(jQuery(this).hasClass('navItem')){jQuery('.navItem.current').removeClass('current');jQuery(this).addClass('current');jQuery('.univerLink',this).addClass('univer-hover');if(jQuery.browser.msie&&navigator.appVersion.indexOf('MSIE 6')!=-1){jQuery('select').css("visibility","hidden");}}
if(!jQuery(this).hasClass('navItem')&&jQuery('ul',jQuery(this)).length){jQuery(this).addClass('show-menu');}
if($('.nav_2').length){$('.nav_2 > li').mouseenter(function(){$('.layer',$(this)).show();})
$('.nav_2 > li').mouseleave(function(){$('.layer',$(this)).hide();})
$('.second_level > li').mouseenter(function(){$('.layer',$(this)).show();})
$('.second_level > li').mouseleave(function(){$('.layer',$(this)).hide();})
if(jQuery('ul',jQuery(this)).length){jQuery('ul',jQuery(this)).eq(0).show();}
if($('.menu_secondnav',$(this)).eq(0).length){$(this).addClass('hover');}}});jQuery('#navTop .main li').bind('mouseleave',function(){if(jQuery('ul',jQuery(this)).length){jQuery(this).removeClass('show-menu');}
if(jQuery(this).hasClass('navItem')){jQuery(this).removeClass('current');jQuery('.univer-hover').removeClass('univer-hover');if(jQuery.browser.msie&&navigator.appVersion.indexOf('MSIE 6')!=-1){jQuery('select').css("visibility","");showSelect();}}
if($('.menu_secondnav',$(this)).eq(0).length&&$(this).hasClass('hover')){$(this).removeClass('hover');}});}
function SecondNav(){$('.second_level > li').each(function(){var levels=getNbLevel($(this));var maxItems=getMaxNbItems($(this));if(levels==1){$('.inner_layer',$(this)).width(165);var wCB=165-17;}
if(levels==2){$('.inner_layer',$(this)).width(165+166);var wCB=(165+166)-17;}
if(levels==3){$('.inner_layer',$(this)).width(165+166+166);var wCB=(165+166+166)-17;}
if(levels==4){$('.inner_layer',$(this)).width(165+166+166+166);var wCB=(165+166+166+166)-17;}
$('.inner_layer',$(this)).height(maxItems*30);jQuery('.layer_bottom .cb',$(this)).width(wCB);var wlbtm=wCB+23;jQuery('.layer_bottom',$(this)).width(wlbtm);})}
function getNbLevel(obj){for(var i=1;i<10;i++){var len=$('.level'+i,obj).length;if(len<=0)
return(i-1);}}
function getMaxNbItems(obj){var max=0;for(var i=1;i<10;i++){var item=$('.level'+i,obj);var len=item.length;if(len<=0)
return max;for(var j=0;j<len;j++){var items=$('> li',item[j]).length;if(items>max)
max=items;}}
return max;}
function remoteEvents(){jQuery('.quickBasket').bind('mouseenter',function(){if(!jQuery(this).hasClass('hover'))jQuery(this).addClass('hover');})
jQuery('.quickBasket').bind('mouseleave',function(){jQuery(this).removeClass('hover');})
jQuery('.detail-basket').bind('mouseenter',function(){if(!jQuery(this).hasClass('hover'))jQuery(this).addClass('hover');})
jQuery('.detail-basket').bind('mouseleave',function(){jQuery(this).removeClass('hover');})
jQuery('.close-view-basket').bind('click',function(){jQuery('.quickBasket').removeClass('hover');return false;})
jQuery('div [id*="m_uptPanel"]').css('display','none');jQuery('div.form-accunt [id*="m_uptPanel"]').css('display','');jQuery('div.contact_container [id*="m_uptPanel"]').css('display','');jQuery('.account').bind('mouseenter',function(){if(!jQuery(".account").hasClass('hover')){jQuery('div[id*="m_uptPanel"]').css('display','');jQuery(".account").addClass('hover');}})
jQuery('#form-identification').bind('mouseleave',function(){if(focused==false){jQuery('div[id*="m_uptPanel"]').css('display','none');jQuery('div.form-accunt [id*="m_uptPanel"]').css('display','');jQuery(".account").removeClass('hover');}})
jQuery('#form-identification').bind('mouseover',function(){if(!jQuery(".account").hasClass('hover')){jQuery('div[id*="m_uptPanel"]').css('display','');jQuery(".account").addClass('hover');}})
jQuery('#remote .account h3 a').bind('click',function(){jQuery('div[id*="m_uptPanel"]').css('display','none');})}
function hideAccount(){$('body').bind('click',function(e){if(!$(e.target).parents('#form-identification').length){$('.account').removeClass('hover');focused=false;}});$('.identifPanel input').focus(function(e){focused=true;});}
function hoverNavTop(){level2Selected();level1Selected();}
function level2Selected(){jQuery('.level2 a').bind('mouseenter',function(){jQuery('a',jQuery(this).parents('ul:eq(0)')).removeClass('level2-hover');jQuery(this).addClass('level2-hover');if(!jQuery('ul',jQuery(jQuery(this).parent())).length){jQuery(this).css("background","none");}});}
function level1Selected(){jQuery('.level1>li>a').bind('mouseenter',function(){jQuery('a.level2-hover').removeClass('level2-hover');jQuery('a.level1-hover').removeClass('level1-hover');jQuery(this).addClass('level1-hover');});jQuery('.level1>li>a').bind('mouseleave',function(){jQuery('a.level1-hover').removeClass('level1-hover');});}
function hideSelect(){$('.pager:first select').addClass('hide-select');}
function showSelect(){$('select.hide-select').removeClass('hide-select');}
function initCarousselArticle(){if(jQuery('.caroussel').length){addCaroussel();}}
function addCaroussel(index){var listItem=jQuery('#list-articles .list-item-article');listItem.removeClass("show-list");listItem.addClass("hide-list");if(!index){index=0;}
jQuery(listItem[index]).removeClass("hide-list");jQuery(listItem[index]).addClass("show-list");if(!jQuery('.jcarousel-container',jQuery(listItem[index])).length){jQuery('.caroussel',jQuery(listItem[index])).jcarousel({scroll:1})}
return false;}
function displayTab(){if(jQuery('.tab-article').length){jQuery('.tab-article li a').bind('click',function(){jQuery(".tab-article li").removeClass("active");if(!jQuery(this).parent().hasClass('active')){jQuery(this).parent().addClass("active");}
var index=jQuery('.tab-article li').index(jQuery(this).parents('li'));addCaroussel(index);return false;})}
jQuery('.tab-list li a').bind('click',function(){var parentsOnglet=jQuery(this).parents('.tab-onglets');jQuery(".tab-list li",parentsOnglet).removeClass("active");jQuery(this).parents('li').addClass("active");jQuery(".items-tab-onglet > div",parentsOnglet).addClass("hide-item");var index=jQuery('.tab-list li',parentsOnglet).index(jQuery(this).parents('li'));jQuery(jQuery(".items-tab-onglet > div",parentsOnglet)[index]).removeClass("hide-item");return false;})}
function bindZoneResume(){$('.zone-resume a.resumeNorme').bind('click',function(){selectTab($('#ctl00_Cplo_m_ctrlFicheProduct_m_divPlusProd'));});}
function bindMediaSmallImages(){unbindMediaSmallImage($("img[name$='mediaBook']"));unbindMediaSmallImage($("img[name$='mediaVideo']"));bindMediaVideoSmallImage($("img[name$='mediaVideo']"));unbindMediaSmallImage($("img[name$='mediaMp3']"));bindMediaAudioSmallImage($("img[name$='mediaMp3']"));unbindMediaSmallImage($("img[name$='media360']"));bindMedia360SmallImage($("img[name$='media360']"));}
function bindMedia360SmallImage(image){image.parent().bind('click',function(){var hidden360List=jQuery("#ctl00_Cplo_m_ctrlFicheProduct_m_divVue360").val();selectTab($('#ctl00_Cplo_m_ctrlFicheProduct_m_divVue360'));return false;})
$('a.zoom').click(function(e){});}
function unbindMediaSmallImage(image){image.parent().unbind('click');image.unbind('click');}
function bindMediaAudioSmallImage(image){image.parent().bind('click',function(){var hiddenAudioList=jQuery("#ctl00_Cplo_m_ctrlFicheProduct_m_audioList").val();var hiddenVideoList=jQuery("#ctl00_Cplo_m_ctrlFicheProduct_m_videoList").val();var flashvarsAudio={flashFile:"swf/mp3/swf/main.swf",confFile:hiddenAudioList,defaultSong:"0"};var flashvarsVideo={flashFile:"swf/video/swf/main.swf",confFile:hiddenVideoList,defaultVideo:"-1"};var paramsAudio={menu:"false",scale:"noScale",wmode:"opaque"};swfobject.embedSWF("swf/mp3/swf/loader.swf","flash-player","466","236","8.0.0","swf/mp3/swf/expressinstall.swf",flashvarsAudio,paramsAudio);var paramsVideo={menu:"false",scale:"noScale",wmode:"opaque"};swfobject.embedSWF("swf/video/swf/loader.swf","flash-video","635","560","8.0.0","swf/video/swf/expressInstall.swf",flashvarsVideo,paramsVideo);selectTab($('#ctl00_Cplo_m_ctrlFicheProduct_m_divAudioVideo'));return false;})
$('a.zoom').click(function(e){});}
function bindMediaVideoSmallImage(image){image.parent().bind('click',function(){var hiddenAudioList=jQuery("#ctl00_Cplo_m_ctrlFicheProduct_m_audioList").val();var hiddenVideoList=jQuery("#ctl00_Cplo_m_ctrlFicheProduct_m_videoList").val();var flashvarsAudio={flashFile:"swf/mp3/swf/main.swf",confFile:hiddenAudioList,defaultSong:"-1"};var flashvarsVideo={flashFile:"swf/video/swf/main.swf",confFile:hiddenVideoList,defaultVideo:"0"};var paramsAudio={menu:"false",scale:"noScale",wmode:"opaque"};swfobject.embedSWF("swf/mp3/swf/loader.swf","flash-player","466","236","8.0.0","swf/mp3/swf/expressinstall.swf",flashvarsAudio,paramsAudio);var paramsVideo={menu:"false",scale:"noScale",wmode:"opaque"};swfobject.embedSWF("swf/video/swf/loader.swf","flash-video","635","560","8.0.0","swf/video/swf/expressInstall.swf",flashvarsVideo,paramsVideo);selectTab($('#ctl00_Cplo_m_ctrlFicheProduct_m_divAudioVideo'));return false;})
$('a.zoom').click(function(e){});}
function selectTab(panel){var tabHeaders=$('.pdt-more-info .tab-onglets .tab-list li');var tabContents=$('.pdt-more-info .tab-onglets .items-tab-onglet div');tabHeaders.removeClass("active");var index=tabContents.index($(panel));$(tabHeaders[index]).addClass("active");tabContents.addClass("hide-item");$(panel).removeClass("hide-item");return false;}
function hideShowCommand(index){var link=$("a[name='toggle-table-recap-cmd"+index+"'] span");var input=$("input[id$='m_hidCommandText']");var input2=$("input[id$='m_hidCommandText2']");var text=input.val();var text2=input2.val();if(link.text()==text){link.text(text2);}
else{link.text(text);}}
function ValidateLogin(emailID,passwordID,buttonID,errorID){var email=$('#'+emailID);var password=$('#'+passwordID);var button=$('#'+buttonID);var error=$('#'+errorID);if(email.val().length>0&&password.val().length>0){error.css('display','none');return(true);}else{error.css('display','');return(false);}}
function InitializeNumberInput(){$(".change-quantity").unbind('change',InputHandler);$(".change-quantity").keypress(HandleKeyPress);$(".change-quantity").bind('change',InputHandler);}
function InputHandler(){if($(this).val()==""||$(this).val()=="0"){$(this).val("1");}
var hidden=$(this).parent().children("input[id$='quantityHidden']")
if(hidden!=null){hidden.val($(this).val());}}
function HandleKeyPress(e){var key;var keychar;if(window.event){key=window.event.keyCode;}else if(e){key=e.which;}else{return(true);}
keychar=String.fromCharCode(key);if((key==null)||(key==0)||(key==8)||(key==9)||(key==13)||(key==27)){return(true);}else if((("0123456789").indexOf(keychar)>-1)){return(true);}else if(keychar=="."){return(false);}else{return(false);}}
function ValidateMail(emailID,inputID){var email=$('#'+emailID);var input=$('#'+inputID);var emailRegex=/^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;if(email.val().length>0&&emailRegex.test(email.val())){return(true);}else{email.val(input.val());return(false);}}
jQuery(document).ready(function(event){jQuery(".bt-less").bind("click",displayLessQuantity);jQuery(".bt-more").bind("click",displayMoreQuantity);jQuery("a[class*=toggle]").miniToggle({hideAll:true});hoverNavTop();eventsNavTop();remoteEvents();initCarousselArticle();displayTab();bindZoneResume();hideAccount();zIndexWorkaround();if(jQuery('.title-puzzle').length){jQuery('.title-puzzle').bind('mouseenter',function(){jQuery(this).addClass('hover');})
jQuery('.title-puzzle').bind('mouseleave',function(){jQuery(this).removeClass('hover');})}
if(jQuery('.list-visuel').length){jQuery('.list-visuel .caroussel').jcarousel({scroll:1})
jQuery('.list-visuel li a').bind('click',function(){jQuery('.list-visuel li').removeClass('selected');jQuery(this).parents('li').addClass('selected');var srcBigVisuel=jQuery(this).attr('href');jQuery('.big-visuel img').attr('src',srcBigVisuel);var imgToZoom=srcBigVisuel.substring(srcBigVisuel.lastIndexOf("/")+1);return false;})}
if(jQuery('.list-visuel .caroussel li a').length){var jqZoomCSS={float:'left',position:'relative',padding:'0px',cursor:'pointer'};var options={zoomWidth:380,zoomHeight:300,preloadText:'',yOffset:-1,title:false};jQuery('.list-visuel .caroussel li a').bind('click',function(){$('body > img').remove();initializeZoom(this,options);return(false);});jQuery('.jqzoom').jqzoom(options);jQuery('.jqzoom').bind('mouseleave',function(){jQuery("a[class*=toggle]").live("click",onToggleZoom);});var imgValue="#ctl00_Cplo_m_ctrlFicheProduct_m_rptZoomImages_ctl00_m_zoomImg";var value=jQuery(imgValue).val();if(value!=null&&value!=""){jQuery('.jqzoom').attr('href',value);}else{jQuery('.jqzoom').unbind();}
function initializeZoom(img,options){jQuery('.jqzoom').removeAttr('href');jQuery('.jqzoom').unbind();var index=jQuery('.list-visuel .caroussel li a').index(img);var imgValue="#ctl00_Cplo_m_ctrlFicheProduct_m_rptZoomImages_ctl";if(index<10)
imgValue+="0"+index+"_m_zoomImg";else
imgValue+=index+"_m_zoomImg";var value=jQuery(imgValue).val();if(value&&value!=""){jQuery('.jqzoom').attr('href',value);jQuery('.jqzoom').jqzoom(options);jQuery('.jqzoom').bind('mouseleave',function(){jQuery("a[class*=toggle]").live("click",onToggleZoom);});}else{jQuery('.jqzoom').unbind();}}}
bindMediaSmallImages();InitializeNumberInput();InitializeSearchFocus();});function bindOffersTabs(){$('.tab-onglets a[id*="m_btnBottomTab"]').bind('click',function(){$('.list-visuel .caroussel li').removeClass('selected');$('.list-visuel .caroussel li.jcarousel-item-1').addClass('selected');$('.list-visuel .caroussel li.selected a').click();});}
function xt_cart(){}
jQuery(window).load(function(event){jQuery.log(OT);});function displaySmallBasket(){jQuery('.quickBasket').addClass('hover');setTimeout("jQuery('.quickBasket').removeClass('hover');",5000);}
function openPopinAddToBasket(){jQuery("#popinAddToBasket").css("display","block");setTimeout("jQuery('#popinAddToBasket').css('display','none');",3500);}
function openPopin(){return openPopinParam(this.href,jQuery(this).attr('rel'));}
function openZoomPopin(){var result=openPopinParam(this.href,jQuery(this).attr('rel'));$('#the-product').attr('src',$("input[id$='m_zoomImg']").val());$('#filigrane').attr('width',$('#the-product').attr('width'));return(result);}
function openPopinParam(paramUrl,rel){if(jQuery("#genericPopin").length){$("#genericPopin").remove();}
$("#page").after('<div id="genericPopin"><div id="overlay"></div></div>');$.ajax({async:false,type:"GET",url:paramUrl,dataType:'html',success:function(msg){msg=jQuery('#'+rel,$(msg));jQuery("#overlay").after(msg);setDimensionsLayer();resizeLayer();displayTab();addAndRemoveInput();closePopin();if($.browser.msie&&navigator.appVersion.indexOf('MSIE 6')!=-1){jQuery('select').hide();}}});return false;}
function addAndRemoveInput(){jQuery('.add-sub-basket .add-input').bind('click',function(){jQuery(this).parents('p').removeClass('last');jQuery(this).parents('p').next().removeClass('hidden');jQuery(this).parents('p').next().addClass('last');});jQuery('.add-sub-basket .remove-input').bind('click',function(){jQuery(this).parents('p').removeClass('last');jQuery(this).parents('p').addClass('hidden');jQuery(this).parents('p').prev().addClass('last');});}
function setDimensionsLayer(){var scroll=getPageScroll();var dim=getPageSize();var popin=jQuery('.popin');popin.css({top:scroll[1]+(dim[3]/10)});var bodyWidth=$("body").width();var hi=getHeight()+scroll[1];$("#overlay").height(hi);$("#overlay").width(bodyWidth);}
function closePopin(){$(".close-pop,#overlay").click(function(){$("#genericPopin").remove();if($.browser.msie&&navigator.appVersion.indexOf('MSIE 6')!=-1){jQuery('select').show();}
return false;});}
function getHeight(){if(window.innerHeight||window.innerWidth)
return window.innerHeight;return document.documentElement.clientHeight;}
function getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};function getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;}
function resizeLayer(){$(window).bind('scroll',function(){setDimensionsLayer();});$(window).resize(function(){setDimensionsLayer();});}
jQuery(document).ready(function(){jQuery('.linkPopin,.shop').bind('click',openPopin);jQuery('.linkZoomPopin').bind('click',openZoomPopin);addAndRemoveInput();});$(document).ready(function(){closePopinConfirm();openPopinDispo();openPopinInfo();openPopinInfoRemise();openPopinInfoRemiseNotButton();});function hideSelectPopin(){$(document).ready(function(){if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}});}
function showSelectPopin(){$(document).ready(function(){if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","visible");}});}
function closePopinConfirm(){$(".popinDisplay .closePopinDisplay, .popinDisplay .closePopin, .popinDisplay .closePopin2").click(function(){$(".popinDisplay").css("display","none");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","visible");}
return false;})}
function closePopin2(){$(".popinDisplay").css("display","none");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","visible");}}
function openPopinDispo(){$(".linkOpenDispo").click(function(){$(".popinDispo").css("display","block");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}
return false;});}
function openPopinInfo(){$(".linkLivraisonPopin").click(function(){$(".popinInfoProduct").css("display","block");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}
return false;});}
function openPopinInfoRemise(){$(".linkRemisePopin").click(function(){$(".popinInfoRemise").css("display","block");$(".popinButton").css("display","block");$(".fromficheproduit").css("display","none");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}
return false;});}
function openPopinInfoRemiseNotButton(){$(".linkRemisePopinNotButton").click(function(){$(".popinInfoRemise").css("display","block");$(".popinButton").css("display","none");$(".fromficheproduit").css("display","none");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}
return false;});}
function openPopinInfoRemise2(){$(document).ready(function(){$(".popinInfoRemise").css("display","block");$(".frompopup").css("display","none");$(".fromficheproduit").css("display","block");$(".popinButton").css("display","block");$(".popinInfoStock").css("display","none");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}
return false;});}
function openPopinInfoRemise3(maData){$(document).ready(function(){$(".popinInfoRemise").css("display","block");$(".popinButton").css("display","block");$(".fromficheproduit").css("display","none");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}
document.getElementById("hrefSendGetBasket").href="javascript:closePopin2();sendGetBasket('"+maData+"');";return false;});}
function openPopinInfoStock(){$(document).ready(function(){$(".popinInfoStock").css("display","block");$(".frompopup").css("display","none");$(".fromficheproduit").css("display","block");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}
return false;});}
function openPopinInfoStock2(){$(document).ready(function(){$(".popinInfoStock").css("display","block");$(".fromficheproduit").css("display","none");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}
return false;});}
function openPopinOnglet(){$(".loginPersoOnglet").css("display","block");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}}
function checkFormQuantity(){var re=/[0-9]$/gi;var blocInputQuantity=$('.inputQuantityProduct');if(blocInputQuantity.length){$('.price-right .insidePriceRight').css('visibility','hidden');var tmpInputQuantity=$(".inputQuantityProduct").attr("value");$(".inputQuantityProduct").keyup(function(){if($(this).attr("value").match(re)!=null){tmpInputQuantity=$(this).attr("value");}
else{if($(this).attr("value")==""){tmpInputQuantity=$(this).attr("value");}
else{$(this).attr("value",tmpInputQuantity);}}
if($(this).attr("value")!=""){$('.price-right .insidePriceRight').css('visibility','visible');}
else{$('.price-right .insidePriceRight').css('visibility','hidden');}});}}
function showPopInQas(){$("select").css("visibility","hidden");var background=document.getElementById("backgroundMask");var popin=document.getElementById("popIn");popWidth=arguments[0];if(popWidth==null)
popWidth=462;background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";document.getElementById("popInTop").style.width=document.getElementById("popInBottom").style.width=(popWidth-8)+"px";var myObjColl=getElementsByClassName('popinDropDownList','select',popin);for(var iFor=0,nbDdl=myObjColl.length;iFor<nbDdl;iFor++){myObjColl[iFor].style.visibility="visible";}
centerPopInQas();}
function centerPopInQas(){var background=document.getElementById("backgroundMask");var popin=document.getElementById("popIn");if(background!=null&&popin!=null){var xPos=document.documentElement.clientWidth/2-popin.clientWidth/2;if(xPos<0)
xPos=10;popin.style.left=xPos+"px";var yPos=document.documentElement.clientHeight/2-popin.clientHeight/2;if(yPos<4)
yPos=10;popin.style.top=yPos+"px";popin.style.position="fixed";}}
function hidePopInQas(){$("select").css("visibility","visible");var background=document.getElementById("backgroundMask");var popin=document.getElementById("popIn");background.style.display="none";popin.style.display="none";}
function showPopInTNT(){if($.browser.msie&&$.browser.version<=6){$("select").css("visibility","hidden");$(".selectTNT").css("visibility","visible");}
var background=document.getElementById("backgroundMaskTNT");var popin=document.getElementById("popInTNT");popWidth=arguments[0];if(popWidth==null)
popWidth=600;background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";document.getElementById("popInTopTNT").style.width=document.getElementById("popInBottomTNT").style.width=(popWidth-8)+"px";var myObjColl=getElementsByClassName('popinDropDownList','select',popin);for(var iFor=0,nbDdl=myObjColl.length;iFor<nbDdl;iFor++){myObjColl[iFor].style.visibility="visible";}
centerPopInTNT();}
function centerPopInTNT(){var background=document.getElementById("backgroundMaskTNT");var popin=document.getElementById("popInTNT");if(background!=null&&popin!=null){var xPos=document.documentElement.clientWidth/2-popin.clientWidth/2;if(xPos<0)
xPos=10;popin.style.left=xPos+"px";var yPos=document.documentElement.clientHeight/2-popin.clientHeight/2;if(yPos<4)
yPos=10;popin.style.top=yPos+"px";popin.style.position="fixed";}}
function hidePopInTNT(){$("select").css("visibility","visible");var background=document.getElementById("backgroundMaskTNT");var popin=document.getElementById("popInTNT");background.style.display="none";popin.style.display="none";}
function showPopInSubmitPaper(){if($.browser.msie&&$.browser.version<=6){$("select").css("visibility","hidden");$(".selectSubmitPaper").css("visibility","visible");}
var background=document.getElementById("backgroundMaskSubmitPaper");var popin=document.getElementById("popInSubmitPaper");popWidth=arguments[0];if(popWidth==null)
popWidth=415;background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";document.getElementById("popInTopSubmitPaper").style.width=document.getElementById("popInBottomSubmitPaper").style.width=(popWidth-8)+"px";var myObjColl=getElementsByClassName('popinDropDownList','select',popin);for(var iFor=0,nbDdl=myObjColl.length;iFor<nbDdl;iFor++){myObjColl[iFor].style.visibility="visible";}
centerPopInSubmitPaper();}
function centerPopInSubmitPaper(){var background=document.getElementById("backgroundMaskSubmitPaper");var popin=document.getElementById("popInSubmitPaper");if(background!=null&&popin!=null){var xPos=document.documentElement.clientWidth/2-popin.clientWidth/2;if(xPos<0)
xPos=10;popin.style.left=xPos+"px";var yPos=document.documentElement.clientHeight/2-popin.clientHeight/2;if(yPos<4)
yPos=10;popin.style.top=yPos+"px";popin.style.position="fixed";}}
function hidePopInSubmitPaper(){$("select").css("visibility","visible");var background=document.getElementById("backgroundMaskSubmitPaper");var popin=document.getElementById("popInSubmitPaper");background.style.display="none";popin.style.display="none";}
function showPopInSousPanier(){if($.browser.msie&&$.browser.version<=6){$("select").css("visibility","hidden");$(".selectSousPanier").css("visibility","visible");}
var background=document.getElementById("backgroundMaskSousPanier");var popin=document.getElementById("popInSousPanier");popWidth=arguments[0];if(popWidth==null)
popWidth=554;background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";document.getElementById("popInTopSousPanier").style.width=document.getElementById("popInBottomSousPanier").style.width=(popWidth-8)+"px";var myObjColl=getElementsByClassName('popinDropDownList','select',popin);for(var iFor=0,nbDdl=myObjColl.length;iFor<nbDdl;iFor++){myObjColl[iFor].style.visibility="visible";}
centerPopInSousPanier();}
function centerPopInSousPanier(){var background=document.getElementById("backgroundMaskSousPanier");var popin=document.getElementById("popInSousPanier");if(background!=null&&popin!=null){var xPos=document.documentElement.clientWidth/2-popin.clientWidth/2;if(xPos<0)
xPos=10;popin.style.left=xPos+"px";var yPos=document.documentElement.clientHeight/2-popin.clientHeight/2;if(yPos<4)
yPos=10;popin.style.top=yPos+"px";popin.style.position="fixed";}}
function hidePopInSousPanier(){$("select").css("visibility","visible");var background=document.getElementById("backgroundMaskSousPanier");var popin=document.getElementById("popInSousPanier");background.style.display="none";popin.style.display="none";}
function showPopInExtract(){if($.browser.msie&&$.browser.version<=6){$("select").css("visibility","hidden");$(".selectSousPanier").css("visibility","visible");$(".popinSelect").css("visibility","visible");}
var background=document.getElementById("backgroundMaskExtract");var popin=document.getElementById("popInExtract");popWidth=arguments[0];if(popWidth==null)
popWidth=554;background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";$(window).scroll(updatePopExtract);$(window).resize(updatePopExtract);updatePopExtract();document.getElementById("popInTopExtract").style.width=document.getElementById("popInBottomExtract").style.width=(popWidth-8)+"px";var myObjColl=getElementsByClassName('popinDropDownList','select',popin);for(var iFor=0,nbDdl=myObjColl.length;iFor<nbDdl;iFor++){myObjColl[iFor].style.visibility="visible";}
centerPopInExtract();}
function updatePopExtract(){var scroll=getPageScroll();var dim=getPageSize();var popin=$("#popInExtract");popin.css("top",scroll[1]+(dim[3]/10)+"px");$("#backgroundMaskExtract").width($("body").width());$("#backgroundMaskExtract").height(getHeight()+scroll[1]);var background=document.getElementById("backgroundMaskExtract");background.style.left=(-background.offsetParent.offsetLeft)+"px";centerPopInExtract();}
function centerPopInExtract(){var background=document.getElementById("backgroundMaskExtract");var popin=document.getElementById("popInExtract");if(background!=null&&popin!=null){var parentLeftOffset=0;if(popin.offsetParent!=null){parentLeftOffset=popin.offsetParent.offsetLeft;}
var xPos=document.documentElement.clientWidth/2-popin.clientWidth/2-parentLeftOffset;popin.style.left=xPos+"px";}}
function hidePopInExtract(){$("select").css("visibility","visible");var background=document.getElementById("backgroundMaskExtract");var popin=document.getElementById("popInExtract");if(background!=null){background.style.display="none";}
if(popin!=null){popin.style.display="none";}
$(window).unbind('scroll',updatePopExtract);$(window).unbind('resize',updatePopExtract);}
function showPopInQuantityDiscount(){if($.browser.msie&&$.browser.version<=6){$("select").css("display","none");if($("#popInQuantityDiscount").length>=1){$("#popInQuantityDiscount select").css("display","none");}}
var background=document.getElementById("backgroundMaskQuantityDiscount");var popin=document.getElementById("popInQuantityDiscount");popWidth=arguments[0];if(popWidth==null)
popWidth=440;background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";$(window).scroll(updatePopInQuantityDiscount);$(window).resize(updatePopInQuantityDiscount);updatePopInQuantityDiscount();document.getElementById("popInTopQuantityDiscount").style.width=document.getElementById("popInBottomQuantityDiscount").style.width=(popWidth-8)+"px";centerPopInQuantityDiscount();}
function updatePopInQuantityDiscount(){var scroll=getPageScroll();var dim=getPageSize();var popin=$("#popInQuantityDiscount");popin.css("top",scroll[1]+(dim[3]/10)+"px");$("#backgroundMaskQuantityDiscount").width($("body").width());$("#backgroundMaskQuantityDiscount").height(getHeight()+scroll[1]);var background=document.getElementById("backgroundMaskQuantityDiscount");background.style.left=(-background.offsetParent.offsetLeft)+"px";centerPopInQuantityDiscount();}
function centerPopInQuantityDiscount(){var background=document.getElementById("backgroundMaskQuantityDiscount");var popin=document.getElementById("popInQuantityDiscount");if(background!=null&&popin!=null){var parentLeftOffset=0;if(popin.offsetParent!=null){parentLeftOffset=popin.offsetParent.offsetLeft;}
var xPos=document.documentElement.clientWidth/2-popin.clientWidth/2-parentLeftOffset;popin.style.left=xPos+"px";}}
function hidePopInQuantityDiscount(){var background=document.getElementById("backgroundMaskQuantityDiscount");var popin=document.getElementById("popInQuantityDiscount");if(background!=null){background.style.display="none";}
if(popin!=null){popin.style.display="none";}
$(window).unbind('scroll',updatePopInQuantityDiscount);$(window).unbind('resize',updatePopInQuantityDiscount);if($("#popInQuantityDiscount").length>=1){$("#popInQuantityDiscount select").css("display","block");}
$("select").css("display","block");}
function showPopInQuantityDispo(){if($.browser.msie&&$.browser.version<=6){$("select").css("visibility","hidden");$(".selectSousPanier").css("visibility","visible");}
var background=document.getElementById("backgroundMaskQuantityDispo");var popin=document.getElementById("popInQuantityDispo");popWidth=arguments[0];if(popWidth==null)
popWidth=530;background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";$(window).scroll(updatePopInQuantityDispo);$(window).resize(updatePopInQuantityDispo);updatePopInQuantityDispo();document.getElementById("popInTopQuantityDispo").style.width=document.getElementById("popInBottomQuantityDispo").style.width=(popWidth-8)+"px";var myObjColl=getElementsByClassName('popinDropDownList','select',popin);for(var iFor=0,nbDdl=myObjColl.length;iFor<nbDdl;iFor++){myObjColl[iFor].style.visibility="visible";}}
function updatePopInQuantityDispo(){var scroll=getPageScroll();var dim=getPageSize();var popin=$("#popInQuantityDispo");popin.css("top",scroll[1]+(dim[3]/10)+"px");$("#backgroundMaskQuantityDispo").width($("body").width());$("#backgroundMaskQuantityDispo").height(getHeight()+scroll[1]);var background=document.getElementById("backgroundMaskQuantityDispo");background.style.left=(-background.offsetParent.offsetLeft)+"px";centerPopInQuantityDispo();}
function centerPopInQuantityDispo(){var background=document.getElementById("backgroundMaskQuantityDispo");var popin=document.getElementById("popInQuantityDispo");if(background!=null&&popin!=null){var parentLeftOffset=0;if(popin.offsetParent!=null){parentLeftOffset=popin.offsetParent.offsetLeft;}
var xPos=document.documentElement.clientWidth/2-popin.clientWidth/2-parentLeftOffset;popin.style.left=xPos+"px";}}
function hidePopInQuantityDispo(){$("select").css("visibility","visible");var background=document.getElementById("backgroundMaskQuantityDispo");var popin=document.getElementById("popInQuantityDispo");if(background!=null){background.style.display="none";}
if(popin!=null){popin.style.display="none";}
$(window).unbind('scroll',updatePopInQuantityDispo);$(window).unbind('resize',updatePopInQuantityDispo);}
function showPopInCancelConfirmation(){if($.browser.msie&&$.browser.version<=6){$("select").css("visibility","hidden");$(".selectSousPanier").css("visibility","visible");}
var background=document.getElementById("backgroundMaskCancelConfirmation");var popin=document.getElementById("popInCancelConfirmation");popWidth=arguments[0];if(popWidth==null)
popWidth=530;background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";$(window).scroll(updatePopInCancelConfirmation);$(window).resize(updatePopInCancelConfirmation);updatePopInCancelConfirmation();document.getElementById("popInTopCancelConfirmation").style.width=document.getElementById("popInBottomCancelConfirmation").style.width=(popWidth-8)+"px";var myObjColl=getElementsByClassName('popinDropDownList','select',popin);for(var iFor=0,nbDdl=myObjColl.length;iFor<nbDdl;iFor++){myObjColl[iFor].style.visibility="visible";}}
function updatePopInCancelConfirmation(){var scroll=getPageScroll();var dim=getPageSize();var popin=$("#popInCancelConfirmation");popin.css("top",scroll[1]+(dim[3]/10)+"px");$("#backgroundMaskCancelConfirmation").width($("body").width());$("#backgroundMaskCancelConfirmation").height(getHeight()+scroll[1]);var background=document.getElementById("backgroundMaskCancelConfirmation");background.style.left=(-background.offsetParent.offsetLeft)+"px";centerPopInCancelConfirmation();}
function centerPopInCancelConfirmation(){var background=document.getElementById("backgroundMaskCancelConfirmation");var popin=document.getElementById("popInCancelConfirmation");if(background!=null&&popin!=null){var parentLeftOffset=0;if(popin.offsetParent!=null){parentLeftOffset=popin.offsetParent.offsetLeft;}
var xPos=document.documentElement.clientWidth/2-popin.clientWidth/2-parentLeftOffset;popin.style.left=xPos+"px";}}
function hidePopInCancelConfirmation(){$("select").css("visibility","visible");var background=document.getElementById("backgroundMaskCancelConfirmation");var popin=document.getElementById("popInCancelConfirmation");if(background!=null){background.style.display="none";}
if(popin!=null){popin.style.display="none";}
$(window).unbind('scroll',updatePopInCancelConfirmation);$(window).unbind('resize',updatePopInCancelConfirmation);}
function showPopInQuickView(){if($.browser.msie&&$.browser.version<=6){$("select").css("visibility","hidden");$(".selectQuickView").css("visibility","visible");}
var background=document.getElementById("backgroundMaskQuickView");background.style.display="block";var popin=document.getElementById("popInQuickView");popWidth=386;var popTop=arguments[0];background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";$(window).scroll(resizeQuickViewBackground);$(window).resize(resizeQuickViewBackground);resizeQuickViewBackground();document.getElementById("popInTopQuickView").style.width=document.getElementById("popInBottomQuickView").style.width=(popWidth-8)+"px";var myObjColl=getElementsByClassName('popinDropDownList','select',popin);for(var iFor=0,nbDdl=myObjColl.length;iFor<nbDdl;iFor++){myObjColl[iFor].style.visibility="visible";}
centerPopInQuickView(popTop);}
function resizeQuickViewBackground(){var scroll=getPageScroll();var dim=getPageSize();var popin=$("#popInQuickView");popin.css("top",scroll[1]+(dim[3]/10)+"px");$("#backgroundMaskQuickView").width($("body").width());$("#backgroundMaskQuickView").height(getHeight()+scroll[1]);var background=document.getElementById("backgroundMaskQuickView");background.style.left=(-background.offsetParent.offsetLeft)+"px";centerPopInQuickView();}
function centerPopInQuickView(){var background=document.getElementById("backgroundMaskQuickView");var popin=document.getElementById("popInQuickView");if(background!=null&&popin!=null){var parentLeftOffset=0;if(popin.offsetParent!=null){parentLeftOffset=popin.offsetParent.offsetLeft;}
var xPos=document.documentElement.clientWidth/2-popin.clientWidth/2-parentLeftOffset;popin.style.left=xPos+"px";}}
function hidePopInQuickView(){$("select").css("visibility","visible");var background=document.getElementById("backgroundMaskQuickView");var popin=document.getElementById("popInQuickView");if(background!=null){background.style.display="none";}
if(popin!=null){popin.style.display="none";}
$(window).unbind('scroll',resizeQuickViewBackground);$(window).unbind('resize',resizeQuickViewBackground);}
function showPopInQuickOrderDel(){if($.browser.msie&&$.browser.version<=6){$("select").css("visibility","hidden");$(".selectSousPanier").css("visibility","visible");}
var background=document.getElementById("backgroundMaskQuickOrderDel");background.style.display="block";var popin=document.getElementById("popInQuickOrderDel");popWidth=386;var popTop=arguments[0];background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";$(window).scroll(resizeQuickOrderDelBackground);$(window).resize(resizeQuickOrderDelBackground);resizeQuickOrderDelBackground();document.getElementById("popInTopQuickOrderDel").style.width=document.getElementById("popInBottomQuickOrderDel").style.width=(popWidth-8)+"px";centerPopInQuickOrderDel(popTop);}
function resizeQuickOrderDelBackground(){var scroll=getPageScroll();var dim=getPageSize();var popin=$("#popInQuickOrderDel");popin.css("top",scroll[1]+(dim[3]/10)+"px");$("#backgroundMaskQuickOrderDel").width($("body").width());$("#backgroundMaskQuickOrderDel").height(getHeight()+scroll[1]);var background=document.getElementById("backgroundMaskQuickOrderDel");background.style.left=(-background.offsetParent.offsetLeft)+"px";centerPopInQuickOrderDel();}
function centerPopInQuickOrderDel(){var background=document.getElementById("backgroundMaskQuickOrderDel");var popin=document.getElementById("popInQuickOrderDel");if(background!=null&&popin!=null){var parentLeftOffset=0;if(popin.offsetParent!=null){parentLeftOffset=popin.offsetParent.offsetLeft;}
var xPos=document.documentElement.clientWidth/2-popin.clientWidth/2-parentLeftOffset;popin.style.left=xPos+"px";}}
function hidePopInQuickOrderDel(){$("select").css("visibility","visible");var background=document.getElementById("backgroundMaskQuickOrderDel");var popin=document.getElementById("popInQuickOrderDel");if(background!=null){background.style.display="none";}
if(popin!=null){popin.style.display="none";}}
function getOffset(node){if(node.nodeName.toUpperCase()=="BODY"){return[0,0];}
else{var offset=getOffset(node.parentNode);dx=node.offsetLeft+offset[0];dy=node.offsetTop+offset[1];return[dx,dy];}}
window.onresize=centerPopInQas;function getElementsByClassName(strClass,strTag,objContElm){strTag=strTag||"*";objContElm=objContElm||document;var objColl=objContElm.getElementsByTagName(strTag);if(!objColl.length&&strTag=="*"&&objContElm.all)objColl=objContElm.all;var arr=new Array();var delim=strClass.indexOf('|')!=-1?'|':' ';var arrClass=strClass.split(delim);for(var i=0,j=objColl.length;i<j;i++){var arrObjClass=objColl[i].className.split(' ');if(delim==' '&&arrClass.length>arrObjClass.length)continue;var c=0;comparisonLoop:for(var k=0,l=arrObjClass.length;k<l;k++){for(var m=0,n=arrClass.length;m<n;m++){if(arrClass[m]==arrObjClass[k])c++;if((delim=='|'&&c==1)||(delim==' '&&c==arrClass.length)){arr.push(objColl[i]);break comparisonLoop;}}}}
return arr;}
var popInCheckOutIDVisible=null;function showCheckOutPopIn(popInContentID,popWidth){if(popWidth==null)
popWidth=462;var background=document.getElementById("backgroundMaskCheckOut");var popin=document.getElementById('popInCheckOut');var popinContent=document.getElementById('contentPopIn'+popInContentID);popinContent.style.display="block";background.style.display="block";popin.style.display="block";popin.style.width=popWidth+"px";document.getElementById("popInTopCheckOut").style.width=document.getElementById("popInBottomCheckOut").style.width=(popWidth-8)+"px";popInCheckOutIDVisible=popInContentID;centerCheckOutPopIn();}
function centerCheckOutPopIn(){if(popInCheckOutIDVisible==null)
return;var ctrlDivPage=document.getElementById("page");var popin=document.getElementById('popInCheckOut');if(ctrlDivPage!=null&&popin!=null){var xPos=ctrlDivPage.clientWidth/2-popin.clientWidth/2;if(xPos<0)
xPos=10;popin.style.left=xPos+"px";var yPos=document.documentElement.clientHeight/2-popin.clientHeight/2;if(yPos<4)
yPos=10;popin.style.top=yPos+"px";}}
function hideCheckOutPopIn(){if(popInCheckOutIDVisible==null)
return;var background=document.getElementById("backgroundMaskCheckOut");var popin=document.getElementById('popInCheckOut');var popinContent=document.getElementById('contentPopIn'+popInCheckOutIDVisible);popinContent.style.display="none";background.style.display="none";popin.style.display="none";popInCheckOutIDVisible=null;}
function openPopinQuantityError(maData){$(document).ready(function(){$(".popinInfoRemise").css("display","block");$(".popinButton").css("display","block");$(".fromficheproduit").css("display","none");if(typeof document.body.style.maxHeight==="undefined"){$("select").css("visibility","hidden");}
document.getElementById("hrefSendGetBasket").href="javascript:closePopin2();sendGetBasket('"+maData+"');";return false;});}
function openPopinErrorBasket(maData){$(document).ready(function(){var divError='<div id="errorBasket">'+maData+'</div>';$("#popinErrorBasket").css("display","block");$("#popinErrorBasket").after(divError);return false;});}
function DoLink(boutiqueId,categoryId,famillyId,subFamillyId){var sitePath=$("#ctl00_Npr_m_hdfSitePath").val();var paramUser=$("#ctl00_Npr_m_hdfInfoUser").val();if(subFamillyId>0){window.location=sitePath+"Home_sousFamille.aspx?"+"BoutiqueId="+boutiqueId+"&CategorieId="+categoryId+"&FamilleId="+famillyId+"&SousFamilleId="+subFamillyId+
paramUser;}
else{if(famillyId>0){window.location=sitePath+"Home_Famille.aspx?"+"BoutiqueId="+boutiqueId+"&CategorieId="+categoryId+"&FamilleId="+famillyId+
paramUser;}
else{if(categoryId>0){window.location=sitePath+"Home_Boutique.aspx?"+"BoutiqueId="+boutiqueId+"&CategorieId="+categoryId+
paramUser;}
else
if(boutiqueId>0){window.location=sitePath+"Home_Boutique.aspx?"+"BoutiqueId="+boutiqueId+
paramUser;}}}}
function DoLinkLC(boutiqueId,categoryId,famillyId,subFamillyId){var sitePath=$("#ctl00_Npr_m_hdfSitePath").val();var paramUser=$("#ctl00_Npr_m_hdfInfoUser").val();if(subFamillyId>0){window.location=sitePath+"LoisirsCreatifs.aspx?"+"BoutiqueId="+boutiqueId+"&CategorieId="+categoryId+"&FamilleId="+famillyId+"&SousFamilleId="+subFamillyId+
paramUser;}}
function DoLinkEv(boutiqueId,code){var sitePath=$("#ctl00_Npr_m_hdfSitePath").val();var paramUser=$("#ctl00_Npr_m_hdfInfoUser").val();window.location=sitePath+"Evenement.aspx?"+"CurrentContentCode="+code+paramUser;}
function printPartOfPage(elementId){var printContent=document.getElementById(elementId);var windowUrl='about:blank';var uniqueName=new Date();var windowName='Print'+uniqueName.getTime();var printWindow=window.open(windowUrl,windowName,'left=50000,top=50000,width=0,height=0');printWindow.document.write(printContent.innerHTML);printWindow.document.close();printWindow.focus();return;printWindow.print();printWindow.close();}
window.onresize=centerPopInQuickView;function ValidateRefPart(id){var searchId="#"+id;var regEx=/^[0-9]{3}$/;if(regEx.test($(searchId).val())==false){$(searchId).css("border","1px solid red");return(false);}
else{$(searchId).css("border","1px solid #A5ACB2");return(true);}}
function ValidateAllRefPart(ref1Id,ref2Id,ref3Id){var result=true;result=result&&ValidateRefPart(ref1Id);result=result&&ValidateRefPart(ref2Id);result=result&&ValidateRefPart(ref3Id);return(result);}
function ZipCodeValidator_EvaluateIsValid(val){val.isvalid=true;if(val.enablerangevalidator=="True"){val.isvalid=RangeValidatorEvaluateIsValid(val);}
if((val.isvalid)&&(val.enableregularexpressionvalidator=="True")){val.isvalid=RegularExpressionValidatorEvaluateIsValid(val);}
return val.isvalid;}
function SubmitedBasketValidator_EvaluateIsValid(val){val.isvalid=RequiredFieldValidatorEvaluateIsValid(val);oldcontroltovalidate=val.controltovalidate;val.controltovalidate=val.secondcontroltovalidate;val.isvalid=(val.isvalid||RequiredFieldValidatorEvaluateIsValid(val))
val.controltovalidate=oldcontroltovalidate;return val.isvalid;}
function load(){var urllocation=location.href;if(urllocation.indexOf("#")==-1){window.location.href=urllocation.substring(urllocation.indexOf("#"));}}
function openPopinAddToBasketSolr(){$("#popinAddToBasketSolr").css("display","block");setTimeout("$('#popinAddToBasketSolr').css('display','none');",3500);}
function isIE(){if(navigator.userAgent.match(/MSIE \d\.\d+/))
return true;return false;}
function zIndexWorkaround(){if(isIE()){$("div.layer").parents().each(function(){var p=$(this);var pos=p.css("position");if(pos=="relative"||pos=="absolute"||pos=="fixed"){p.hover(function(){$(this).addClass("on-top");},function(){$(this).removeClass("on-top");});}});}}
function InitializeSearchFocus(){$("input.search.text, input.search-txt").focus(function(){$(this).val("");$(this).unbind("focus");});}
