function SendToEmailPopUp(URL){day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=441,height=520');")}window.addEvent('domready',function(){if($defined($('subnav_ro'))){$('subnav_ro').addEvent('click',function(e){element=$$('#subnav_ro dd ul').getLast();var fx=new Fx.Styles(element,{duration:200,wait:false});if(element.getStyle('display')=='none'||element.getStyle('opacity')==0){element.setStyle('opacity',0);element.setStyle('display','block');fx.start({'opacity':1})}else{fx.start({'opacity':0})}});$('subnav_ro').addEvent('mouseleave',function(e){element=$$('#subnav_ro dd ul').getLast();var fx=new Fx.Styles(element,{duration:600,wait:false});fx.start({'opacity':0})})}if($defined($('flashrequired'))){new Fx.Style($('flashrequired'),'opacity',{duration:2500}).start(0,1)}resetContentHeight=function(){if($defined($('wrapper'))){if(window.getWidth()<=1002){$('wrapper').setStyle('width','1002px')}else{$('wrapper').setStyle('width','100%')}}if($defined($('content_wrapper'))){if($defined($('subnav'))){$('content_wrapper').setStyle('height',(window.getHeight()-106))}else{$('content_wrapper').setStyle('height',(window.getHeight()-82))}var flashurl=''+window.location+'';if(flashurl.match('en/index')||flashurl.match('fr/index')||flashurl.match('en/women-clothes-collection')||flashurl.match('en/men-clothes-collection')||flashurl.match('fr/collection-vetements-femmes')||flashurl.match('fr/collection-vetements-hommes')||flashurl.match('en/women-fashion-accessories')||flashurl.match('en/men-fashion-accessories')||flashurl.match('fr/accessoires-mode-femmes')||flashurl.match('fr/accessoires-mode-hommes')||flashurl.match('en/le-chateau-fashion-history')||flashurl.match('fr/le-chateau-historique-mode')||flashurl.match('en/as-seen-in')||flashurl.match('fr/lu-dans')){$('content').setStyle('height','100%');$('content').setStyle('width','auto');var contentsize=$('content').getSize();if(contentsize['size']['y']<540){$('content').setStyle('height',540)}else{$('content').setStyle('height','100%')}}}};resetContentHeight();window.addEvent('resize',function(){resetContentHeight()});$$('.nav_primary','.bottom_menu','.subnav').each(function(thisnavitem){var MouseFx=new Fx.Style(thisnavitem,'opacity',{wait:false,duration:400,transition:Fx.Transitions.Quart.easeInOut});var src=thisnavitem.getProperty('src');src=src.replace('_ro','');var extension=src.substring(src.lastIndexOf('.'),src.length);thisnavitem.getParent().getParent().setStyle('background','url('+src.replace(extension,'_ro'+extension)+') no-repeat');thisnavitem.addEvent('mouseenter',function(){MouseFx.start(1,0.01)});thisnavitem.addEvent('mouseleave',function(){MouseFx.start(0.01,1)})});if($defined($('nav_newsletter_submit'))){$('nav_newsletter_submit').addEvent('mouseover',function(){new Fx.Style(this,"opacity",{duration:200}).start(0,1)})}$$('#content a').each(function(thisa){thisa.addEvent('mouseover',function(){new Fx.Style(thisa,'opacity',{duration:200}).start(0,1)})});if(window.webkit){$$('#content a img').each(function(thisa){thisa.removeEvents('mouseover');thisa.addEvent('mouseover',function(){new Fx.Style(thisa,'opacity',{duration:200}).start(0,1)})})}$$('.redirect_select').each(function(this_redirect){this_redirect.addEvent('change',function(){if(window.ie){if($defined(this_redirect.options[this_redirect.selectedIndex].name)){window.location=this_redirect.options[this_redirect.selectedIndex].name}}else{if($defined(this_redirect.options[this_redirect.selectedIndex].getProperty('name'))){window.location=this_redirect.options[this_redirect.selectedIndex].getProperty('name')}}})});$$('.redirect_select_new').each(function(this_redirect){var day=new Date();var windowid=day.getTime();this_redirect.addEvent('change',function(){if(window.ie){if($defined(this_redirect.options[this_redirect.selectedIndex].name)){window.open(this_redirect.options[this_redirect.selectedIndex].name,windowid)}}else{if($defined(this_redirect.options[this_redirect.selectedIndex].getProperty('name'))){window.open(this_redirect.options[this_redirect.selectedIndex].getProperty('name'),windowid)}}})});if(window.ie7){$$('.redirect_select').each(function(fixselect){fixselect.setStyle('height','18px')})}var HoverTips=new Tips($$('.tooltip'),{initialize:function(){this.fx=new Fx.Style(this.toolTip,'opacity',{duration:200,wait:false}).set(0)},onShow:function(thistip){this.fx.start(1)},onHide:function(thistip){this.fx.start(0)}})});window.addEvent('load',function(){if($defined($('node-4'))||$defined($('node-21'))){if($defined($('node-4'))){var trendstitle=$('node-4')}else{var trendstitle=$('node-21')}new Fx.Style(trendstitle,'opacity',{duration:600}).start(0,1).chain(function(){new Fx.Style($('block-views-LadiesPickOfTheWeek'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-MenPickOfTheWeek'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-TrendsReport'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-Soundstage'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-LeChateauTV'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-AsSeenIn'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-StoreOpenings'),'opacity',{duration:200}).start(0,1).chain(function(){})})})})})})})});UnloadPage=function(){new Fx.Style($('block-views-StoreOpenings'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-AsSeenIn'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-LeChateauTV'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-Soundstage'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-TrendsReport'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-MenPickOfTheWeek'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-LadiesPickOfTheWeek'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style(trendstitle,'opacity',{duration:600}).start(0).chain(function(){})})})})})})})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){if(thisaimg.target=='_blank'){thisaimg.addEvent('click',function(){window.open(thisaimg.href);thisaimg.href="#";thisaimg.target="_self";return false})}else{thisaimg.addEvent('click',UnloadPage.bind(this))}})}if($defined($('node-5'))||$defined($('node-22'))){if($defined($('node-5'))){var stylefilestitle=$('node-5')}else{var stylefilestitle=$('node-22')}new Fx.Style(stylefilestitle,'opacity',{duration:600}).start(0,1).chain(function(){new Fx.Style($('block-views-HowTo'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-WardrobeEssentials'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-WhatToWear'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-Care'),'opacity',{duration:200}).start(0,1).chain(function(){})})})})});UnloadPage=function(){new Fx.Style($('block-views-Care'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-WhatToWear'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-WardrobeEssentials'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-HowTo'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style(stylefilestitle,'opacity',{duration:600}).start(0).chain(function(){})})})})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('node-7'))||$defined($('node-24'))){new Fx.Style($('block-views-AboutLeChateau'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-History'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-Expertise'),'opacity',{duration:200}).start(0,1).chain(function(){})})});UnloadPage=function(){new Fx.Style($('block-views-Expertise'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-History'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-AboutLeChateau'),'opacity',{duration:200}).start(0).chain(function(){})})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('node-6'))||$defined($('node-23'))){new Fx.Style($('customer_title'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('locator_block'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-FAQ'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('contact_us_block'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('exchange_block'),'opacity',{duration:200}).start(0,1).chain(function(){})})})})});UnloadPage=function(){new Fx.Style($('exchange_block'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('contact_us_block'),'opacity',{duration:200}).start(0).chain(function(){new Fx.Style($('block-views-FAQ'),'opacity',{duration:200}).start(0).chain(function(){new Fx.Style($('locator_block'),'opacity',{duration:200}).start(0).chain(function(){new Fx.Style($('customer_title'),'opacity',{duration:200}).start(0).chain(function(){})})})})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))});$('contact_submit').addEvent('mouseover',function(){new Fx.Style(this,"opacity",{duration:200}).start(0,1)});new Accordion($$('.view-item-FAQ .view-data-field_faq_question_value'),$$('.view-item-FAQ .view-data-field_faq_answer_value'),{start:'all-closed',alwaysHide:true,onActive:function(toggler,element){toggler.setStyle('color','#ee2e24');toggler.setStyle('font-weight','bold');new Fx.Style(element,'padding-bottom').start('15px')},onBackground:function(toggler,element){toggler.setStyle('color','#666666');toggler.setStyle('font-weight','normal');new Fx.Style(element,'padding-bottom').start('0px')}})}if($defined($('locator_block'))){new Fx.Style($('locator_block'),'opacity',{duration:200}).start(0,1);UnloadPage=function(){new Fx.Style($('locator_block'),'opacity',{duration:50}).start(0)};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('block-views-LadiesPickOfTheWeekFull'))){new Fx.Style($('block-views-LadiesPickOfTheWeekFull'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-LadiesPreviousPicks'),'opacity',{duration:200}).start(0,1).chain(function(){})});UnloadPage=function(){new Fx.Style($('block-views-LadiesPreviousPicks'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-LadiesPickOfTheWeekFull'),'opacity',{duration:50}).start(0).chain(function(){})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('block-views-MenPickOfTheWeekFull'))){new Fx.Style($('block-views-MenPickOfTheWeekFull'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('block-views-MenPreviousPicks'),'opacity',{duration:200}).start(0,1).chain(function(){})});UnloadPage=function(){new Fx.Style($('block-views-MenPreviousPicks'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('block-views-MenPickOfTheWeekFull'),'opacity',{duration:50}).start(0).chain(function(){})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('trendsreport_left'))){new Fx.Style($('trendsreport_left'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('trendsreport_right'),'opacity',{duration:200}).start(0,1).chain(function(){})});UnloadPage=function(){new Fx.Style($('trendsreport_right'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('trendsreport_left'),'opacity',{duration:50}).start(0).chain(function(){})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('lechateautv_left'))){new Fx.Style($('lechateautv_title'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('lechateautv_right'),'opacity',{duration:200}).start(0,1).chain(function(){})});UnloadPage=function(){new Fx.Style($('lechateautv_right'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('lechateautv_title'),'opacity',{duration:50}).start(0).chain(function(){})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('howto_left'))){new Fx.Style($('howto_left'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('howto_right'),'opacity',{duration:200}).start(0,1).chain(function(){})});UnloadPage=function(){new Fx.Style($('howto_right'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('howto_left'),'opacity',{duration:50}).start(0).chain(function(){})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('whattowear_left'))){new Fx.Style($('whattowear_left'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('whattowear_right'),'opacity',{duration:200}).start(0,1).chain(function(){})});UnloadPage=function(){new Fx.Style($('whattowear_right'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('whattowear_left'),'opacity',{duration:50}).start(0).chain(function(){})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('care_left'))){new Fx.Style($('care_left'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('care_right'),'opacity',{duration:200}).start(0,1).chain(function(){})});UnloadPage=function(){new Fx.Style($('care_right'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('care_left'),'opacity',{duration:50}).start(0).chain(function(){})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('wardrobe_left'))){new Fx.Style($('wardrobe_left'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('wardrobe_right'),'opacity',{duration:200}).start(0,1).chain(function(){})});UnloadPage=function(){new Fx.Style($('wardrobe_right'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('wardrobe_left'),'opacity',{duration:50}).start(0).chain(function(){})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('subscribe_left'))){new Fx.Style($('subscribe_left'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('subscribe_right'),'opacity',{duration:200}).start(0,1).chain(function(){})});UnloadPage=function(){new Fx.Style($('subscribe_left'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('subscribe_right'),'opacity',{duration:50}).start(0).chain(function(){})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('careers_left'))){new Fx.Style($('careers_left'),'opacity',{duration:200}).start(0,1).chain(function(){new Fx.Style($('careers_right'),'opacity',{duration:200}).start(0,1).chain(function(){})});UnloadPage=function(){new Fx.Style($('careers_right'),'opacity',{duration:50}).start(0).chain(function(){new Fx.Style($('careers_left'),'opacity',{duration:50}).start(0).chain(function(){})})};if(window.webkit){window.addEvent('unload',UnloadPage.bind(window))}$$('a').each(function(thisaimg){thisaimg.addEvent('click',UnloadPage.bind(this))})}if($defined($('hr_ticker'))){news_ticker=new Ticker($('hr_ticker').getElement('div.item-list'),$$('#hr_ticker .item-list div'),{speed:2000,delay:3000})}if($defined($('newsletter_submit'))){$('newsletter_submit').addEvent('mouseover',function(){new Fx.Style(this,"opacity",{duration:200}).start(0,1)})}$$('.howto-share a','.howto-share a img','.pick-share a','.pick-share a img','#sizechart_download a','#sizechart_download a img','#investor_more a','#investor_more a img','.pick-send-to-friend a','.pick-send-to-friend a img','#international_more a','#international_more a img','#subnav_international','#nav_gift_card a','#nav_gift_card a img','#ir_link a','#ir_link a img','#careers_print_pdf a','#contest_rules_agree a').each(function(thisexception){thisexception.removeEvents('click')});if($defined($('subnav_international'))){$('subnav_international').getParent().removeEvents('click')}if(window.ie6){imgs=$$('#content img[src$=.png]');new pngFix({imgElements:imgs})}});var Ticker=new Class({options:{speed:1000,delay:5000,onComplete:Class.empty,onStart:Class.empty},initialize:function(container,items,options){this.setOptions(options);this.el=$(container);this.items=items;var w=0;this.items.each(function(li,index){w+=li.getSize().size.x});this.el.setStyles({position:'relative',top:0,left:0,width:w});this.periodical=this.fx=new Fx.Styles(this.el,{duration:this.options.speed,transition:Fx.Transitions.Cubic.easeInOut,onComplete:function(){var i=(this.current==0)?this.items.length:this.current;this.items[i-1].injectInside(this.el);this.el.setStyle('left',0)}.bind(this)});this.current=0;this.next.bind(this).delay(this.options.delay)},next:function(){this.current++;if(this.current>=this.items.length)this.current=0;this.fx.start({top:this.items[this.current].offsetTop,left:-this.items[this.current].offsetLeft});this.next.bind(this).delay(this.options.delay)}});Ticker.implement(new Options);var FancyForm={start:function(elements,options){FancyForm.runningInit=1;if($type(elements)!='array')elements=$$('input');if(!options)options=[];FancyForm.onclasses=($type(options['onClasses'])=='object')?options['onClasses']:{checkbox:'checked',radio:'selected'};FancyForm.offclasses=($type(options['offClasses'])=='object')?options['offClasses']:{checkbox:'unchecked',radio:'unselected'};if($type(options['extraClasses'])=='object'){FancyForm.extra=options['extraClasses']}else if(options['extraClasses']){FancyForm.extra={checkbox:'f_checkbox',radio:'f_radio',on:'f_on',off:'f_off',all:'fancy'}}else{FancyForm.extra={}}FancyForm.onSelect=$pick(options['onSelect'],function(el){});FancyForm.onDeselect=$pick(options['onDeselect'],function(el){});var keeps=[];FancyForm.chks=elements.filter(function(chk){if($type(chk)!='element')return false;if(chk.getTag()=='input'&&(FancyForm.onclasses[chk.getProperty('type')])){var el=chk.getParent();if(el.getElement('input')==chk){el.type=chk.getProperty('type');el.inputElement=chk;this.push(el)}else{chk.addEvent('click',function(ev){ev.stopPropagation()})}}else if((chk.inputElement=chk.getElement('input'))&&(FancyForm.onclasses[(chk.type=chk.inputElement.getProperty('type'))])){return true}return false}.bind(keeps));FancyForm.chks=FancyForm.chks.merge(keeps);keeps=null;FancyForm.chks.each(function(chk){if(window.ie){chk.inputElement.setStyle('position','absolute');chk.inputElement.setStyle('margin-left','-9999px')}else{chk.inputElement.setStyle('position','absolute');chk.inputElement.setStyle('left','-9999px')}chk.inputElement.setStyle('height','0px');chk.addEvent('selectStart',function(){});chk.name=chk.inputElement.getProperty('name');if(chk.inputElement.checked)FancyForm.select(chk);else FancyForm.deselect(chk);chk.addEvent('click',function(e){var e=new Event(e);if(chk.inputElement.getProperty('disabled'))return;if($type(e.preventDefault)=='function')e.preventDefault(true);else if($type(e.returnValue)=='function')e.returnValue(true);if(!chk.hasClass(FancyForm.onclasses[chk.type])){FancyForm.select(chk)}else if(chk.type!='radio'){FancyForm.deselect(chk)}FancyForm.focusing=1;chk.inputElement.focus();FancyForm.focusing=0});chk.addEvent('mousedown',function(e){if($type(e.preventDefault)=='function')e.preventDefault(true);else if($type(e.returnValue)=='function')e.returnValue(true)});chk.inputElement.addEvent('focus',function(e){if(!FancyForm.focusing)chk.setStyle('outline','1px dotted')});chk.inputElement.addEvent('blur',function(e){chk.setStyle('outline','0')});if(extraclass=FancyForm.extra[chk.type])chk.addClass(extraclass);if(extraclass=FancyForm.extra['all'])chk.addClass(extraclass)});FancyForm.runningInit=0},select:function(chk){chk.inputElement.checked='checked';chk.removeClass(FancyForm.offclasses[chk.type]);chk.addClass(FancyForm.onclasses[chk.type]);if(chk.type=='radio'){FancyForm.chks.each(function(other){if(other.name!=chk.name||other==chk)return;FancyForm.deselect(other)})}if(extraclass=FancyForm.extra['on'])chk.addClass(extraclass);if(extraclass=FancyForm.extra['off'])chk.removeClass(extraclass);if(!FancyForm.runningInit)FancyForm.onSelect(chk);chk.thischkid=chk.getElement('img').getProperty('id');if(chk.thischkid=='women_shoes_picto'){$(chk.thischkid).setProperty('src','../locator/images/img_picto_women_shoes_chk.png')}else if(chk.thischkid=='women_picto'){$(chk.thischkid).setProperty('src','../locator/images/img_picto_women_chk.png')}else if(chk.thischkid=='men_picto'){$(chk.thischkid).setProperty('src','../locator/images/img_picto_men_chk.png')}},deselect:function(chk){chk.inputElement.checked=false;chk.removeClass(FancyForm.onclasses[chk.type]);chk.addClass(FancyForm.offclasses[chk.type]);if(extraclass=FancyForm.extra['off'])chk.addClass(extraclass);if(extraclass=FancyForm.extra['on'])chk.removeClass(extraclass);if(!FancyForm.runningInit)FancyForm.onDeselect(chk);chk.thischkid=chk.getElement('img').getProperty('id');if(chk.thischkid=='women_shoes_picto'){$(chk.thischkid).setProperty('src','../locator/images/img_picto_women_shoes.png')}else if(chk.thischkid=='women_picto'){$(chk.thischkid).setProperty('src','../locator/images/img_picto_women.png')}else if(chk.thischkid=='men_picto'){$(chk.thischkid).setProperty('src','../locator/images/img_picto_men.png')}},all:function(){FancyForm.chks.each(function(chk){FancyForm.select(chk)})},none:function(){FancyForm.chks.each(function(chk){FancyForm.deselect(chk)})}};var elSelect=new Class({options:{container:false,baseClass:'elSelect',offset:0},source:false,selected:false,_select:false,current:false,selectedOption:false,dropDown:false,optionsContainer:false,hiddenInput:false,initialize:function(options){this.setOptions(options);if(!this.options.container)return;this.selected=false;this.source=$(this.options.container).getElement('select');this.buildFrameWork();$(this.source).getElements('option').each(this.addOption,this);$(this.options.container).setHTML('');this._select.injectInside($(this.options.container));this.bindEvents()},buildFrameWork:function(){this._select=new Element('div').addClass(this.options.baseClass);this.current=new Element('div').addClass('selected').injectInside($(this._select));this.selectedOption=new Element('div').addClass('selectedOption').injectInside($(this.current));this.dropDown=new Element('div').addClass('dropDown').injectInside($(this.current));new Element('div').addClass('clear').injectInside($(this._select));this.optionsContainer=new Element('div').addClass('optionsContainer').injectInside($(this._select));this.optionsContainer.setStyle('margin-top',-this.options.offset+'px');var t=new Element('div').addClass('optionsContainerTop').injectInside($(this.optionsContainer));var o=new Element('div').injectInside($(t));var p=new Element('div').injectInside($(o));var t=new Element('div').addClass('optionsContainerBottom').injectInside($(this.optionsContainer));var o=new Element('div').injectInside($(t));var p=new Element('div').injectInside($(o));this.hiddenInput=new Element('input').setProperties({type:'hidden',name:this.source.getProperty('name')}).injectInside($(this._select))},bindEvents:function(){document.addEvent('click',function(e){if($defined(this.optionsContainer)){if(this.optionsContainer.getStyle('display')=='block'){this.onDropDown()}}}.bind(this));$(this.options.container).addEvent('click',function(e){new Event(e).stop()});this.current.addEvent('click',this.onDropDown.bindWithEvent(this))},addOption:function(option){var o=new Element('div').addClass('option').setProperty('value',option.value);if(option.disabled){o.addClass('disabled')}else{o.addEvents({'click':this.onOptionClick.bindWithEvent(this),'mouseout':this.onOptionMouseout.bindWithEvent(this),'mouseover':this.onOptionMouseover.bindWithEvent(this)})}if($defined(option.getProperty('class'))&&$chk(option.getProperty('class')))o.addClass(option.getProperty('class'));if(option.selected){if(this.selected)this.selected.removeClass('selected');this.selected=o;o.addClass('selected');this.selectedOption.setText(option.text);this.hiddenInput.setProperty('value',option.value)}o.setText(option.text);o.injectBefore($(this.optionsContainer).getLast())},onDropDown:function(e){if(this.optionsContainer.getStyle('display')=='block'){this.optionsContainer.setStyle('display','none')}else{this.optionsContainer.setStyle('display','block');this.selected.addClass('selected');var width=this.optionsContainer.getStyle('width').toInt()>this._select.getStyle('width').toInt()?this.optionsContainer.getStyle('width'):this._select.getStyle('width');this.optionsContainer.setStyle('width',width);this.optionsContainer.getFirst().setStyle('width',width);this.optionsContainer.getLast().setStyle('width',width)}},onOptionClick:function(e){var event=new Event(e);if(this.selected!=event.target){this.selected.removeClass('selected');event.target.addClass('selected');this.selected=event.target;this.selectedOption.setText(this.selected.getText());this.hiddenInput.setProperty('value',this.selected.getProperty('value'))}this.onDropDown()},onOptionMouseover:function(e){var event=new Event(e);this.selected.removeClass('selected');event.target.addClass('selected')},onOptionMouseout:function(e){var event=new Event(e);event.target.removeClass('selected')}});elSelect.implement(new Events);elSelect.implement(new Options);selectedresult=null;curelement=1;window.addEvent('domready',function(){var up=$('scroll_up');var down=$('scroll_down');function validate_required(field){with(field){if(value==null||value==""){return false}else{return true}}};function validate_form(thisform){with(thisform){if(validate_required($('city'))==false&&validate_required($('zipcode'))==false){if(selected_language=='en'){alert('Please provide at least your city or postal code and click on Search.')}else{alert("Merci d'indiquer au moins votre ville ou code postal puis cliquez sur Trouver.")}return false}else{return true}}};Element.Events.extend({'wheelup':{type:Element.Events.mousewheel.type,map:function(event){var event=new Event(event);if(event.wheel>=0)this.fireEvent('wheelup',event);var cls=function(){[up,down].each(function(arrow){arrow.setOpacity(1)})}.delay(100)}},'wheeldown':{type:Element.Events.mousewheel.type,map:function(event){var event=new Event(event);if(event.wheel<=0)this.fireEvent('wheeldown',event)}}});var fade=new Fx.Style($('locator_form'),'opacity',{duration:300,transition:Fx.Transitions.Quad.easeOut});if($defined($('search_form'))&&$defined($('submit'))){FancyForm.start();if(window.ie||window.gecko){var countrySelect=new elSelect({container:'custom_country'});var radiusSelect=new elSelect({container:'custom_radius',offset:100})}$('submit').addEvent('mouseover',function(){new Fx.Style(this,"opacity",{duration:200}).start(0,1)});$('search_form').addEvent('submit',function(e){if(e)new Event(e).stop();if(validate_form($('search_form'))==true){fade.start(0);this.send({update:$('locator_form'),evalScripts:true,onComplete:function(){if(window.ie||window.gecko){countrySelect.optionsContainer=null;radiusSelect.optionsContainer=null}document.removeEvents();fade.stop();fade.start(1);$('slider').setOpacity(1);$('knob').setOpacity(1);$('store_map_wrapper').setStyle('padding','5px');new Fx.Styles($('store_map_wrapper')).start({'height':'255px'}).chain(function(){new Fx.Style($('map'),'opacity').start(0,1)});$('store_map_wrapper').setOpacity(1);$('stores_legend').setOpacity(1);var vertical_anim=new Fx.Styles($('vertical_bar'),{wait:false,duration:300,transition:Fx.Transitions.Quad.easeOut});if($defined($$('.results_block'))){$$('.results_block').addEvent('click',function(e){var e=new Event(e).stop();selectedresult=this;$$('.results_block').setStyles({'margin-left':'0px','border-left':'0px'});new Fx.Styles(selectedresult,{duration:200}).start({'margin-left':'10px'})})}function scroll_up(howmany){if($defined($('store'+(curelement-howmany)+''))){curelement=curelement-howmany}else{curelement=1}var scrolltoel='store'+curelement+'';if($defined($(scrolltoel))){scrollers.toElement(scrolltoel)}};function scroll_down(howmany){if($defined($('store'+(curelement+howmany)+''))){curelement=curelement+howmany}else{curelement=$$('.results_block').length}var scrolltoel='store'+curelement+'';if($defined($(scrolltoel))){scrollers.toElement(scrolltoel)}};var scrollers=new Fx.Scroll($('results'),{wait:false,duration:300,transition:Fx.Transitions.Quad.easeInOut,onComplete:function(){if($defined(verticalslider)){verticalslider.set(curelement-1)}}});var cls=function(){[up,down].each(function(arrow){arrow.setOpacity(1)})}.delay(100);$('locator_form').addEvent('wheelup',function(e){var e=new Event(e).stop();up.setOpacity(.5);down.setOpacity(1);scroll_up(1)});$('locator_form').addEvent('wheeldown',function(e){var e=new Event(e).stop();up.setOpacity(1);down.setOpacity(.5);scroll_down(1)});$('scroll_wrapper').addEvent('wheelup',function(e){var e=new Event(e).stop();up.setOpacity(.5);down.setOpacity(1);scroll_up(1)});$('scroll_wrapper').addEvent('wheeldown',function(e){var e=new Event(e).stop();up.setOpacity(1);down.setOpacity(.5);scroll_down(1)});$('scroll_img_up').addEvent('click',function(e){var e=new Event(e).stop();up.setOpacity(.5);scroll_up(1);var clup=function(){up.setOpacity(1)}.delay(100)});$('scroll_img_down').addEvent('click',function(e){var e=new Event(e).stop();down.setOpacity(.5);scroll_down(1);var cldown=function(){down.setOpacity(1)}.delay(100)});var verticalslider=new Slider($('slider'),$('knob'),{steps:$$('.results_block').length-1,mode:'vertical',onChange:function(pos){curelement=pos+1;if($defined(scrollers)&&$defined($('store'+curelement+''))){scrollers.toElement('store'+curelement+'')}}}).set(0);$('new_search').setOpacity(1);$('new_search').addEvent('mouseover',function(){new Fx.Style(this,"opacity",{duration:200}).start(0,1)});$('new_search').addEvent('click',function(e){if(e)new Event(e).stop();window.location.reload()})}})}})}});