(function(){YAHOO.util.Config=function(D){if(D){this.init(D)}if(!D){}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE)},checkNumber:function(D){return(!isNaN(D))},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F)}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner)}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value)}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value}}return D},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value}else{return undefined}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true}}else{return false}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G])}return true}}else{return false}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false}else{if(!B.isUndefined(P)){R.value=P}else{P=R.value}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P])}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break}}}}}return true}else{return false}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D)}else{this.fireEvent(D,E.value)}}},applyConfig:function(E,H){var G,D,F;if(H){F={};for(G in E){if(B.hasOwnProperty(E,G)){F[G.toLowerCase()]=E[G]}}this.initialConfig=F}for(G in E){if(B.hasOwnProperty(E,G)){this.queueProperty(G,E[G])}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D)}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D)}return true}else{return false}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G)}else{return false}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]"}return D},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", "}}return D},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true}}while(G--)}return false};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider)}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,add:function(A,D,C){var F=new Date(A.getTime());switch(D){case this.MONTH:var E=A.getMonth()+C;var B=0;if(E<0){while(E<0){E+=12;B-=1}}else{if(E>11){while(E>11){E-=12;B+=1}}}F.setMonth(E);F.setFullYear(A.getFullYear()+B);break;case this.DAY:F.setDate(A.getDate()+C);break;case this.YEAR:F.setFullYear(A.getFullYear()+C);break;case this.WEEK:F.setDate(A.getDate()+(C*7));break}return F},subtract:function(A,C,B){return this.add(A,C,(B*-1))},before:function(C,B){var A=B.getTime();if(C.getTime()<A){return true}else{return false}},after:function(C,B){var A=B.getTime();if(C.getTime()>A){return true}else{return false}},between:function(B,A,C){if(this.after(B,A)&&this.before(B,C)){return true}else{return false}},getJan1:function(A){return new Date(A,0,1)},getDayOffset:function(B,D){var C=this.getJan1(D);var A=Math.ceil((B.getTime()-C.getTime())/this.ONE_DAY_MS);return A},getWeekNumber:function(C,F){C=this.clearTime(C);var E=new Date(C.getTime()+(4*this.ONE_DAY_MS)-((C.getDay())*this.ONE_DAY_MS));var B=new Date(E.getFullYear(),0,1);var A=((E.getTime()-B.getTime())/this.ONE_DAY_MS)-1;var D=Math.ceil((A)/7);return D},isYearOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getFullYear()!=A.getFullYear()){C=true}return C},isMonthOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getMonth()!=A.getMonth()){C=true}return C},findMonthStart:function(A){var B=new Date(A.getFullYear(),A.getMonth(),1);return B},findMonthEnd:function(B){var D=this.findMonthStart(B);var C=this.add(D,this.MONTH,1);var A=this.subtract(C,this.DAY,1);return A},clearTime:function(A){A.setHours(12,0,0,0);return A}};YAHOO.widget.Calendar=function(C,A,B){this.init(C,A,B)};YAHOO.widget.Calendar.IMG_ROOT=null;YAHOO.widget.Calendar.DATE="D";YAHOO.widget.Calendar.MONTH_DAY="MD";YAHOO.widget.Calendar.WEEKDAY="WD";YAHOO.widget.Calendar.RANGE="R";YAHOO.widget.Calendar.MONTH="M";YAHOO.widget.Calendar.DISPLAY_DAYS=42;YAHOO.widget.Calendar.STOP_RENDER="S";YAHOO.widget.Calendar.SHORT="short";YAHOO.widget.Calendar.LONG="long";YAHOO.widget.Calendar.MEDIUM="medium";YAHOO.widget.Calendar.ONE_CHAR="1char";YAHOO.widget.Calendar._DEFAULT_CONFIG={PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:null},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""}};YAHOO.widget.Calendar._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",RESET:"reset",CLEAR:"clear"};YAHOO.widget.Calendar._STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4"};YAHOO.widget.Calendar.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,_selectedDates:null,domEventMap:null};YAHOO.widget.Calendar.prototype.init=function(C,A,B){this.initEvents();this.today=new Date();YAHOO.widget.DateMath.clearTime(this.today);this.id=C;this.oDomContainer=document.getElementById(A);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(B){this.cfg.applyConfig(B,true)}this.cfg.fireQueue()};YAHOO.widget.Calendar.prototype.configIframe=function(C,B,D){var A=B[0];if(!this.parent){if(YAHOO.util.Dom.inDocument(this.oDomContainer)){if(A){var E=YAHOO.util.Dom.getStyle(this.oDomContainer,"position");if(E=="absolute"||E=="relative"){if(!YAHOO.util.Dom.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){YAHOO.util.Dom.addClass(this.iframe,"fixedsize")}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild)}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null}}}}};YAHOO.widget.Calendar.prototype.configTitle=function(B,A,C){var E=A[0],F;if(E){this.createTitleBar(E)}else{var D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);if(!D){this.removeTitleBar()}else{this.createTitleBar("&#160;")}}};YAHOO.widget.Calendar.prototype.configClose=function(B,A,C){var E=A[0],D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);if(E){if(!D){this.createTitleBar("&#160;")}this.createCloseButton()}else{this.removeCloseButton();if(!D){this.removeTitleBar()}}};YAHOO.widget.Calendar.prototype.initEvents=function(){var A=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(A.BEFORE_SELECT);this.selectEvent=new YAHOO.util.CustomEvent(A.SELECT);this.beforeDeselectEvent=new YAHOO.util.CustomEvent(A.BEFORE_DESELECT);this.deselectEvent=new YAHOO.util.CustomEvent(A.DESELECT);this.changePageEvent=new YAHOO.util.CustomEvent(A.CHANGE_PAGE);this.beforeRenderEvent=new YAHOO.util.CustomEvent(A.BEFORE_RENDER);this.renderEvent=new YAHOO.util.CustomEvent(A.RENDER);this.resetEvent=new YAHOO.util.CustomEvent(A.RESET);this.clearEvent=new YAHOO.util.CustomEvent(A.CLEAR);this.beforeSelectEvent.subscribe(this.onBeforeSelect,this,true);this.selectEvent.subscribe(this.onSelect,this,true);this.beforeDeselectEvent.subscribe(this.onBeforeDeselect,this,true);this.deselectEvent.subscribe(this.onDeselect,this,true);this.changePageEvent.subscribe(this.onChangePage,this,true);this.renderEvent.subscribe(this.onRender,this,true);this.resetEvent.subscribe(this.onReset,this,true);this.clearEvent.subscribe(this.onClear,this,true)};YAHOO.widget.Calendar.prototype.doSelectCell=function(G,A){var L,F,I,C;var H=YAHOO.util.Event.getTarget(G);var B=H.tagName.toLowerCase();var E=false;while(B!="td"&&!YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTABLE)){if(!E&&B=="a"&&YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTOR)){E=true}H=H.parentNode;B=H.tagName.toLowerCase();if(B=="html"){return }}if(E){YAHOO.util.Event.preventDefault(G)}L=H;if(YAHOO.util.Dom.hasClass(L,A.Style.CSS_CELL_SELECTABLE)){F=L.id.split("cell")[1];I=A.cellDates[F];C=new Date(I[0],I[1]-1,I[2]);var K;if(A.Options.MULTI_SELECT){K=L.getElementsByTagName("a")[0];if(K){K.blur()}var D=A.cellDates[F];var J=A._indexOfSelectedFieldArray(D);if(J>-1){A.deselectCell(F)}else{A.selectCell(F)}}else{K=L.getElementsByTagName("a")[0];if(K){K.blur()}A.selectCell(F)}}};YAHOO.widget.Calendar.prototype.doCellMouseOver=function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C)}else{A=this}while(A.tagName.toLowerCase()!="td"){A=A.parentNode;if(A.tagName.toLowerCase()=="html"){return }}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.addClass(A,B.Style.CSS_CELL_HOVER)}};YAHOO.widget.Calendar.prototype.doCellMouseOut=function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C)}else{A=this}while(A.tagName.toLowerCase()!="td"){A=A.parentNode;if(A.tagName.toLowerCase()=="html"){return }}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.removeClass(A,B.Style.CSS_CELL_HOVER)}};YAHOO.widget.Calendar.prototype.setupConfig=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.configMinDate});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.configMaxDate});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.configOptions,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.configOptions});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.configOptions});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.configLocale});var B=function(){this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key)};this.cfg.subscribeToConfigEvent(A.START_WEEKDAY.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_LONG.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_1CHAR.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_MEDIUM.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_LONG.key,B,this,true);this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale})};YAHOO.widget.Calendar.prototype.configPageDate=function(B,A,C){this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key,this._parsePageDate(A[0]),true)};YAHOO.widget.Calendar.prototype.configMinDate=function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key,new Date(D[0],(D[1]-1),D[2]))}};YAHOO.widget.Calendar.prototype.configMaxDate=function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key,new Date(D[0],(D[1]-1),D[2]))}};YAHOO.widget.Calendar.prototype.configSelected=function(C,A,E){var B=A[0];var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;if(B){if(YAHOO.lang.isString(B)){this.cfg.setProperty(D,this._parseDates(B),true)}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(D)}};YAHOO.widget.Calendar.prototype.configOptions=function(B,A,C){this.Options[B.toUpperCase()]=A[0]};YAHOO.widget.Calendar.prototype.configLocale=function(C,B,D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.Locale[C.toUpperCase()]=B[0];this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key)};YAHOO.widget.Calendar.prototype.configLocaleValues=function(D,C,E){var B=YAHOO.widget.Calendar._DEFAULT_CONFIG;D=D.toLowerCase();var G=C[0];switch(D){case B.LOCALE_MONTHS.key:switch(G){case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_SHORT.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_LONG.key).concat();break}break;case B.LOCALE_WEEKDAYS.key:switch(G){case YAHOO.widget.Calendar.ONE_CHAR:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_1CHAR.key).concat();break;case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_SHORT.key).concat();break;case YAHOO.widget.Calendar.MEDIUM:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_MEDIUM.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_LONG.key).concat();break}var F=this.cfg.getProperty(B.START_WEEKDAY.key);if(F>0){for(var A=0;A<F;++A){this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift())}}break}};YAHOO.widget.Calendar.prototype.initStyles=function(){var A=YAHOO.widget.Calendar._STYLES;this.Style={CSS_ROW_HEADER:A.CSS_ROW_HEADER,CSS_ROW_FOOTER:A.CSS_ROW_FOOTER,CSS_CELL:A.CSS_CELL,CSS_CELL_SELECTOR:A.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:A.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:A.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:A.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:A.CSS_CELL_TODAY,CSS_CELL_OOM:A.CSS_CELL_OOM,CSS_CELL_OOB:A.CSS_CELL_OOB,CSS_HEADER:A.CSS_HEADER,CSS_HEADER_TEXT:A.CSS_HEADER_TEXT,CSS_BODY:A.CSS_BODY,CSS_WEEKDAY_CELL:A.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:A.CSS_WEEKDAY_ROW,CSS_FOOTER:A.CSS_FOOTER,CSS_CALENDAR:A.CSS_CALENDAR,CSS_SINGLE:A.CSS_SINGLE,CSS_CONTAINER:A.CSS_CONTAINER,CSS_NAV_LEFT:A.CSS_NAV_LEFT,CSS_NAV_RIGHT:A.CSS_NAV_RIGHT,CSS_CLOSE:A.CSS_CLOSE,CSS_CELL_TOP:A.CSS_CELL_TOP,CSS_CELL_LEFT:A.CSS_CELL_LEFT,CSS_CELL_RIGHT:A.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:A.CSS_CELL_BOTTOM,CSS_CELL_HOVER:A.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:A.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:A.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:A.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:A.CSS_CELL_HIGHLIGHT4}};YAHOO.widget.Calendar.prototype.buildMonthLabel=function(){var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);var C=this.Locale.LOCALE_MONTHS[A.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX;var B=A.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return B+C}else{return C+B}};YAHOO.widget.Calendar.prototype.buildDayLabel=function(A){return A.getDate()};YAHOO.widget.Calendar.prototype.createTitleBar=function(A){var B=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");B.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;B.innerHTML=A;this.oDomContainer.insertBefore(B,this.oDomContainer.firstChild);YAHOO.util.Dom.addClass(this.oDomContainer,"withtitle");return B};YAHOO.widget.Calendar.prototype.removeTitleBar=function(){var A=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A)}YAHOO.util.Dom.removeClass(this.oDomContainer,"withtitle")};YAHOO.widget.Calendar.prototype.createCloseButton=function(){var D=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,F="us/my/bn/x_d.gif";var E=D.getElementsByClassName("link-close","a",this.oDomContainer)[0];if(!E){E=document.createElement("a");A.addListener(E,"click",function(H,G){G.hide();A.preventDefault(H)},this)}E.href="#";E.className="link-close";if(YAHOO.widget.Calendar.IMG_ROOT!==null){var B=D.getElementsByClassName(C,"img",E)[0]||document.createElement("img");B.src=YAHOO.widget.Calendar.IMG_ROOT+F;B.className=C;E.appendChild(B)}else{E.innerHTML='<span class="'+C+" "+this.Style.CSS_CLOSE+'"></span>'}this.oDomContainer.appendChild(E);return E};YAHOO.widget.Calendar.prototype.removeCloseButton=function(){var A=YAHOO.util.Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A)}};YAHOO.widget.Calendar.prototype.renderHeader=function(E){var H=7;var F="us/tr/callt.gif";var G="us/tr/calrt.gif";var L=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(this.cfg.getProperty(L.SHOW_WEEK_HEADER.key)){H+=1}if(this.cfg.getProperty(L.SHOW_WEEK_FOOTER.key)){H+=1}E[E.length]="<thead>";E[E.length]="<tr>";E[E.length]='<th colspan="'+H+'" class="'+this.Style.CSS_HEADER_TEXT+'">';E[E.length]='<div class="'+this.Style.CSS_HEADER+'">';var J,K=false;if(this.parent){if(this.index===0){J=true}if(this.index==(this.parent.cfg.getProperty("pages")-1)){K=true}}else{J=true;K=true}var B=this.parent||this;if(J){var A=this.cfg.getProperty(L.NAV_ARROW_LEFT.key);if(A===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){A=YAHOO.widget.Calendar.IMG_ROOT+F}var C=(A===null)?"":' style="background-image:url('+A+')"';E[E.length]='<a class="'+this.Style.CSS_NAV_LEFT+'"'+C+" >&#160;</a>"}E[E.length]=this.buildMonthLabel();if(K){var D=this.cfg.getProperty(L.NAV_ARROW_RIGHT.key);if(D===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){D=YAHOO.widget.Calendar.IMG_ROOT+G}var I=(D===null)?"":' style="background-image:url('+D+')"';E[E.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+I+" >&#160;</a>"}E[E.length]="</div>\n</th>\n</tr>";if(this.cfg.getProperty(L.SHOW_WEEKDAYS.key)){E=this.buildWeekdays(E)}E[E.length]="</thead>";return E};YAHOO.widget.Calendar.prototype.buildWeekdays=function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;C[C.length]='<tr class="'+this.Style.CSS_WEEKDAY_ROW+'">';if(this.cfg.getProperty(A.SHOW_WEEK_HEADER.key)){C[C.length]="<th>&#160;</th>"}for(var B=0;B<this.Locale.LOCALE_WEEKDAYS.length;++B){C[C.length]='<th class="calweekdaycell">'+this.Locale.LOCALE_WEEKDAYS[B]+"</th>"}if(this.cfg.getProperty(A.SHOW_WEEK_FOOTER.key)){C[C.length]="<th>&#160;</th>"}C[C.length]="</tr>";return C};YAHOO.widget.Calendar.prototype.renderBody=function(c,a){var n=YAHOO.widget.Calendar._DEFAULT_CONFIG;var AD=this.cfg.getProperty(n.START_WEEKDAY.key);this.preMonthDays=c.getDay();if(AD>0){this.preMonthDays-=AD}if(this.preMonthDays<0){this.preMonthDays+=7}this.monthDays=YAHOO.widget.DateMath.findMonthEnd(c).getDate();this.postMonthDays=YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;c=YAHOO.widget.DateMath.subtract(c,YAHOO.widget.DateMath.DAY,this.preMonthDays);var Q,H;var G="w";var W="_cell";var U="wd";var l="d";var I;var h;var O=this.today.getFullYear();var k=this.today.getMonth();var D=this.today.getDate();var t=this.cfg.getProperty(n.PAGEDATE.key);var C=this.cfg.getProperty(n.HIDE_BLANK_WEEKS.key);var Z=this.cfg.getProperty(n.SHOW_WEEK_FOOTER.key);var T=this.cfg.getProperty(n.SHOW_WEEK_HEADER.key);var M=this.cfg.getProperty(n.MINDATE.key);var S=this.cfg.getProperty(n.MAXDATE.key);if(M){M=YAHOO.widget.DateMath.clearTime(M)}if(S){S=YAHOO.widget.DateMath.clearTime(S)}a[a.length]='<tbody class="m'+(t.getMonth()+1)+" "+this.Style.CSS_BODY+'">';var AB=0;var J=document.createElement("div");var b=document.createElement("td");J.appendChild(b);var AA=new Date(t.getFullYear(),0,1);var q=this.parent||this;for(var v=0;v<6;v++){Q=YAHOO.widget.DateMath.getWeekNumber(c,t.getFullYear(),AD);H=G+Q;if(v!==0&&C===true&&c.getMonth()!=t.getMonth()){break}else{a[a.length]='<tr class="'+H+'">';if(T){a=this.renderRowHeader(Q,a)}for(var AC=0;AC<7;AC++){I=[];h=null;this.clearElement(b);b.className=this.Style.CSS_CELL;b.id=this.id+W+AB;if(c.getDate()==D&&c.getMonth()==k&&c.getFullYear()==O){I[I.length]=q.renderCellStyleToday}var R=[c.getFullYear(),c.getMonth()+1,c.getDate()];this.cellDates[this.cellDates.length]=R;if(c.getMonth()!=t.getMonth()){I[I.length]=q.renderCellNotThisMonth}else{YAHOO.util.Dom.addClass(b,U+c.getDay());YAHOO.util.Dom.addClass(b,l+c.getDate());for(var u=0;u<this.renderStack.length;++u){var m=this.renderStack[u];var AE=m[0];var B;var V;var F;switch(AE){case YAHOO.widget.Calendar.DATE:B=m[1][1];V=m[1][2];F=m[1][0];if(c.getMonth()+1==B&&c.getDate()==V&&c.getFullYear()==F){h=m[2];this.renderStack.splice(u,1)}break;case YAHOO.widget.Calendar.MONTH_DAY:B=m[1][0];V=m[1][1];if(c.getMonth()+1==B&&c.getDate()==V){h=m[2];this.renderStack.splice(u,1)}break;case YAHOO.widget.Calendar.RANGE:var Y=m[1][0];var X=m[1][1];var e=Y[1];var L=Y[2];var P=Y[0];var z=new Date(P,e-1,L);var E=X[1];var g=X[2];var A=X[0];var y=new Date(A,E-1,g);if(c.getTime()>=z.getTime()&&c.getTime()<=y.getTime()){h=m[2];if(c.getTime()==y.getTime()){this.renderStack.splice(u,1)}}break;case YAHOO.widget.Calendar.WEEKDAY:var K=m[1][0];if(c.getDay()+1==K){h=m[2]}break;case YAHOO.widget.Calendar.MONTH:B=m[1][0];if(c.getMonth()+1==B){h=m[2]}break}if(h){I[I.length]=h}}}if(this._indexOfSelectedFieldArray(R)>-1){I[I.length]=q.renderCellStyleSelected}if((M&&(c.getTime()<M.getTime()))||(S&&(c.getTime()>S.getTime()))){I[I.length]=q.renderOutOfBoundsDate}else{I[I.length]=q.styleCellDefault;I[I.length]=q.renderCellDefault}for(var o=0;o<I.length;++o){if(I[o].call(q,c,b)==YAHOO.widget.Calendar.STOP_RENDER){break}}c.setTime(c.getTime()+YAHOO.widget.DateMath.ONE_DAY_MS);if(AB>=0&&AB<=6){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_TOP)}if((AB%7)===0){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_LEFT)}if(((AB+1)%7)===0){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_RIGHT)}var f=this.postMonthDays;if(C&&f>=7){var N=Math.floor(f/7);for(var w=0;w<N;++w){f-=7}}if(AB>=((this.preMonthDays+f+this.monthDays)-7)){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_BOTTOM)}a[a.length]=J.innerHTML;AB++}if(Z){a=this.renderRowFooter(Q,a)}a[a.length]="</tr>"}}a[a.length]="</tbody>";return a};YAHOO.widget.Calendar.prototype.renderFooter=function(A){return A};YAHOO.widget.Calendar.prototype.render=function(){this.beforeRenderEvent.fire();var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var C=YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(A.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;YAHOO.util.Event.purgeElement(this.oDomContainer,true);var B=[];B[B.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALENDAR+" y"+C.getFullYear()+'" id="'+this.id+'">';B=this.renderHeader(B);B=this.renderBody(C,B);B=this.renderFooter(B);B[B.length]="</table>";this.oDomContainer.innerHTML=B.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElementsByTagName("td");this.cfg.refireEvent(A.TITLE.key);this.cfg.refireEvent(A.CLOSE.key);this.cfg.refireEvent(A.IFRAME.key);this.renderEvent.fire()};YAHOO.widget.Calendar.prototype.applyListeners=function(){var M=this.oDomContainer;var B=this.parent||this;var I="a";var E="mousedown";var J=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT,I,M);var C=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT,I,M);var D=M.getElementsByTagName("a");if(J&&J.length>0){for(var H=0,G=D.length;H<G;H++){if(D[H].className==this.Style.CSS_NAV_LEFT){this.linkLeft=D[H]}}YAHOO.util.Event.addListener(this.linkLeft,E,B.previousMonth,B,true)}if(C&&C.length>0){for(var H=0,G=D.length;H<G;H++){if(D[H].className==this.Style.CSS_NAV_RIGHT){this.linkRight=D[H]}}YAHOO.util.Event.addListener(this.linkRight,E,B.nextMonth,B,true)}if(this.domEventMap){var F,A;for(var O in this.domEventMap){if(YAHOO.lang.hasOwnProperty(this.domEventMap,O)){var K=this.domEventMap[O];if(!(K instanceof Array)){K=[K]}for(var H=0;H<K.length;H++){var N=K[H];A=YAHOO.util.Dom.getElementsByClassName(O,N.tag,this.oDomContainer);for(var L=0;L<A.length;L++){F=A[L];YAHOO.util.Event.addListener(F,N.event,N.handler,N.scope,N.correct)}}}}}YAHOO.util.Event.addListener(this.oDomContainer,"click",this.doSelectCell,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this)};YAHOO.widget.Calendar.prototype.getDateByCellId=function(B){var A=this.getDateFieldsByCellId(B);return new Date(A[0],A[1]-1,A[2])};YAHOO.widget.Calendar.prototype.getDateFieldsByCellId=function(A){A=A.toLowerCase().split("_cell")[1];A=parseInt(A,10);return this.cellDates[A]};YAHOO.widget.Calendar.prototype.renderOutOfBoundsDate=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOB);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER};YAHOO.widget.Calendar.prototype.renderRowHeader=function(B,A){A[A.length]='<th class="calrowhead">'+B+"</th>";return A};YAHOO.widget.Calendar.prototype.renderRowFooter=function(B,A){A[A.length]='<th class="calrowfoot">'+B+"</th>";return A};YAHOO.widget.Calendar.prototype.renderCellDefault=function(B,A){A.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(B)+"</a>"};YAHOO.widget.Calendar.prototype.styleCellDefault=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTABLE)};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT1)};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT2)};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT3)};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT4)};YAHOO.widget.Calendar.prototype.renderCellStyleToday=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_TODAY)};YAHOO.widget.Calendar.prototype.renderCellStyleSelected=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTED)};YAHOO.widget.Calendar.prototype.renderCellNotThisMonth=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOM);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER};YAHOO.widget.Calendar.prototype.renderBodyCellRestricted=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL);YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_RESTRICTED);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER};YAHOO.widget.Calendar.prototype.addMonths=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.subtractMonths=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.addYears=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.subtractYears=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.nextMonth=function(){this.addMonths(1)};YAHOO.widget.Calendar.prototype.previousMonth=function(){this.subtractMonths(1)};YAHOO.widget.Calendar.prototype.nextYear=function(){this.addYears(1)};YAHOO.widget.Calendar.prototype.previousYear=function(){this.subtractYears(1)};YAHOO.widget.Calendar.prototype.reset=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.resetProperty(A.SELECTED.key);this.cfg.resetProperty(A.PAGEDATE.key);this.resetEvent.fire()};YAHOO.widget.Calendar.prototype.clear=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.setProperty(A.SELECTED.key,[]);this.cfg.setProperty(A.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire()};YAHOO.widget.Calendar.prototype.select=function(C){var F=this._toFieldArray(C);var B=[];var E=[];var G=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var A=0;A<F.length;++A){var D=F[A];if(!this.isDateOOB(this._toDate(D))){if(B.length===0){this.beforeSelectEvent.fire();E=this.cfg.getProperty(G)}B.push(D);if(this._indexOfSelectedFieldArray(D)==-1){E[E.length]=D}}}if(B.length>0){if(this.parent){this.parent.cfg.setProperty(G,E)}else{this.cfg.setProperty(G,E)}this.selectEvent.fire(B)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype.selectCell=function(D){var B=this.cells[D];var H=this.cellDates[D];var G=this._toDate(H);var C=YAHOO.util.Dom.hasClass(B,this.Style.CSS_CELL_SELECTABLE);if(C){this.beforeSelectEvent.fire();var F=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var E=this.cfg.getProperty(F);var A=H.concat();if(this._indexOfSelectedFieldArray(A)==-1){E[E.length]=A}if(this.parent){this.parent.cfg.setProperty(F,E)}else{this.cfg.setProperty(F,E)}this.renderCellStyleSelected(G,B);this.selectEvent.fire([A]);this.doCellMouseOut.call(B,null,this)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype.deselect=function(E){var A=this._toFieldArray(E);var D=[];var G=[];var H=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var B=0;B<A.length;++B){var F=A[B];if(!this.isDateOOB(this._toDate(F))){if(D.length===0){this.beforeDeselectEvent.fire();G=this.cfg.getProperty(H)}D.push(F);var C=this._indexOfSelectedFieldArray(F);if(C!=-1){G.splice(C,1)}}}if(D.length>0){if(this.parent){this.parent.cfg.setProperty(H,G)}else{this.cfg.setProperty(H,G)}this.deselectEvent.fire(D)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype.deselectCell=function(E){var H=this.cells[E];var B=this.cellDates[E];var F=this._indexOfSelectedFieldArray(B);var G=YAHOO.util.Dom.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(G){this.beforeDeselectEvent.fire();var I=YAHOO.widget.Calendar._DEFAULT_CONFIG;var D=this.cfg.getProperty(I.SELECTED.key);var C=this._toDate(B);var A=B.concat();if(F>-1){if(this.cfg.getProperty(I.PAGEDATE.key).getMonth()==C.getMonth()&&this.cfg.getProperty(I.PAGEDATE.key).getFullYear()==C.getFullYear()){YAHOO.util.Dom.removeClass(H,this.Style.CSS_CELL_SELECTED)}D.splice(F,1)}if(this.parent){this.parent.cfg.setProperty(I.SELECTED.key,D)}else{this.cfg.setProperty(I.SELECTED.key,D)}this.deselectEvent.fire(A)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype.deselectAll=function(){this.beforeDeselectEvent.fire();var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var A=this.cfg.getProperty(D);var B=A.length;var C=A.concat();if(this.parent){this.parent.cfg.setProperty(D,[])}else{this.cfg.setProperty(D,[])}if(B>0){this.deselectEvent.fire(C)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype._toFieldArray=function(B){var A=[];if(B instanceof Date){A=[[B.getFullYear(),B.getMonth()+1,B.getDate()]]}else{if(YAHOO.lang.isString(B)){A=this._parseDates(B)}else{if(YAHOO.lang.isArray(B)){for(var C=0;C<B.length;++C){var D=B[C];A[A.length]=[D.getFullYear(),D.getMonth()+1,D.getDate()]}}}}return A};YAHOO.widget.Calendar.prototype._toDate=function(A){if(A instanceof Date){return A}else{return new Date(A[0],A[1]-1,A[2])}};YAHOO.widget.Calendar.prototype._fieldArraysAreEqual=function(C,B){var A=false;if(C[0]==B[0]&&C[1]==B[1]&&C[2]==B[2]){A=true}return A};YAHOO.widget.Calendar.prototype._indexOfSelectedFieldArray=function(E){var D=-1;var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var C=0;C<A.length;++C){var B=A[C];if(E[0]==B[0]&&E[1]==B[1]&&E[2]==B[2]){D=C;break}}return D};YAHOO.widget.Calendar.prototype.isDateOOM=function(A){return(A.getMonth()!=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth())};YAHOO.widget.Calendar.prototype.isDateOOB=function(D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var E=this.cfg.getProperty(A.MINDATE.key);var F=this.cfg.getProperty(A.MAXDATE.key);var C=YAHOO.widget.DateMath;if(E){E=C.clearTime(E)}if(F){F=C.clearTime(F)}var B=new Date(D.getTime());B=C.clearTime(B);return((E&&B.getTime()<E.getTime())||(F&&B.getTime()>F.getTime()))};YAHOO.widget.Calendar.prototype._parsePageDate=function(B){var E;var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(B){if(B instanceof Date){E=YAHOO.widget.DateMath.findMonthStart(B)}else{var F,D,C;C=B.split(this.cfg.getProperty(A.DATE_FIELD_DELIMITER.key));F=parseInt(C[this.cfg.getProperty(A.MY_MONTH_POSITION.key)-1],10)-1;D=parseInt(C[this.cfg.getProperty(A.MY_YEAR_POSITION.key)-1],10);E=new Date(D,F,1)}}else{E=new Date(this.today.getFullYear(),this.today.getMonth(),1)}return E};YAHOO.widget.Calendar.prototype.onBeforeSelect=function(){if(this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll()}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll()}}};YAHOO.widget.Calendar.prototype.onSelect=function(A){};YAHOO.widget.Calendar.prototype.onBeforeDeselect=function(){};YAHOO.widget.Calendar.prototype.onDeselect=function(A){};YAHOO.widget.Calendar.prototype.onChangePage=function(){this.render()};YAHOO.widget.Calendar.prototype.onRender=function(){};YAHOO.widget.Calendar.prototype.onReset=function(){this.render()};YAHOO.widget.Calendar.prototype.onClear=function(){this.render()};YAHOO.widget.Calendar.prototype.validate=function(){return true};YAHOO.widget.Calendar.prototype._parseDate=function(C){var D=C.split(this.Locale.DATE_FIELD_DELIMITER);var A;if(D.length==2){A=[D[this.Locale.MD_MONTH_POSITION-1],D[this.Locale.MD_DAY_POSITION-1]];A.type=YAHOO.widget.Calendar.MONTH_DAY}else{A=[D[this.Locale.MDY_YEAR_POSITION-1],D[this.Locale.MDY_MONTH_POSITION-1],D[this.Locale.MDY_DAY_POSITION-1]];A.type=YAHOO.widget.Calendar.DATE}for(var B=0;B<A.length;B++){A[B]=parseInt(A[B],10)}return A};YAHOO.widget.Calendar.prototype._parseDates=function(B){var I=[];var H=B.split(this.Locale.DATE_DELIMITER);for(var G=0;G<H.length;++G){var F=H[G];if(F.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var A=F.split(this.Locale.DATE_RANGE_DELIMITER);var E=this._parseDate(A[0]);var J=this._parseDate(A[1]);var D=this._parseRange(E,J);I=I.concat(D)}else{var C=this._parseDate(F);I.push(C)}}return I};YAHOO.widget.Calendar.prototype._parseRange=function(A,F){var E=new Date(A[0],A[1]-1,A[2]);var B=YAHOO.widget.DateMath.add(new Date(A[0],A[1]-1,A[2]),YAHOO.widget.DateMath.DAY,1);var D=new Date(F[0],F[1]-1,F[2]);var C=[];C.push(A);while(B.getTime()<=D.getTime()){C.push([B.getFullYear(),B.getMonth()+1,B.getDate()]);B=YAHOO.widget.DateMath.add(B,YAHOO.widget.DateMath.DAY,1)}return C};YAHOO.widget.Calendar.prototype.resetRenderers=function(){this.renderStack=this._renderStack.concat()};YAHOO.widget.Calendar.prototype.clearElement=function(A){A.innerHTML="&#160;";A.className=""};YAHOO.widget.Calendar.prototype.addRenderer=function(A,B){var D=this._parseDates(A);for(var C=0;C<D.length;++C){var E=D[C];if(E.length==2){if(E[0] instanceof Array){this._addRenderer(YAHOO.widget.Calendar.RANGE,E,B)}else{this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,E,B)}}else{if(E.length==3){this._addRenderer(YAHOO.widget.Calendar.DATE,E,B)}}}};YAHOO.widget.Calendar.prototype._addRenderer=function(B,C,A){var D=[B,C,A];this.renderStack.unshift(D);this._renderStack=this.renderStack.concat()};YAHOO.widget.Calendar.prototype.addMonthRenderer=function(B,A){this._addRenderer(YAHOO.widget.Calendar.MONTH,[B],A)};YAHOO.widget.Calendar.prototype.addWeekdayRenderer=function(B,A){this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[B],A)};YAHOO.widget.Calendar.prototype.clearAllBodyCellStyles=function(A){for(var B=0;B<this.cells.length;++B){YAHOO.util.Dom.removeClass(this.cells[B],A)}};YAHOO.widget.Calendar.prototype.setMonth=function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var B=this.cfg.getProperty(A);B.setMonth(parseInt(C,10));this.cfg.setProperty(A,B)};YAHOO.widget.Calendar.prototype.setYear=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var C=this.cfg.getProperty(A);C.setFullYear(parseInt(B,10));this.cfg.setProperty(A,C)};YAHOO.widget.Calendar.prototype.getSelectedDates=function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=new Date(D[0],D[1]-1,D[2]);C.push(A)}C.sort(function(G,F){return G-F});return C};YAHOO.widget.Calendar.prototype.hide=function(){this.oDomContainer.style.display="none"};YAHOO.widget.Calendar.prototype.show=function(){this.oDomContainer.style.display="block"};YAHOO.widget.Calendar.prototype.browser=function(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("opera")!=-1){return"opera"}else{if(A.indexOf("msie 7")!=-1){return"ie7"}else{if(A.indexOf("msie")!=-1){return"ie"}else{if(A.indexOf("safari")!=-1){return"safari"}else{if(A.indexOf("gecko")!=-1){return"gecko"}else{return false}}}}}}();YAHOO.widget.Calendar.prototype.toString=function(){return"Calendar "+this.id};YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar;YAHOO.widget.CalendarGroup=function(C,A,B){if(arguments.length>0){this.init(C,A,B)}};YAHOO.widget.CalendarGroup.prototype.init=function(C,A,B){this.initEvents();this.initStyles();this.pages=[];this.id=C;this.containerId=A;this.oDomContainer=document.getElementById(A);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(B){this.cfg.applyConfig(B,true)}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true)}};YAHOO.widget.CalendarGroup.prototype.setupConfig=function(){var A=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGES.key,{value:A.PAGES.value,validator:this.cfg.checkNumber,handler:this.configPages});this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.delegateConfig});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig})};YAHOO.widget.CalendarGroup.prototype.initEvents=function(){var C=this;var E="Event";var B=function(G,J,F){for(var I=0;I<C.pages.length;++I){var H=C.pages[I];H[this.type+E].subscribe(G,J,F)}};var A=function(F,I){for(var H=0;H<C.pages.length;++H){var G=C.pages[H];G[this.type+E].unsubscribe(F,I)}};var D=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(D.BEFORE_SELECT);this.beforeSelectEvent.subscribe=B;this.beforeSelectEvent.unsubscribe=A;this.selectEvent=new YAHOO.util.CustomEvent(D.SELECT);this.selectEvent.subscribe=B;this.selectEvent.unsubscribe=A;this.beforeDeselectEvent=new YAHOO.util.CustomEvent(D.BEFORE_DESELECT);this.beforeDeselectEvent.subscribe=B;this.beforeDeselectEvent.unsubscribe=A;this.deselectEvent=new YAHOO.util.CustomEvent(D.DESELECT);this.deselectEvent.subscribe=B;this.deselectEvent.unsubscribe=A;this.changePageEvent=new YAHOO.util.CustomEvent(D.CHANGE_PAGE);this.changePageEvent.subscribe=B;this.changePageEvent.unsubscribe=A;this.beforeRenderEvent=new YAHOO.util.CustomEvent(D.BEFORE_RENDER);this.beforeRenderEvent.subscribe=B;this.beforeRenderEvent.unsubscribe=A;this.renderEvent=new YAHOO.util.CustomEvent(D.RENDER);this.renderEvent.subscribe=B;this.renderEvent.unsubscribe=A;this.resetEvent=new YAHOO.util.CustomEvent(D.RESET);this.resetEvent.subscribe=B;this.resetEvent.unsubscribe=A;this.clearEvent=new YAHOO.util.CustomEvent(D.CLEAR);this.clearEvent.subscribe=B;this.clearEvent.unsubscribe=A};YAHOO.widget.CalendarGroup.prototype.configPages=function(K,J,G){var E=J[0];var C=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;var O="_";var L="groupcal";var N="first-of-type";var D="last-of-type";for(var B=0;B<E;++B){var M=this.id+O+B;var I=this.containerId+O+B;var H=this.cfg.getConfig();H.close=false;H.title=false;var A=this.constructChild(M,I,H);var F=A.cfg.getProperty(C);this._setMonthOnDate(F,F.getMonth()+B);A.cfg.setProperty(C,F);YAHOO.util.Dom.removeClass(A.oDomContainer,this.Style.CSS_SINGLE);YAHOO.util.Dom.addClass(A.oDomContainer,L);if(B===0){YAHOO.util.Dom.addClass(A.oDomContainer,N)}if(B==(E-1)){YAHOO.util.Dom.addClass(A.oDomContainer,D)}A.parent=this;A.index=B;this.pages[this.pages.length]=A}};YAHOO.widget.CalendarGroup.prototype.configPageDate=function(H,G,E){var C=G[0];var F;var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var B=0;B<this.pages.length;++B){var A=this.pages[B];if(B===0){F=A._parsePageDate(C);A.cfg.setProperty(D,F)}else{var I=new Date(F);this._setMonthOnDate(I,I.getMonth()+B);A.cfg.setProperty(D,I)}}};YAHOO.widget.CalendarGroup.prototype.configSelected=function(C,A,E){var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;this.delegateConfig(C,A,E);var B=(this.pages.length>0)?this.pages[0].cfg.getProperty(D):[];this.cfg.setProperty(D,B,true)};YAHOO.widget.CalendarGroup.prototype.delegateConfig=function(B,A,E){var F=A[0];var D;for(var C=0;C<this.pages.length;C++){D=this.pages[C];D.cfg.setProperty(B,F)}};YAHOO.widget.CalendarGroup.prototype.setChildFunction=function(D,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var C=0;C<A;++C){this.pages[C][D]=B}};YAHOO.widget.CalendarGroup.prototype.callChildFunction=function(F,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var E=0;E<A;++E){var D=this.pages[E];if(D[F]){var C=D[F];C.call(D,B)}}};YAHOO.widget.CalendarGroup.prototype.constructChild=function(D,B,C){var A=document.getElementById(B);if(!A){A=document.createElement("div");A.id=B;this.oDomContainer.appendChild(A)}return new YAHOO.widget.Calendar(D,B,C)};YAHOO.widget.CalendarGroup.prototype.setMonth=function(E){E=parseInt(E,10);var F;var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var D=0;D<this.pages.length;++D){var C=this.pages[D];var A=C.cfg.getProperty(B);if(D===0){F=A.getFullYear()}else{A.setYear(F)}this._setMonthOnDate(A,E+D);C.cfg.setProperty(B,A)}};YAHOO.widget.CalendarGroup.prototype.setYear=function(C){var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;C=parseInt(C,10);for(var E=0;E<this.pages.length;++E){var D=this.pages[E];var A=D.cfg.getProperty(B);if((A.getMonth()+1)==1&&E>0){C+=1}D.setYear(C)}};YAHOO.widget.CalendarGroup.prototype.render=function(){this.renderHeader();for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.render()}this.renderFooter()};YAHOO.widget.CalendarGroup.prototype.select=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.select(A)}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.selectCell=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.selectCell(A)}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.deselect=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselect(A)}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.deselectAll=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.deselectAll()}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.deselectCell=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselectCell(A)}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.reset=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.reset()}};YAHOO.widget.CalendarGroup.prototype.clear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.clear()}};YAHOO.widget.CalendarGroup.prototype.nextMonth=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextMonth()}};YAHOO.widget.CalendarGroup.prototype.previousMonth=function(){for(var B=this.pages.length-1;B>=0;--B){var A=this.pages[B];A.previousMonth()}};YAHOO.widget.CalendarGroup.prototype.nextYear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextYear()}};YAHOO.widget.CalendarGroup.prototype.previousYear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.previousYear()}};YAHOO.widget.CalendarGroup.prototype.getSelectedDates=function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=new Date(D[0],D[1]-1,D[2]);C.push(A)}C.sort(function(G,F){return G-F});return C};YAHOO.widget.CalendarGroup.prototype.addRenderer=function(A,B){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addRenderer(A,B)}};YAHOO.widget.CalendarGroup.prototype.addMonthRenderer=function(D,A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.addMonthRenderer(D,A)}};YAHOO.widget.CalendarGroup.prototype.addWeekdayRenderer=function(B,A){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addWeekdayRenderer(B,A)}};YAHOO.widget.CalendarGroup.prototype.renderHeader=function(){};YAHOO.widget.CalendarGroup.prototype.renderFooter=function(){};YAHOO.widget.CalendarGroup.prototype.addMonths=function(A){this.callChildFunction("addMonths",A)};YAHOO.widget.CalendarGroup.prototype.subtractMonths=function(A){this.callChildFunction("subtractMonths",A)};YAHOO.widget.CalendarGroup.prototype.addYears=function(A){this.callChildFunction("addYears",A)};YAHOO.widget.CalendarGroup.prototype.subtractYears=function(A){this.callChildFunction("subtractYears",A)};YAHOO.widget.CalendarGroup.prototype.show=function(){this.oDomContainer.style.display="block";if(YAHOO.env.ua.opera){this._fixWidth()}};YAHOO.widget.CalendarGroup.prototype._setMonthOnDate=function(C,D){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(D<0||D>11)){var B=YAHOO.widget.DateMath;var A=B.add(C,B.MONTH,D-C.getMonth());C.setTime(A.getTime())}else{C.setMonth(D)}};YAHOO.widget.CalendarGroup.prototype._fixWidth=function(){var B=this.oDomContainer.offsetWidth;var A=0;for(var D=0;D<this.pages.length;++D){var C=this.pages[D];A+=C.oDomContainer.offsetWidth}if(A>0){this.oDomContainer.style.width=A+"px"}};YAHOO.widget.CalendarGroup.CSS_CONTAINER="yui-calcontainer";YAHOO.widget.CalendarGroup.CSS_MULTI_UP="multi";YAHOO.widget.CalendarGroup.CSS_2UPTITLE="title";YAHOO.widget.CalendarGroup.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(YAHOO.widget.CalendarGroup,YAHOO.widget.Calendar,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyleSelected","renderCellNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hide","browser");YAHOO.widget.CalendarGroup._DEFAULT_CONFIG=YAHOO.widget.Calendar._DEFAULT_CONFIG;YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES={key:"pages",value:2};YAHOO.widget.CalendarGroup.prototype.toString=function(){return"CalendarGroup "+this.id};YAHOO.widget.CalGrp=YAHOO.widget.CalendarGroup;YAHOO.widget.Calendar2up=function(C,A,B){this.init(C,A,B)};YAHOO.extend(YAHOO.widget.Calendar2up,YAHOO.widget.CalendarGroup);YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up;YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.3.1",build:"541"});YAHOO.namespace("extension");YAHOO.extension.Carousel=function(B,A){this.init(B,A)};YAHOO.extension.Carousel.prototype={UNBOUNDED_SIZE:1000000,init:function(N,J){var I=this;this.getCarouselItem=this.getItem;var B="carousel-list";var C="carousel-clip-region";var F="carousel-next";var E="carousel-prev";this._carouselElemID=N;this.carouselElem=YAHOO.util.Dom.get(N);this._prevEnabled=true;this._nextEnabled=true;this.cfg=new YAHOO.util.Config(this);this.cfg.addProperty("scrollBeforeAmount",{value:0,handler:function(P,O,Q){},validator:I.cfg.checkNumber});this.cfg.addProperty("scrollAfterAmount",{value:0,handler:function(P,O,Q){},validator:I.cfg.checkNumber});this.cfg.addProperty("loadOnStart",{value:true,handler:function(P,O,Q){},validator:I.cfg.checkBoolean});this.cfg.addProperty("orientation",{value:"horizontal",handler:function(P,O,Q){I.reload()},validator:function(O){if(typeof O=="string"){return("horizontal,vertical".indexOf(O.toLowerCase())!=-1)}else{return false}}});this.cfg.addProperty("size",{value:this.UNBOUNDED_SIZE,handler:function(P,O,Q){I.reload()},validator:I.cfg.checkNumber});this.cfg.addProperty("numVisible",{value:3,handler:function(P,O,Q){I.reload()},validator:I.cfg.checkNumber});this.cfg.addProperty("firstVisible",{value:1,handler:function(P,O,Q){I.moveTo(O[0])},validator:I.cfg.checkNumber});this.cfg.addProperty("scrollInc",{value:3,handler:function(P,O,Q){},validator:I.cfg.checkNumber});this.cfg.addProperty("animationSpeed",{value:0.25,handler:function(P,O,Q){I.animationSpeed=O[0]},validator:I.cfg.checkNumber});this.cfg.addProperty("animationMethod",{value:YAHOO.util.Easing.easeOut,handler:function(P,O,Q){}});this.cfg.addProperty("animationCompleteHandler",{value:null,handler:function(P,O,Q){if(I._animationCompleteEvt){I._animationCompleteEvt.unsubscribe(I._currAnimationCompleteHandler,I)}I._currAnimationCompleteHandler=O[0];if(I._currAnimationCompleteHandler){if(!I._animationCompleteEvt){I._animationCompleteEvt=new YAHOO.util.CustomEvent("onAnimationComplete",I)}I._animationCompleteEvt.subscribe(I._currAnimationCompleteHandler,I)}}});this.cfg.addProperty("autoPlay",{value:0,handler:function(Q,O,R){var P=O[0];if(P>0){I.startAutoPlay()}else{I.stopAutoPlay()}}});this.cfg.addProperty("wrap",{value:false,handler:function(P,O,Q){},validator:I.cfg.checkBoolean});this.cfg.addProperty("navMargin",{value:0,handler:function(P,O,Q){I.calculateSize()},validator:I.cfg.checkNumber});this.cfg.addProperty("revealAmount",{value:0,handler:function(P,O,Q){I.reload()},validator:I.cfg.checkNumber});this.cfg.addProperty("prevElementID",{value:null,handler:function(P,O,Q){if(I._carouselPrev){YAHOO.util.Event.removeListener(I._carouselPrev,"click",I._scrollPrev)}I._prevElementID=O[0];if(I._prevElementID==null){I._carouselPrev=YAHOO.util.Dom.getElementsByClassName(E,"div",I.carouselElem)[0]}else{I._carouselPrev=YAHOO.util.Dom.get(I._prevElementID)}YAHOO.util.Event.addListener(I._carouselPrev,"click",I._scrollPrev,I)}});this.cfg.addProperty("prevElement",{value:null,handler:function(P,O,Q){if(I._carouselPrev){YAHOO.util.Event.removeListener(I._carouselPrev,"click",I._scrollPrev)}I._prevElementID=O[0];if(I._prevElementID==null){I._carouselPrev=YAHOO.util.Dom.getElementsByClassName(E,"div",I.carouselElem)[0]}else{I._carouselPrev=YAHOO.util.Dom.get(I._prevElementID)}YAHOO.util.Event.addListener(I._carouselPrev,"click",I._scrollPrev,I)}});this.cfg.addProperty("nextElementID",{value:null,handler:function(P,O,Q){if(I._carouselNext){YAHOO.util.Event.removeListener(I._carouselNext,"click",I._scrollNext)}I._nextElementID=O[0];if(I._nextElementID==null){I._carouselNext=YAHOO.util.Dom.getElementsByClassName(F,"div",I.carouselElem)}else{I._carouselNext=YAHOO.util.Dom.get(I._nextElementID)}if(I._carouselNext){YAHOO.util.Event.addListener(I._carouselNext,"click",I._scrollNext,I)}}});this.cfg.addProperty("nextElement",{value:null,handler:function(P,O,Q){if(I._carouselNext){YAHOO.util.Event.removeListener(I._carouselNext,"click",I._scrollNext)}I._nextElementID=O[0];if(I._nextElementID==null){I._carouselNext=YAHOO.util.Dom.getElementsByClassName(F,"div",I.carouselElem)}else{I._carouselNext=YAHOO.util.Dom.get(I._nextElementID)}if(I._carouselNext){YAHOO.util.Event.addListener(I._carouselNext,"click",I._scrollNext,I)}}});this.cfg.addProperty("disableSelection",{value:true,handler:function(P,O,Q){},validator:I.cfg.checkBoolean});this.cfg.addProperty("loadInitHandler",{value:null,handler:function(P,O,Q){if(I._loadInitHandlerEvt){I._loadInitHandlerEvt.unsubscribe(I._currLoadInitHandler,I)}I._currLoadInitHandler=O[0];if(I._currLoadInitHandler){if(!I._loadInitHandlerEvt){I._loadInitHandlerEvt=new YAHOO.util.CustomEvent("onLoadInit",I)}I._loadInitHandlerEvt.subscribe(I._currLoadInitHandler,I)}}});this.cfg.addProperty("loadNextHandler",{value:null,handler:function(P,O,Q){if(I._loadNextHandlerEvt){I._loadNextHandlerEvt.unsubscribe(I._currLoadNextHandler,I)}I._currLoadNextHandler=O[0];if(I._currLoadNextHandler){if(!I._loadNextHandlerEvt){I._loadNextHandlerEvt=new YAHOO.util.CustomEvent("onLoadNext",I)}I._loadNextHandlerEvt.subscribe(I._currLoadNextHandler,I)}}});this.cfg.addProperty("loadPrevHandler",{value:null,handler:function(P,O,Q){if(I._loadPrevHandlerEvt){I._loadPrevHandlerEvt.unsubscribe(I._currLoadPrevHandler,I)}I._currLoadPrevHandler=O[0];if(I._currLoadPrevHandler){if(!I._loadPrevHandlerEvt){I._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",I)}I._loadPrevHandlerEvt.subscribe(I._currLoadPrevHandler,I)}}});this.cfg.addProperty("prevButtonStateHandler",{value:null,handler:function(P,O,Q){if(I._currPrevButtonStateHandler){I._prevButtonStateHandlerEvt.unsubscribe(I._currPrevButtonStateHandler,I)}I._currPrevButtonStateHandler=O[0];if(I._currPrevButtonStateHandler){if(!I._prevButtonStateHandlerEvt){I._prevButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onPrevButtonStateChange",I)}I._prevButtonStateHandlerEvt.subscribe(I._currPrevButtonStateHandler,I)}}});this.cfg.addProperty("nextButtonStateHandler",{value:null,handler:function(P,O,Q){if(I._currNextButtonStateHandler){I._nextButtonStateHandlerEvt.unsubscribe(I._currNextButtonStateHandler,I)}I._currNextButtonStateHandler=O[0];if(I._currNextButtonStateHandler){if(!I._nextButtonStateHandlerEvt){I._nextButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onNextButtonStateChange",I)}I._nextButtonStateHandlerEvt.subscribe(I._currNextButtonStateHandler,I)}}});if(J){this.cfg.applyConfig(J)}YAHOO.util.Event.addListener(this.carouselElem,"mousedown",this._handleMouseDownForSelection,this,true);this._origFirstVisible=this.cfg.getProperty("firstVisible");this._currLoadInitHandler=this.cfg.getProperty("loadInitHandler");this._currLoadNextHandler=this.cfg.getProperty("loadNextHandler");this._currLoadPrevHandler=this.cfg.getProperty("loadPrevHandler");this._currPrevButtonStateHandler=this.cfg.getProperty("prevButtonStateHandler");this._currNextButtonStateHandler=this.cfg.getProperty("nextButtonStateHandler");this._currAnimationCompleteHandler=this.cfg.getProperty("animationCompleteHandler");this._nextElementID=this.cfg.getProperty("nextElementID");if(!this._nextElementID){this._nextElementID=this.cfg.getProperty("nextElement")}this._prevElementID=this.cfg.getProperty("prevElementID");if(!this._prevElementID){this._prevElementID=this.cfg.getProperty("prevElement")}this._autoPlayTimer=null;this._priorLastVisible=this._priorFirstVisible=this.cfg.getProperty("firstVisible");this._lastPrebuiltIdx=0;this.carouselList=YAHOO.util.Dom.getElementsByClassName(B,"ul",this.carouselElem)[0];if(this._nextElementID==null){this._carouselNext=YAHOO.util.Dom.getElementsByClassName(F,"div",this.carouselElem)[0]}else{this._carouselNext=YAHOO.util.Dom.get(this._nextElementID)}if(this._prevElementID==null){this._carouselPrev=YAHOO.util.Dom.getElementsByClassName(E,"div",this.carouselElem)[0]}else{this._carouselPrev=YAHOO.util.Dom.get(this._prevElementID)}this._clipReg=YAHOO.util.Dom.getElementsByClassName(C,"div",this.carouselElem)[0];if(this.isVertical()){YAHOO.util.Dom.addClass(this.carouselList,"carousel-vertical")}this._scrollNextAnim=new YAHOO.util.Motion(this.carouselList,this.scrollNextParams,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));this._scrollPrevAnim=new YAHOO.util.Motion(this.carouselList,this.scrollPrevParams,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this._carouselNext){YAHOO.util.Event.addListener(this._carouselNext,"click",this._scrollNext,this)}if(this._carouselPrev){YAHOO.util.Event.addListener(this._carouselPrev,"click",this._scrollPrev,this)}var H=this.cfg.getProperty("loadInitHandler");if(H){this._loadInitHandlerEvt=new YAHOO.util.CustomEvent("onLoadInit",this);this._loadInitHandlerEvt.subscribe(H,this)}var L=this.cfg.getProperty("loadNextHandler");if(L){this._loadNextHandlerEvt=new YAHOO.util.CustomEvent("onLoadNext",this);this._loadNextHandlerEvt.subscribe(L,this)}var M=this.cfg.getProperty("loadPrevHandler");if(M){this._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",this);this._loadPrevHandlerEvt.subscribe(M,this)}var K=this.cfg.getProperty("animationCompleteHandler");if(K){this._animationCompleteEvt=new YAHOO.util.CustomEvent("onAnimationComplete",this);this._animationCompleteEvt.subscribe(K,this)}var A=this.cfg.getProperty("prevButtonStateHandler");if(A){this._prevButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onPrevButtonStateChange",this);this._prevButtonStateHandlerEvt.subscribe(A,this)}var G=this.cfg.getProperty("nextButtonStateHandler");if(G){this._nextButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onNextButtonStateChange",this);this._nextButtonStateHandlerEvt.subscribe(G,this)}var D=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+D.start,this._calculateSize,this);if(this.cfg.getProperty("loadOnStart")){this._loadInitial()}},_handleMouseDownForSelection:function(A){if(this.cfg.getProperty("disableSelection")){YAHOO.util.Event.preventDefault(A);YAHOO.util.Event.stopPropagation(A)}},clear:function(){var A=this.cfg.getProperty("loadInitHandler");if(A){this._removeChildrenFromNode(this.carouselList);this._lastPrebuiltIdx=0}this.stopAutoPlay();this._priorLastVisible=this._priorFirstVisible=this._origFirstVisible;this.cfg.setProperty("firstVisible",this._origFirstVisible,true);this.moveTo(this._origFirstVisible)},reload:function(B){if(this._isValidObj(B)){this.cfg.setProperty("numVisible",B)}this.clear();var A=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+A.start,this._calculateSize,this);this._loadInitial()},load:function(){var A=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+A.start,this._calculateSize,this);this._loadInitial()},addItem:function(C,B,D){if(C>this.cfg.getProperty("size")){return null}var E=this.getItem(C);if(!this._isValidObj(E)){E=this._createItem(C,B);this.carouselList.appendChild(E)}else{if(this._isValidObj(E.placeholder)){var A=this._createItem(C,B);this.carouselList.replaceChild(A,E);E=A}}if(this._isValidObj(D)){YAHOO.util.Dom.addClass(E,D)}if(this.isVertical()){setTimeout(function(){E.style.display="block"},1)}return E},insertBefore:function(B,D){if(B>=this.cfg.getProperty("size")){return null}if(B<1){B=1}var A=B-1;if(A>this._lastPrebuiltIdx){this._prebuildItems(this._lastPrebuiltIdx,B)}var C=this._insertBeforeItem(B,D);this._enableDisableControls();return C},insertAfter:function(B,D){if(B>this.cfg.getProperty("size")){B=this.cfg.getProperty("size")}var A=B+1;if(A>this._lastPrebuiltIdx){this._prebuildItems(this._lastPrebuiltIdx,A+1)}var C=this._insertAfterItem(B,D);if(A>this.cfg.getProperty("size")){this.cfg.setProperty("size",A,true)}this._enableDisableControls();return C},scrollNext:function(){this._scrollNext(null,this);this._autoPlayTimer=null;if(this.cfg.getProperty("autoPlay")!==0){this._autoPlayTimer=this.startAutoPlay()}},scrollPrev:function(){this._scrollPrev(null,this)},scrollTo:function(A){this._position(A,true)},moveTo:function(A){this._position(A,false)},startAutoPlay:function(A){if(this._isValidObj(A)){this.cfg.setProperty("autoPlay",A,true)}if(this._autoPlayTimer!==null){return this._autoPlayTimer}var C=this;var B=function(){C.scrollNext()};this._autoPlayTimer=setTimeout(B,this.cfg.getProperty("autoPlay"));return this._autoPlayTimer},stopAutoPlay:function(){if(this._autoPlayTimer!==null){clearTimeout(this._autoPlayTimer);this._autoPlayTimer=null}},isVertical:function(){return(this.cfg.getProperty("orientation")!="horizontal")},isItemLoaded:function(A){var B=this.getItem(A);if(this._isValidObj(B)&&!this._isValidObj(B.placeholder)){return true}return false},getItem:function(A){var B=this._carouselElemID+"-item-"+A;var C=YAHOO.util.Dom.get(B);return C},show:function(){YAHOO.util.Dom.setStyle(this.carouselElem,"display","block");this.calculateSize()},hide:function(){YAHOO.util.Dom.setStyle(this.carouselElem,"display","none")},calculateSize:function(){var f=this.carouselList.childNodes;var Q=null;for(var a=0;a<f.length;a++){Q=f[a];if(Q.tagName=="LI"||Q.tagName=="li"){break}}var Z=this.cfg.getProperty("navMargin");var h=this.cfg.getProperty("numVisible");var H=this.cfg.getProperty("firstVisible");var d=this._getStyleVal(Q,"paddingLeft");var W=this._getStyleVal(Q,"paddingRight");var c=this._getStyleVal(Q,"marginLeft");var V=this._getStyleVal(Q,"marginRight");var U=this._getStyleVal(Q,"paddingTop");var C=this._getStyleVal(Q,"paddingBottom");var T=this._getStyleVal(Q,"marginTop");var A=this._getStyleVal(Q,"marginBottom");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-vertical");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-horizontal");if(this.isVertical()){var S=d+W+c+V;YAHOO.util.Dom.addClass(this.carouselList,"carousel-vertical");var F=U+C+T+A;var J=this._getStyleVal(this.carouselList,"paddingTop");var Y=this._getStyleVal(this.carouselList,"paddingBottom");var I=this._getStyleVal(this.carouselList,"marginTop");var X=this._getStyleVal(this.carouselList,"marginBottom");var g=J+Y+I+X;var O=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(F)/2):0;var D=this._getStyleVal(Q,"height",true);this.scrollAmountPerInc=(D+F);var E=this._getStyleVal(Q,"width");this.carouselElem.style.width=(E+S)+"px";this._clipReg.style.height=(this.scrollAmountPerInc*h+O*2+g)+"px";this.carouselElem.style.height=(this.scrollAmountPerInc*h+O*2+Z*2+g)+"px";var b=(this._isExtraRevealed())?(O-(Math.abs(T-A)+Math.abs(U-C))/2):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"top",""+b+"px");var M=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,M-this.scrollAmountPerInc*(H-1))}else{YAHOO.util.Dom.addClass(this.carouselList,"carousel-horizontal");var R=this._getStyleVal(this.carouselList,"paddingLeft");var L=this._getStyleVal(this.carouselList,"paddingRight");var P=this._getStyleVal(this.carouselList,"marginLeft");var K=this._getStyleVal(this.carouselList,"marginRight");var G=R+L+P+K;var e=c+V;var S=e+W+d;var O=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(S)/2):0;var E=Q.offsetWidth;this.scrollAmountPerInc=E+e;this._clipReg.style.width=(this.scrollAmountPerInc*h+O*2)+"px";this.carouselElem.style.width=(this.scrollAmountPerInc*h+Z*2+O*2+G)+"px";var B=(this._isExtraRevealed())?(O-(Math.abs(V-c)+Math.abs(W-d))/2-(P+R)):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"left",""+B+"px");var N=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,N-this.scrollAmountPerInc*(H-1))}},setProperty:function(C,B,A){this.cfg.setProperty(C,B,A)},getProperty:function(A){return this.cfg.getProperty(A)},getFirstItemRevealed:function(){return this._firstItemRevealed},getLastItemRevealed:function(){return this._lastItemRevealed},getFirstVisible:function(){return this.cfg.getProperty("firstVisible")},getLastVisible:function(){var B=this.cfg.getProperty("firstVisible");var A=this.cfg.getProperty("numVisible");return B+A-1},_getStyleVal:function(A,C,D){var B=YAHOO.util.Dom.getStyle(A,C);var E=D?parseFloat(B):parseInt(B,10);if(C=="height"&&isNaN(E)){E=A.offsetHeight}else{if(isNaN(E)){E=0}}return E},_calculateSize:function(A){A.calculateSize();A.show()},_removeChildrenFromNode:function(B){if(!this._isValidObj(B)){return }var A=B.childNodes.length;while(B.hasChildNodes()){B.removeChild(B.firstChild)}},_prebuildLiElem:function(A){if(A<1){return }var B=document.createElement("li");B.id=this._carouselElemID+"-item-"+A;B.placeholder=true;this.carouselList.appendChild(B);this._lastPrebuiltIdx=(A>this._lastPrebuiltIdx)?A:this._lastPrebuiltIdx},_createItem:function(B,A){if(B<1){return }var C=document.createElement("li");C.id=this._carouselElemID+"-item-"+B;if(typeof (A)==="string"){C.innerHTML=A}else{C.appendChild(A)}return C},_insertAfterItem:function(B,A){return this._insertBeforeItem(B+1,A)},_insertBeforeItem:function(G,A){var B=this.getItem(G);var D=this.cfg.getProperty("size");if(D!=this.UNBOUNDED_SIZE){this.cfg.setProperty("size",D+1,true)}for(var C=this._lastPrebuiltIdx;C>=G;C--){var F=this.getItem(C);if(this._isValidObj(F)){F.id=this._carouselElemID+"-item-"+(C+1)}}var H=this._createItem(G,A);var E=this.carouselList.insertBefore(H,B);this._lastPrebuiltIdx+=1;return H},insertAfterEnd:function(A){return this.insertAfter(this.cfg.getProperty("size"),A)},_position:function(A,B){var C=this._priorFirstVisible;if(A>C){var D=A-C;this._scrollNextInc(D,B)}else{var E=C-A;this._scrollPrevInc(E,B)}},_scrollPrev:function(B,A){if(B!==null){A.stopAutoPlay()}A._scrollPrevInc(A.cfg.getProperty("scrollInc"),(A.cfg.getProperty("animationSpeed")!==0))},_scrollNext:function(B,A){if(B!==null){A.stopAutoPlay()}A._scrollNextInc(A.cfg.getProperty("scrollInc"),(A.cfg.getProperty("animationSpeed")!==0))},_handleAnimationComplete:function(C,B,A){var E=A[0];var D=A[1];E._animationCompleteEvt.fire(D)},_areAllItemsLoaded:function(D,C){var A=true;for(var B=D;B<=C;B++){var E=this.getItem(B);if(!this._isValidObj(E)){this._prebuildLiElem(B);A=false}else{if(this._isValidObj(E.placeholder)){A=false}}}return A},_prebuildItems:function(C,B){for(var A=C;A<=B;A++){var D=this.getItem(A);if(!this._isValidObj(D)){this._prebuildLiElem(A)}}},_isExtraRevealed:function(){return(this.cfg.getProperty("revealAmount")>0)},_scrollNextInc:function(E,J){if(this._scrollNextAnim.isAnimated()||this._scrollPrevAnim.isAnimated()){return false}var N=this.cfg.getProperty("numVisible");var L=this._priorFirstVisible;var I=this._priorLastVisible;var O=this.cfg.getProperty("size");var A=this._calculateAllowableScrollExtent();if(this.cfg.getProperty("wrap")&&I==A.end){this.scrollTo(A.start);return }var K=L+E;var G=K+N-1;if(G>A.end){G=A.end;K=G-N+1}E=K-L;this.cfg.setProperty("firstVisible",K,true);if(E>0){if(this._isValidObj(this.cfg.getProperty("loadNextHandler"))){var D=this._calculateVisibleExtent(K,G);var F=(I+1)<D.start?(I+1):D.start;var H=this._areAllItemsLoaded(F,D.end);this._loadNextHandlerEvt.fire(D.start,D.end,H)}if(J){var M={points:{by:[-this.scrollAmountPerInc*E,0]}};if(this.isVertical()){M={points:{by:[0,-this.scrollAmountPerInc*E]}}}this._scrollNextAnim=new YAHOO.util.Motion(this.carouselList,M,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this.cfg.getProperty("animationCompleteHandler")){this._scrollNextAnim.onComplete.subscribe(this._handleAnimationComplete,[this,"next"])}this._scrollNextAnim.animate()}else{if(this.isVertical()){var B=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,B-this.scrollAmountPerInc*E)}else{var C=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,C-this.scrollAmountPerInc*E)}}}this._priorFirstVisible=K;this._priorLastVisible=G;this._enableDisableControls();return false},_scrollPrevInc:function(G,J){if(this._scrollNextAnim.isAnimated()||this._scrollPrevAnim.isAnimated()){return false}var N=this.cfg.getProperty("numVisible");var L=this._priorFirstVisible;var I=this._priorLastVisible;var O=this.cfg.getProperty("size");var K=L-G;var A=this._calculateAllowableScrollExtent();K=(K<A.start)?A.start:K;var F=K+N-1;if(F>A.end){F=A.end;K=F-N+1}G=L-K;this.cfg.setProperty("firstVisible",K,true);if(G>0){if(this._isValidObj(this.cfg.getProperty("loadPrevHandler"))){var E=this._calculateVisibleExtent(K,F);var C=(L-1)>E.end?(L-1):E.end;var H=this._areAllItemsLoaded(E.start,C);this._loadPrevHandlerEvt.fire(E.start,E.end,H)}if(J){var M={points:{by:[this.scrollAmountPerInc*G,0]}};if(this.isVertical()){M={points:{by:[0,this.scrollAmountPerInc*G]}}}this._scrollPrevAnim=new YAHOO.util.Motion(this.carouselList,M,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this.cfg.getProperty("animationCompleteHandler")){this._scrollPrevAnim.onComplete.subscribe(this._handleAnimationComplete,[this,"prev"])}this._scrollPrevAnim.animate()}else{if(this.isVertical()){var B=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,B+this.scrollAmountPerInc*G)}else{var D=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,D+this.scrollAmountPerInc*G)}}}this._priorFirstVisible=K;this._priorLastVisible=F;this._enableDisableControls();return false},_enableDisableControls:function(){var C=this.cfg.getProperty("firstVisible");var A=this.getLastVisible();var B=this._calculateAllowableScrollExtent();if(this._prevEnabled){if(C===B.start){this._disablePrev()}}if(this._prevEnabled===false){if(C>B.start){this._enablePrev()}}if(this._nextEnabled){if(A===B.end){this._disableNext()}}if(this._nextEnabled===false){if(A<B.end){this._enableNext()}}},_loadInitial:function(){var C=this.cfg.getProperty("firstVisible");this._priorLastVisible=this.getLastVisible();if(this._loadInitHandlerEvt){var A=this._calculateVisibleExtent(C,this._priorLastVisible);var B=this._areAllItemsLoaded(1,A.end);this._loadInitHandlerEvt.fire(A.start,A.end,B)}if(this.cfg.getProperty("autoPlay")!==0){this._autoPlayTimer=this.startAutoPlay()}this._enableDisableControls()},_calculateAllowableScrollExtent:function(){var D=this.cfg.getProperty("scrollBeforeAmount");var A=this.cfg.getProperty("scrollAfterAmount");var B=this.cfg.getProperty("size");var C={start:1-D,end:B+A};return C},_calculateVisibleExtent:function(D,A){if(!D){D=this.cfg.getProperty("firstVisible");A=this.getLastVisible()}var B=this.cfg.getProperty("size");D=D<1?1:D;A=A>B?B:A;var C={start:D,end:A};this._firstItemRevealed=-1;this._lastItemRevealed=-1;if(this._isExtraRevealed()){if(D>1){this._firstItemRevealed=D-1;C.start=this._firstItemRevealed}if(A<B){this._lastItemRevealed=A+1;C.end=this._lastItemRevealed}}return C},_disablePrev:function(){this._prevEnabled=false;if(this._prevButtonStateHandlerEvt){this._prevButtonStateHandlerEvt.fire(false,this._carouselPrev)}if(this._isValidObj(this._carouselPrev)){YAHOO.util.Event.removeListener(this._carouselPrev,"click",this._scrollPrev)}},_enablePrev:function(){this._prevEnabled=true;if(this._prevButtonStateHandlerEvt){this._prevButtonStateHandlerEvt.fire(true,this._carouselPrev)}if(this._isValidObj(this._carouselPrev)){YAHOO.util.Event.addListener(this._carouselPrev,"click",this._scrollPrev,this)}},_disableNext:function(){if(this.cfg.getProperty("wrap")){return }this._nextEnabled=false;if(this._isValidObj(this._nextButtonStateHandlerEvt)){this._nextButtonStateHandlerEvt.fire(false,this._carouselNext)}if(this._isValidObj(this._carouselNext)){YAHOO.util.Event.removeListener(this._carouselNext,"click",this._scrollNext)}},_enableNext:function(){this._nextEnabled=true;if(this._isValidObj(this._nextButtonStateHandlerEvt)){this._nextButtonStateHandlerEvt.fire(true,this._carouselNext)}if(this._isValidObj(this._carouselNext)){YAHOO.util.Event.addListener(this._carouselNext,"click",this._scrollNext,this)}},_isValidObj:function(A){if(null==A){return false}if("undefined"==typeof (A)){return false}return true}};(function(){YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.tooltip=function(){function A(F,H,C){var I=document.getElementById("tooltip-layer");if(!I){I=document.createElement("div");I.id="tooltip-layer";C.appendChild(I)}var K="<div class='rounded'><div class='tl'></div><div class='tr'></div><div class='tm'></div></div><div class='content'>"+H.innerHTML+"</div><div class='rounded'><div class='bl'></div><div class='br'></div><div class='bm'></div></div></div></div>";I.style.display="none";I.style.position="absolute";var E={width:"300px",pos:"tr",offsetX:5,offsetY:5,className:""};function G(){I.className=""}function J(){G();I.innerHTML=K;I.style.visibility="hidden";I.style.display="block";var N=F.className.split(" ");var P=N.length;if(P>=1){var L;for(var M=0;M<P;M++){var O=/cfg-*/;if(O.test(N[M])){L=N[M].split("-");if(L.length==3){if(L[1]=="width"){E.width=((L[2]=="auto")||(L[2]=="none"))?"none":L[2]+"px"}if(L[1]=="pos"){E.pos=L[2]}if(L[1]=="className"){E.className=L[2]}if(L[1]=="offsetX"){E.offsetX=parseInt(L[2])}if(L[1]=="offsetY"){E.offsetY=parseInt(L[2])}}}}}if(!YAHOO.util.Dom.hasClass(I,E.className)){YAHOO.util.Dom.addClass(I,E.className)}if(E.width!="none"){I.style.width=E.width}var Q=YAHOO.util.Dom.getRegion(F);switch(E.pos){case"tl":YAHOO.util.Dom.setY(I,(Q.top-I.offsetHeight)+5+E.offsetY);YAHOO.util.Dom.setX(I,(Q.left-I.offsetWidth)+5+E.offsetX);break;case"bl":YAHOO.util.Dom.setY(I,(Q.top+F.offsetHeight)-5-E.offsetY);YAHOO.util.Dom.setX(I,(Q.left-I.offsetWidth)+5+E.offsetX);break;case"br":YAHOO.util.Dom.setY(I,(Q.bottom-5-E.offsetY));YAHOO.util.Dom.setX(I,(Q.right-5-E.offsetX));break;default:YAHOO.util.Dom.setY(I,(Q.top-I.offsetHeight)+5+E.offsetY);YAHOO.util.Dom.setX(I,(Q.right-5-E.offsetX));break}I.style.visibility="visible";I.className+=" type-"+E.pos}function D(){I.style.display="none"}YAHOO.util.Event.addListener(F,"mouseover",J);YAHOO.util.Event.addListener(F,"mouseout",D)}function B(){var D=document.getElementById("product-overlay");if(D){var H=YAHOO.util.Dom.getElementsByClassName("tooltip-content","div");for(var G=0;G<H.length;G++){if(H.length==1){var C=YAHOO.util.Dom.getElementsByClassName("tooltip-target","div");if(C.length>0){for(var F=0;F<C.length;F++){A(C[F],H[0],D)}}}var E="tooltip-target-"+(G+1);var I=document.getElementById(E);if(I){A(I,H[G],D)}}}}YAHOO.util.Event.onContentReady("page",B)}()})();YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.globalnav={config:{mode:"ajax",width:676,debug:false,sIdent:"global-nav-drop-down",sUrl:YAHOO.EU.Shopping.config.globalnav.dataURL,iMouseOverDelay:1000,iMouseEnterDelay:3000,bCloseIfNotEntered:false,aTabs:["gn-categories","gn-brands","gn-stores","gn-themes"]},cache:{sTabClickedId:""},init:function(){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var F=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.globalnav.init");var A=1}var E=YAHOO.EU.Shopping.globalnav;E.dropDown=new YAHOO.widget.Overlay(E.config.sIdent,{visible:false,monitorresize:true,iframe:true});E.cache.oDrop=document.getElementById(E.config.sIdent);var H=document.createElement("div");H.id="nav-wrapper";E.cache.oDrop.appendChild(H);E.navWrapper=H;var G=E.config.aTabs;var I;for(var D=0,C=G.length;D<C;D++){I=document.getElementById(G[D]);YAHOO.util.Event.addListener(I,"mouseup",E.tabEventHandler,I,true);YAHOO.util.Event.addListener(I,"keypress",E.tabEventHandler,I,true);YAHOO.util.Event.addListener(I,"click",E.tabEventHandler,I,true)}YAHOO.util.Event.addListener(document.getElementsByTagName("html")[0],"click",E.hideDropDown);var B=function(){if(E.dropDown.cfg.getProperty("visible")){E.setDropCoords()}};YAHOO.widget.Module.textResizeEvent.subscribe(B);YAHOO.widget.Overlay.windowResizeEvent.subscribe(B);if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(F,A)}},tabEventHandler:function(D){var B=YAHOO.EU.Shopping.globalnav;var E=this;switch(D.type){case"mouseup":if(B.cache.oTabClicked){YAHOO.util.Dom.removeClass(B.cache.oTabClicked.parentNode,"gn-drop-down");YAHOO.util.Dom.removeClass(B.cache.oTabClicked.parentNode,"gn-drop-down-nosel")}B.cache.isInDropDown=false;var C=E.parentNode;YAHOO.util.Dom.addClass(C,"gn-drop-down");var A=(window.ActiveXObject)?true:false;if(A&&C.className.indexOf("subchoice")==-1){YAHOO.util.Dom.addClass(C,"gn-drop-down-nosel")}B.cache.sTabClickedId=E.id;B.cache.oTabClicked=E;B.loadDropDown(E);if(B.timedClose){window.clearTimeout(B.timedClose)}if(!B.closeDropNotEntered&&!B.timedClose&&B.config.bCloseIfNotEntered){B.closeDropNotEntered=window.setTimeout(function(){if(B.cache.isInDropDown==false){B.dropDown.cfg.setProperty("visible",false)}B.closeDropNotEntered=null},B.config.iMouseEnterDelay)}YAHOO.util.Event.stopEvent(D);break;case"keypress":if(D.keyCode==13){window.location=E.href;YAHOO.util.Event.stopEvent(D)}break;case"click":YAHOO.util.Event.stopEvent(D);break}},getNavData:function(){var A=YAHOO.EU.Shopping.globalnav;switch(A.config.mode){case"json":var C=document.getElementsByTagName("head")[0];var B=document.createElement("script");B.type="text/javascript";B.src=A.config.sUrl+"?JSON=dataCallBack";C.appendChild(B);break;case"ajax":var D=YAHOO.util.Connect.asyncRequest("GET",A.config.sUrl,A.ajaxHandler,null);break}},dataCallBack:function(B){var A=YAHOO.EU.Shopping.globalnav;A.cache.dropDownData=B;if(A.cache.sTabClickedId&&A.cache.dropDownData&&!YAHOO.lang.isUndefined(A.cache.dropDownData[A.cache.sTabClickedId])){A.navWrapper.innerHTML=A.cache.dropDownData[A.cache.sTabClickedId];A.setCloseEvent()}else{A.hideDropDown()}},setCloseEvent:function(){var A=YAHOO.EU.Shopping.globalnav;var B=YAHOO.util.Dom.getElementsByClassName("close","a",A.cache.oDrop)[0];YAHOO.util.Event.addListener(B,"click",A.hideDropDown,{closelink:true},false)},ajaxHandler:{success:function(o){var YESg=YAHOO.EU.Shopping.globalnav;var sResponse=(o.responseText.indexOf("<!--")>-1)?o.responseText.replace(/<!--[\s\S]*?-->/g,""):o.responseText;oData=eval(sResponse);YESg.dataCallBack(oData)},failure:function(B){var A=YAHOO.EU.Shopping.globalnav;window.location=document.getElementById(A.cache.sTabClickedId).href},timeout:5000},loadDropDown:function(B){var A=YAHOO.EU.Shopping.globalnav;if(!A.cache.dropDownData){A.getNavData()}else{A.navWrapper.innerHTML=A.cache.dropDownData[B.id];A.setCloseEvent()}if(A.dropDown){A.setDropCoords(null,true);YAHOO.util.Event.addListener(A.cache.oDrop,"mouseover",A.dropDownEventHandler,this,true);YAHOO.util.Event.addListener(A.cache.oDrop,"mouseout",A.dropDownEventHandler,this,true);if(!A.cache.dropDownData){A.navWrapper.innerHTML='<img class="loading" src="http://r6.kelkoo.com/ux/globalnav/throbber.gif" alt=""><p class="loading">'+YAHOO.EU.Shopping.locale.loading+"</p>"}}},setDropCoords:function(G,C){var J;var D=YAHOO.EU.Shopping.globalnav;if(document.getElementById("kelkoo-logo")===null){var A=YAHOO.util.Dom.getRegion("page")}else{var A=YAHOO.util.Dom.getRegion("main")}var I=YAHOO.util.Dom.getRegion(D.cache.oTabClicked.parentNode?D.cache.oTabClicked.parentNode:D.cache.oTabClicked);var F=A.right;var L=A.left;var K=I.left;var E=I.right;var H=I.bottom-2;var B=D.config.width;if((K+B)>F){J=F-B}else{J=K-2}J=L;D.dropDown.cfg.setProperty("x",J);D.dropDown.cfg.setProperty("y",H);if(C){D.dropDown.cfg.setProperty("visible",true)}},dropDownEventHandler:function(D){var B=YAHOO.EU.Shopping.globalnav;YAHOO.util.Event.stopPropagation(D);var A=YAHOO.util.Event.getRelatedTarget(D);var C=YAHOO.util.Event.getTarget(D);switch(D.type){case"mouseover":if(B.cache.isInDropDown==false){B.cache.isInDropDown=true}break;case"mouseout":if(C==B.cache.oDrop||C.parentNode==B.cache.oDrop){B.cache.isInDropDown=false;B.timedClose=window.setTimeout(function(){if(B.cache.isInDropDown==false){B.closeDrop()}},B.config.iMouseOverDelay)}break}},closeDrop:function(B){var A=YAHOO.EU.Shopping.globalnav;A.dropDown.cfg.setProperty("visible",false);if(A.cache.oTabClicked){YAHOO.util.Dom.removeClass(A.cache.oTabClicked.parentNode,"gn-drop-down");YAHOO.util.Dom.removeClass(A.cache.oTabClicked.parentNode,"gn-drop-down-nosel")}A.cache.mouseInDropDown=false},hideDropDown:function(C,D){D=D||null;var B=YAHOO.util.Event.getTarget(C);var A=YAHOO.EU.Shopping.globalnav;if(D&&D.closelink){A.closeDrop(C)}else{if(!YAHOO.util.Dom.isAncestor(A.cache.oDrop,B)){A.closeDrop()}}if(C&&YAHOO.util.Event.getTarget(C).className=="close"){YAHOO.util.Event.preventDefault(C)}}};YAHOO.util.Event.onDOMReady(YAHOO.EU.Shopping.globalnav.init);YAHOO.EU.Shopping.Newsletter={init:function(){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var D=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.Newsletter.init");var C=-1}var E=document.getElementById("nlemaillab").firstChild.nodeValue;var A=document.getElementById("nlemail");var B=document.getElementById("nlform");A.value=E;YAHOO.util.Event.addListener(A,"focus",function(){if(A.value==E){A.value=""}});YAHOO.util.Event.addListener(A,"blur",function(){if(A.value==""){A.value=E}});YAHOO.util.Event.addListener(B,"submit",function(F){if(A.value!=E||A.value!=""){YAHOO.EU.Shopping.Newsletter.openWindow(B)}},this,true);if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(D,C)}},openWindow:function(F){var E=window.screenX+20;var D=window.screenY+20;var B=F.action;var C=300;var A=340;window.open(B,"yahoo_nl","screenX="+E+",screenY="+D+",width="+A+",height="+C,menubar="no",toolbar="no");return false}};YAHOO.util.Event.onContentReady("newsletter",YAHOO.EU.Shopping.Newsletter.init,this);YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C)}else{if(console&&console.log){if(!A){var A="info"}return console.log(A+":"+D)}else{return false}}};if(!YAHOO.lang.isFunction(YAHOO.lang.later)){YAHOO.lang.later=function(H,B,I,D,E){H=H||0;B=B||{};var C=I,G=D,F,A;if(YAHOO.lang.isString(I)){C=B[I]}if(!C){throw new TypeError("method undefined")}if(!YAHOO.lang.isArray(G)){G=[D]}F=function(){C.apply(B,G)};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A)}else{clearTimeout(A)}}}}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(B){var A=this.length;var C=Number(arguments[1])||0;C=(C<0)?Math.ceil(C):Math.floor(C);if(C<0){C+=A}for(;C<A;C++){if(C in this&&this[C]===B){return C}}return -1}}YAHOO.EU.Shopping.tooltipMsg={handleMsgDivs:function(G,D){for(var C=0,B=D.length;C<B;C++){var F=document.getElementById(D[C]);if(F){var H=YAHOO.util.Event.getTarget(G);var E=YAHOO.EU.Shopping.userHist.config.oSavedLs;var A=E.getElementsByTagName("li");if(H.nodeName.toLowerCase()!="a"&&YAHOO.util.Dom.hasClass(F,"hist-too-many-items")&&!YAHOO.util.Dom.isAncestor(H,F)){F.parentNode.removeChild(F)}else{if(H.nodeName.toLowerCase()!="a"&&H!=F&&!YAHOO.util.Dom.isAncestor(F,H)&&A.length<=5){F.parentNode.removeChild(F)}}}}},setWarningMsg:function(L,N,J,E,C){var I=["compare-max-error","compare-min-error","compare-min-error-2","hist-error-div","add-warning-msg"];for(var H=0,G=I.length;H<G;H++){var F=document.getElementById(I[H]);if(F){if(J!="compare-min-error-2"){F.parentNode.removeChild(F)}}}var K=document.createElement("div");var D=document.createTextNode(N);K.appendChild(D);var B=document.createElement("a");var M=document.createElement("img");M.setAttribute("src","http://r6.kelkoo.com/ux/buttons/orange-cross-button.gif");M.setAttribute("alt",YAHOO.EU.Shopping.locale.close);B.appendChild(M);B.href="#";K.appendChild(B);YAHOO.util.Event.addListener(B,"click",function(O){YAHOO.util.Event.preventDefault(O);K.parentNode.removeChild(K)},this,true);L.parentNode.insertBefore(K,L.parentNode.childNodes[0]);if(E&&E=="delete"){var A=YAHOO.util.Dom.getY(L);A=A+15;YAHOO.util.Dom.setY(K,A)}K.setAttribute("id",J);YAHOO.util.Dom.addClass(K,"warning-msg");if(C){YAHOO.util.Dom.addClass(K,C)}}};YAHOO.EU.Shopping.userHist={config:{sShowAllTxt:YAHOO.EU.Shopping.locale.showAll,sHideAllTxt:YAHOO.EU.Shopping.locale.hideAll},init:function(){var Q=YAHOO.EU.Shopping.userHist.config;var J=document.getElementById("user-hist");if(!J){return true}Q.oSavedLs=document.getElementById("sav-ls");var B=Q.oSavedLs;if(B.className!="intro"){B.className="enhanced"}var R=J.getElementsByTagName("h3");var D=J.getElementsByTagName("ol");var H=YAHOO.EU.Shopping.cookie.get("histCookie");YAHOO.log(H);if(!H||H=="undefined"){YAHOO.EU.Shopping.cookie.set("histCookie","sav=1,rv=0,rs=0",365,"."+YAHOO.EU.Shopping.locale.domain);YAHOO.log("firstCookie"+YAHOO.EU.Shopping.cookie.get("histCookie"))}var E=0;var K=["sav","rv","rs"];if(H){for(P=0;P<3;P++){var E=E+parseInt(YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),K[P],"read"))}}var N=document.getElementById("user-ctrls");var L=document.createElement("a");L.setAttribute("href","#");L.setAttribute("id","user-ctrl-cl");if(E==3){var F=document.createTextNode(Q.sHideAllTxt)}else{var F=document.createTextNode(Q.sShowAllTxt)}L.appendChild(F);var G=document.createElement("li");G.appendChild(L);G.className="ctrl-cls";N.appendChild(G);for(var P=0,O=R.length;P<O;P++){if(H){if(YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),K[P],"read")==1){YAHOO.util.Dom.addClass(R[P],"hist-op")}else{YAHOO.util.Dom.addClass(R[P],"hist-cl");YAHOO.util.Dom.addClass(D[P],"hide")}}else{if(P==0){YAHOO.util.Dom.addClass(R[P],"hist-op")}else{YAHOO.util.Dom.addClass(R[P],"hist-cl");YAHOO.util.Dom.addClass(D[P],"hide")}}var I=R[P].getElementsByTagName("span")[0];var C={oMainCont:J,aHeaders:R,oHeader:R[P],aContLs:D,oContent:D[P],oIndex:P,oChgAllLnk:document.getElementById("user-ctrl-cl")};YAHOO.util.Event.addListener(I,"click",M,C,true)}YAHOO.util.Event.addListener(L,"click",A,L,true);var S=B.getElementsByTagName("li");Q.aSavedLis=S;YAHOO.util.Dom.addClass(S[0],"selected");YAHOO.util.Event.addListener(B,"click",YAHOO.EU.Shopping.userHist.clickItemHandler,true);function M(U,T){if(YAHOO.util.Dom.hasClass(T.oHeader,"hist-op")){YAHOO.util.Dom.removeClass(T.oHeader,"hist-op");YAHOO.util.Dom.addClass(T.oHeader,"hist-cl");YAHOO.util.Dom.addClass(T.oContent,"hide");E=E-1;if(H){YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),K[T.oIndex],"update")}}else{YAHOO.util.Dom.removeClass(T.oHeader,"hist-cl");YAHOO.util.Dom.addClass(T.oHeader,"hist-op");YAHOO.util.Dom.removeClass(T.oContent,"hide");E=E+1;if(H){YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),K[T.oIndex],"update")}}if(E==3){T.oChgAllLnk.firstChild.nodeValue=Q.sHideAllTxt}else{if(E==0){T.oChgAllLnk.firstChild.nodeValue=Q.sShowAllTxt}}}function A(V){YAHOO.util.Event.preventDefault(V);if(this.firstChild.nodeValue==Q.sHideAllTxt){this.firstChild.nodeValue=Q.sShowAllTxt;for(var U=0,T=R.length;U<T;U++){if(YAHOO.util.Dom.hasClass(R[U],"hist-op")){YAHOO.util.Dom.removeClass(R[U],"hist-op");YAHOO.util.Dom.addClass(R[U],"hist-cl");YAHOO.util.Dom.addClass(D[U],"hide");YAHOO.EU.Shopping.cookie.set("histCookie","sav=0,rv=0,rs=0",365,"."+YAHOO.EU.Shopping.locale.domain);YAHOO.log("cookieset"+YAHOO.EU.Shopping.cookie.get("histCookie"))}}E=0}else{if(this.firstChild.nodeValue==Q.sShowAllTxt){this.firstChild.nodeValue=Q.sHideAllTxt;for(var U=0,T=R.length;U<T;U++){if(YAHOO.util.Dom.hasClass(R[U],"hist-cl")){YAHOO.util.Dom.removeClass(R[U],"hist-cl");YAHOO.util.Dom.addClass(R[U],"hist-op");YAHOO.util.Dom.removeClass(D[U],"hide");YAHOO.EU.Shopping.cookie.set("histCookie","sav=1,rv=1,rs=1",365,"."+YAHOO.EU.Shopping.locale.domain);YAHOO.log("cookieset"+YAHOO.EU.Shopping.cookie.get("histCookie"))}}E=3}}}},clickItemHandler:function(B){var C=YAHOO.util.Event.getTarget(B);if(C.nodeName.toLowerCase()=="ol"){return }var E=C.nodeName.toLowerCase();if(this.nodeName.toLowerCase()){var D=C}while(D.nodeName.toLowerCase()!="li"){D=D.parentNode}var A=D.getElementsByTagName("a")[0];if(E=="img"||C==A){YAHOO.util.Event.preventDefault(B);if(YAHOO.util.Dom.hasClass(D,"selected")){return true}else{YAHOO.EU.Shopping.userHist.updateSelectedLI(D)}}else{if(E=="a"&&YAHOO.util.Dom.hasClass(C,"delete")){YAHOO.util.Event.preventDefault(B);YAHOO.EU.Shopping.userHist.setLinkAction(C)}}},updateSelectedLI:function(A){var B=YAHOO.EU.Shopping.userHist.config.aSavedLis;for(i=0,j=B.length;i<j;i++){if(YAHOO.util.Dom.hasClass(B[i],"selected")){YAHOO.util.Dom.removeClass(B[i],"selected")}YAHOO.util.Dom.addClass(A,"selected")}},returnCookieVal:function(C,I,D){var G=new RegExp(I+"=[01]","i");var F=G.exec(C);YAHOO.log(F);if(F){var E=F[0].substring(F[0].length-1,F[0].length)}else{var E=1}if(D=="read"){return E}if(D=="update"){YAHOO.log(E);if(E==0){var B=1}else{var B=0}var H=I+"="+B;var A=C.replace(F,H);YAHOO.EU.Shopping.cookie.set("histCookie",A,365,"."+YAHOO.EU.Shopping.locale.domain);YAHOO.log("cookieset"+YAHOO.EU.Shopping.cookie.get("histCookie"))}},setLinkAction:function(M){if(YAHOO.util.Dom.hasClass(M,"delete")){var C="delete"}else{var C="add"}var H=YAHOO.EU.Shopping.userHist.config.oSavedLs;var A=H.getElementsByTagName("li");var E=document.getElementById("hist-error-div");if(E){E.parentNode.removeChild(E)}if(C=="add"&&A.length==5){var I=YAHOO.EU.Shopping.locale.histOversize;YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(M,I,"hist-error-div","add","hist-too-many-items");return }var K=M.href;var B=K.indexOf("catId");if(B==-1){var F=K.indexOf("offerId");var D=K.substring(F+8,K.length);YAHOO.EU.Shopping.userHist.updateSavedList(M,C,D)}else{var L=K.indexOf("pid");var J=K.substring(B+6,L);var G=K.substring(L+4,K.length);YAHOO.EU.Shopping.userHist.updateSavedList(M,C,G,J)}},updateSavedList:function(srcLink,action,id,catId){var handleSuccess=function(o){if(o.responseText){var response=eval(o.responseText);if(response.error!=""){YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(srcLink,response.error,"hist-error-div",action)}else{var oSavedLs=YAHOO.EU.Shopping.userHist.config.oSavedLs;var aSavedLis=oSavedLs.getElementsByTagName("li");if(action=="delete"){if(aSavedLis.length>1){var startIndex=response.savedListContent.indexOf("<li>");response.savedListContent=response.savedListContent.substring(startIndex,response.savedListContent.length);oSavedLs.innerHTML=response.savedListContent;aSavedLis=oSavedLs.getElementsByTagName("li");YAHOO.EU.Shopping.userHist.updateSelectedLI(aSavedLis[0])}else{var startIndex=response.savedListContent.indexOf("<li>");response.savedListContent=response.savedListContent.substring(startIndex,response.savedListContent.length);YAHOO.util.Dom.replaceClass(oSavedLs,"enhanced","intro");oSavedLs.innerHTML=response.savedListContent}}else{if(YAHOO.util.Dom.hasClass(oSavedLs,"intro")){YAHOO.util.Dom.replaceClass(oSavedLs,"intro","enhanced");oSavedLs.innerHTML=response.savedListContent;aSavedLis=oSavedLs.getElementsByTagName("li");YAHOO.EU.Shopping.userHist.updateSelectedLI(aSavedLis[0])}else{oSavedLs.innerHTML=response.savedListContent;aSavedLis=oSavedLs.getElementsByTagName("li");YAHOO.EU.Shopping.userHist.updateSelectedLI(aSavedLis[0])}YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(srcLink,YAHOO.EU.Shopping.locale.addedToSavedList,"add-warning-msg");var savedListTitle=document.getElementById("user-hist").getElementsByTagName("h3")[0];if(YAHOO.util.Dom.hasClass(savedListTitle,"hist-cl")){YAHOO.util.Dom.replaceClass(savedListTitle,"hist-cl","hist-op");YAHOO.util.Dom.removeClass(oSavedLs,"hide")}}}}};var handleFailure=function(o){};var callback={success:handleSuccess,failure:handleFailure,timeout:10000};if(catId){if(action=="add"){var url="/ctl/do/asyncCall/user-hist?action=add&id="+id+"&catId="+catId}else{var url="/ctl/do/asyncCall/user-hist?action=delete&id="+id+"&catId="+catId}}else{if(action=="add"){var url="/ctl/do/asyncCall/user-hist?action=add&id="+id}else{var url="/ctl/do/asyncCall/user-hist?action=delete&id="+id}}var request=YAHOO.util.Connect.asyncRequest("GET",url,callback)}};YAHOO.EU.Shopping.quickRating={init:function(){var A=document.getElementById("level3");if(A){YAHOO.util.Event.addListener(A,"click",YAHOO.EU.Shopping.quickRating.identify,this,true)}},identify:function(A){var B=YAHOO.util.Event.getTarget(A);var C=B.nodeName.toLowerCase();if(C=="a"&&YAHOO.util.Dom.hasClass(B,"quick-rating")){YAHOO.util.Event.preventDefault(A);YAHOO.EU.Shopping.quickRating.deploy(B)}},deploy:function(J){if(YAHOO.util.Dom.hasClass(J,"qr-open")){return true}YAHOO.util.Dom.addClass(J,"qr-open");var C=document.createElement("div");C.className="qr-wrap";YAHOO.util.Dom.generateId(C);var E=document.createElement("ol");var D=J.href.indexOf("?");var A=J.href.substring(D,J.href.length);var B=document.createElement("a");B.href="#";B.className="qr-close-lnk";B.innerHTML='<img src="http://r6.kelkoo.com/ux/buttons/orange-cross-button.gif" width="" height="" alt="'+YAHOO.EU.Shopping.locale.close+'">';for(i=1;i<=5;i++){var H=document.createElement("li");var I=document.createElement("a");I.className="qr-"+i;I.href="#";var G=document.createTextNode(YAHOO.EU.Shopping.locale.rate+" "+i);I.appendChild(G);H.appendChild(I);E.appendChild(H);var F={oQuickRateContainer:C,sUrlParams:A+"&quick_rating="+i,oCloseLnk:B,iRate:i};YAHOO.util.Event.addListener(I,"click",YAHOO.EU.Shopping.quickRating.rate,F,true)}C.appendChild(E);C.appendChild(B);YAHOO.util.Event.purgeElement(J,0);YAHOO.util.Event.addListener([B,J],"click",YAHOO.EU.Shopping.quickRating.switchDisplay,C,true);YAHOO.util.Dom.insertAfter(C,J)},switchDisplay:function(B,A){YAHOO.util.Event.preventDefault(B);if(YAHOO.util.Dom.hasClass(A,"hide")){YAHOO.util.Dom.removeClass(A,"hide")}else{YAHOO.util.Dom.addClass(A,"hide")}},rate:function(e,oParams){YAHOO.util.Event.preventDefault(e);var handleSuccess=function(o){if(o.responseText){var response=eval(o.responseText);if(response.msgKey=="0"){var quickRateOl=oParams.oQuickRateContainer.getElementsByTagName("ol")[0];var ratingSpan=document.createElement("span");ratingSpan.className="rating rat"+oParams.iRate;ratingSpan.innerHTML='<span class="rating-wrap"><span class="value">'+oParams.iRate+'</span> out of <span class="best">5</span></span>';oParams.oQuickRateContainer.replaceChild(ratingSpan,quickRateOl)}var message=document.createElement("div");message.className="qr-message";var messageTxt=document.createTextNode(response.quickRateMsg);message.appendChild(messageTxt);oParams.oQuickRateContainer.appendChild(message)}};var handleFailure=function(o){};var callback={success:handleSuccess,failure:handleFailure,timeout:10000};var url="/ctl/do/asyncCall/quick-rating-process"+oParams.sUrlParams+"&qrAjax=true";var request=YAHOO.util.Connect.asyncRequest("GET",url,callback)}};YAHOO.EU.Shopping.levelsSaveLnksListener={init:function(){YAHOO.util.Event.addListener(document.body,"click",function(B){YAHOO.EU.Shopping.levelsSaveLnksListener.targetSaveLnks(B);var A=["compare-max-error","compare-min-error","compare-min-error-2","hist-error-div","add-warning-msg"];YAHOO.EU.Shopping.tooltipMsg.handleMsgDivs(B,A)})},targetSaveLnks:function(C){var B=document.getElementById("sav-ls");if(!B){return }var A=B.getElementsByTagName("li");var E=A[0];if(E){var D=YAHOO.util.Event.getTarget(C);var F=D.nodeName.toLowerCase();if(F=="a"&&YAHOO.util.Dom.hasClass(D,"add-to-saved-list")){YAHOO.util.Event.preventDefault(C);YAHOO.EU.Shopping.userHist.setLinkAction(D)}}}};YAHOO.util.Event.onDOMReady(function(){if(YAHOO.EU.Shopping.Flags.saveLink){YAHOO.EU.Shopping.levelsSaveLnksListener.init()}});YAHOO.util.Event.addListener(window,"load",YAHOO.EU.Shopping.userHist.init);YAHOO.util.Event.addListener(window,"load",YAHOO.EU.Shopping.quickRating.init,this,true);YAHOO.EU.Shopping.sortingFormEnhancement={init:function(){var D=document.getElementById("sorting-form");if(D){D.parentNode.style.paddingBottom="10px";var B=YAHOO.util.Dom.getElementsByClassName("cta","button",D)[0];B.style.display="none";var E=D.getElementsByTagName("select");for(var C=0,A=E.length;C<A;C++){YAHOO.util.Event.addListener(E[C],"change",function(F){D.submit()},true)}}}};YAHOO.util.Event.onDOMReady(function(){if(document.getElementById("sorting-form")){YAHOO.EU.Shopping.sortingFormEnhancement.init()}});YAHOO.EU.Shopping.buying={formCallback:function(B){YAHOO.util.Event.stopEvent(B);var A=document.getElementById("bg-dd-select").value;if(A!=""){window.location=A}},init:function(){var K=document.getElementById("buyguide-form-list");var D=document.getElementById("bg-dd-ul");var A=document.getElementById("bg-form");if(A){YAHOO.util.Event.addListener(A,"submit",YAHOO.EU.Shopping.buying.formCallback);var C=document.createElement("select");C.id="bg-dd-select";var I=YAHOO.util.Dom.getElementsByClassName("bg-dd-li","li");for(var F=0,E=I.length;F<E;F++){var G=I[F].firstChild;var J=document.createElement("option");var B=G.textContent==""?G.textContent:G.innerHTML;var H=document.createTextNode(B.replace(/&amp;/gi,"&"));J.value=G.href;J.appendChild(H);C.appendChild(J)}A.insertBefore(C,D);A.removeChild(D);A.innerHTML+='<button class="cta internal" type="submit"><span class="t"><span></span></span><span class="cont"><span>Go</span></span><span class="b"><span> </span></span></button>'}}};YAHOO.EU.Shopping.contentnav={init:function(){var E=YAHOO.util.Dom.getElementsByClassName("corp-sublnk","ul");for(var C=0,B=E.length;C<B;C++){var D=YAHOO.util.Dom.getElementsByClassName("corp-active","li",E[C]);if(D.length==0){YAHOO.util.Dom.setStyle(E[C],"display","none")}else{var F=E[C].parentNode;var A=F.getElementsByTagName("h3");YAHOO.util.Dom.addClass(A,"corp-ttl-active")}}}};if(YAHOO.EU.Shopping.spop===undefined){YAHOO.EU.Shopping.spop=function(B,A){YAHOO.EU.Shopping.spop.superclass.constructor.call(this,B,A)};YAHOO.extend(YAHOO.EU.Shopping.spop,YAHOO.widget.Module)}YAHOO.EU.Shopping.spop.prototype.init=function(B,A){if(document.getElementById("giftform-mod")){YAHOO.util.Dom.setStyle(document.getElementById("giftform-mod"),"display","block")}if(document.getElementById("spop_fhome")||document.getElementById("giftform-mod")){YAHOO.util.Event.addListener("spop-form","submit",this.encodeFormBox,this,true);YAHOO.util.Event.addListener("spop-form-submit","click",this.encodeFormBox,this,true);YAHOO.util.Event.addListener("spop-form-target","change",this.updateFormBox,this,true);YAHOO.util.Event.addListener("spop-form-target","keydown",this.spopSubmit,this,true);YAHOO.util.Event.addListener("spop-form-category","keydown",this.spopSubmit,this,true);YAHOO.util.Event.addListener("spop-form-price","keydown",this.spopSubmit,this,true)}if(this.updateFormBox!==undefined){this.updateFormBox()}};YAHOO.EU.Shopping.spop.prototype.encodeFormBox=function(I){YAHOO.util.Event.stopEvent(I);var B="",N="",H="",J="",K="";if(document.getElementById("spop-form")){var M=document.getElementById("spop-form")}if(document.getElementById("spop-form-target")){var C=document.getElementById("spop-form-target");H=C.value}if(document.getElementById("spop-form-category")){var L=document.getElementById("spop-form-category");B=L.value}if(document.getElementById("spop-form-price")){var E=document.getElementById("spop-form-price");N=E.value}if(document.getElementById("spop-form-catId")){var G=document.getElementById("spop-form-catId");J=G.value}if(document.getElementById("spop-form-spopN")){var F=document.getElementById("spop-form-spopN");var K=F.value}var A="/ctl/do/spopResult?category="+B+"&price="+N+"&target="+H+"&catId="+J+"&spopn="+K+"&keepParams=true";var D="/ctl/do/contentWide?catId="+J+"&url="+escape(A);window.location=D};YAHOO.EU.Shopping.spop.prototype.spopSubmit=function(A){if(!A){A=window.event}if(A.keyCode==13){this.encodeFormBox(A);return false}};YAHOO.util.Event.onDOMReady(function(){new YAHOO.EU.Shopping.spop(document.getElementById("page"))});YAHOO.util.Event.onDOMReady(function(){if(document.getElementById("nav-corp")){YAHOO.EU.Shopping.contentnav.init()}});YAHOO.util.Event.onDOMReady(function(){if(YAHOO.EU.Shopping.Flags.buying){YAHOO.EU.Shopping.buying.init()}});YAHOO.util.Dom.addScriptNode=function(A){oScript=document.createElement("script");oScript.type="text/javascript";oScript.src=A;document.getElementsByTagName("head")[0].appendChild(oScript)};YAHOO.util.Dom.onMethodAvailable=function(sMethod,oCallback,o,bScope){if(typeof (eval(sMethod))==="function"){bScope?oCallback.call(o):oCallback(o)}else{setTimeout(function(){YAHOO.util.Dom.onMethodAvailable(sMethod,oCallback,o,bScope)},100)}};YAHOO.EU.Shopping.cookie={set:function(C,E,F,D){var D="; domain="+D+";"||"";if(F){var B=new Date();B.setTime(B.getTime()+(F*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+E+A+"; path=/"+D},get:function(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null},del:function(A){YAHOO.EU.Shopping.cookie.set(A,"",-1)}};YAHOO.EU.Shopping.openInPopup=function(C,A,D){var B=YAHOO.util.Event.getTarget(C);if(!B){return }if((B.tagName.toLowerCase()=="img")&&B.parentNode){B=B.parentNode}if(B&&B.tagName.toLowerCase()=="a"&&YAHOO.util.Dom.hasClass(B,"js-popup")){window.open(B.href,"popup","width="+A+",height="+D+",scrollbars=yes,menubar=no,status=no,toolbar=no");YAHOO.util.Event.stopEvent(C)}};YAHOO.EU.Shopping.validate={isDate:function(A){var B=new RegExp(/^(?:(?:0?[1-9]|1\d|2[0-8])(\/|-)(?:0?[1-9]|1[0-2]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:31(\/|-)(?:0?[13578]|1[02]))|(?:(?:29|30)(\/|-)(?:0?[1,3-9]|1[0-2])))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(29(\/|-)0?2)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/);if(!B.test(A)){return false}return true}};YAHOO.widget.DateMath.getDate=function(B){if(YAHOO.lang.isString){if(!YAHOO.EU.Shopping.validate.isDate(B)){return false}var A=B.split(new RegExp(/-|\//));if(!A||!(A.length>0&&A.length<4)){return false}return new Date(A[YAHOO.EU.Shopping.YUICalendarConf.MDY_YEAR_POSITION-1],A[YAHOO.EU.Shopping.YUICalendarConf.MDY_MONTH_POSITION-1]-1,A[YAHOO.EU.Shopping.YUICalendarConf.MDY_DAY_POSITION-1])}else{return new Date()}};YAHOO.util.Event.onDOMReady(function(){var A=550;var B=550;YAHOO.util.Event.addListener("level-results-page","click",function(C){YAHOO.EU.Shopping.openInPopup(C,A,B)});YAHOO.util.Event.addListener("product-overlay","click",function(C){YAHOO.EU.Shopping.openInPopup(C,A,B)});YAHOO.util.Event.addListener("merchant-desc","click",function(C){YAHOO.EU.Shopping.openInPopup(C,A,B)});YAHOO.util.Event.addListener("sbot","click",function(C){YAHOO.EU.Shopping.openInPopup(C,A,B)});YAHOO.util.Event.addListener("store-profile","click",function(C){YAHOO.EU.Shopping.openInPopup(C,A,B)})});YAHOO.util.Event.onDOMReady(function(){YAHOO.util.Event.addListener("mer-search","submit",function(B){var A=document.getElementById("mer-search-query");if(A.value==""){YAHOO.util.Event.stopEvent(B);if(!document.getElementById("merchant-search-error")){var C=document.createElement("p");C.id="merchant-search-error";C.appendChild(document.createTextNode(YAHOO.EU.Shopping.locale.merchantSearchError));document.getElementById("mer-search").insertBefore(C,A)}}})});YAHOO.util.Event.onDOMReady(function(){var C=document.getElementById("pop-cats-show");var A=document.getElementById("pop-cats-hide");var B=document.getElementById("more-other-cats");if(C&&A){YAHOO.util.Event.addListener(C,"click",function(D){YAHOO.util.Event.preventDefault(D);YAHOO.util.Dom.removeClass(B,"hide");YAHOO.util.Dom.addClass(C,"hide");YAHOO.util.Dom.removeClass(A,"hide")});YAHOO.util.Event.addListener(A,"click",function(D){YAHOO.util.Event.preventDefault(D);YAHOO.util.Dom.addClass(B,"hide");YAHOO.util.Dom.removeClass(C,"hide");YAHOO.util.Dom.addClass(A,"hide")})}});(function(){if(!window.console){window.console={};window.console.log=function(){return false}}var D=["http://r6.kelkoo.com/ux/common/sprite-global-v2.png","http://r6.kelkoo.com/ux/common/sprite-button.png"];var C=[];for(var B=0,A=D.length;B<A;B++){C[B]=new Image();C[B].src=D[B]}YAHOO.util.Event.onAvailable("s",function(){YAHOO.util.Event.addListener("search","submit",function(E){if(this.value==""){YAHOO.util.Event.stopEvent(E);this.focus()}},this,true)})})();YAHOO.util.Event.addListener(window,"load",function(){if(document.getElementById("yahoo-sponsored-links-overturecomm")){document.getElementById("yahoo-sponsored-links-overturecomm").style.display="block"}if(document.getElementById("yahoo-sponsored-links")){document.getElementById("yahoo-sponsored-links").style.display="block"}});YAHOO.EU.Shopping.partnerwithus={init:function(){var A=YAHOO.util.Dom.getElementsByClassName("form-add-more","a");for(var C=0,B=A.length;C<B;C++){YAHOO.util.Dom.setStyle(A[C],"display","inline");YAHOO.util.Event.addListener(A[C],"click",YAHOO.EU.Shopping.partnerwithus.createField,this,true)}},createField:function(F){YAHOO.util.Event.preventDefault(F);var G=YAHOO.util.Event.getTarget(F);var C=G.parentNode;var E=G.title;var B=YAHOO.util.Dom.getElementsByClassName("form-original-fields","span",C);var A=YAHOO.util.Dom.getElementsByClassName("form-more-fields","span",C);if(A.length<=8){if(B[0]){var D=document.createElement("span");YAHOO.util.Dom.addClass(D,"form-more-fields");D.innerHTML="<label>&nbsp;</label>"+B[0].innerHTML;if(A.length<2){C.appendChild(D)}if(E=="input"){C.appendChild(D)}}}}};YAHOO.util.Event.onDOMReady(function(){if(document.getElementById("partner-withus-form")){YAHOO.EU.Shopping.partnerwithus.init()}});(function(){YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.unObfuscateMails={init:function(){var A=YAHOO.util.Dom.getElementsByClassName("obfuscateEmail","a");var B=YAHOO.util.Dom.getElementsByClassName("obfuscateEmail","span");return this.unObfuscate(A)&&this.unObfuscate(B)},unObfuscate:function(D){var B=D.length;var C=YAHOO.EU.Shopping.locale.obfuscationKey;for(var A=0;A<B;A++){D[A].innerHTML=D[A].innerHTML.replace(C,"@","g");if(D[A].tagName.toLowerCase()=="a"){D[A].href=D[A].href.replace(C,"@","g")}}return true}};YAHOO.util.Event.addListener(window,"load",function(){if(YAHOO.EU.Shopping.Flags.obfuscateEmail){YAHOO.EU.Shopping.unObfuscateMails.init()}})})();YAHOO.namespace("YAHOO.Kelkoo");YAHOO.Kelkoo.wrapText=function(C){var B=document.getElementById(C.linkId);if(B){var D=document.getElementById(C.spanHellipId);var A=document.getElementById(C.spanAfterId);YAHOO.util.Event.on(B,"click",function(E){YAHOO.util.Event.stopEvent(E);B.blur();if(D&&A&&B){D.className=(D.className=="show")?"hide":"show";A.className=(A.className=="show")?"hide":"show";B.className=(B.className=="show-details")?"hide-details":"show-details";B.innerHTML=(B.innerHTML==C.linkLabelShow)?C.linkLabelHide:C.linkLabelShow}},true)}};YAHOO.util.Event.onDOMReady(function(){YAHOO.Kelkoo.wrapText({linkId:"wrap-text",linkLabelShow:YAHOO.EU.Shopping.locale.lvl2ShowDetails,linkLabelHide:YAHOO.EU.Shopping.locale.lvl2HideDetails,spanHellipId:"desc-hellip",spanAfterId:"desc-tail"})});YAHOO.namespace("YAHOO.EU.Shopping.Utils");YAHOO.EU.Shopping.Utils.BookmarkManager={createBookmark:function(A,B){if(typeof (window.external.AddFavorite)!="undefined"){if(B!=="undefined"){window.external.AddFavorite(A,B)}else{window.external.AddFavorite(A,document.title)}return true}return false},setHomePage:function(C,B){var A=document.createElement("a");A.href="#";A.style.behavior="url(#default#homepage)";if(typeof (A.setHomePage)!="undefined"){A.setHomePage(B);return true}return false},initLinks:function(){YAHOO.util.Event.onAvailable(["bmk1","bmk2"],function(){if(YAHOO.EU.Shopping.config.bookmark.isActivated&&window.external&&typeof (window.external.AddFavorite)!="undefined"){YAHOO.util.Dom.replaceClass("bmk1","hide","show");YAHOO.util.Dom.replaceClass("bmk2","hide","show");YAHOO.util.Event.addListener("bookmarkLink","click",function(D){YAHOO.util.Event.preventDefault(D);var B=window.location.href;if(B.indexOf("?")>=0){B=B+"&source=bookmark"}else{B=B+"?source=bookmark"}var A=YAHOO.EU.Shopping.Utils.BookmarkManager.createBookmark(B,document.title);if(A){var C="http://"+window.location.host+YAHOO.EU.Shopping.config.bookmark.trackingUrl+"?"+YAHOO.EU.Shopping.config.bookmark.bookmarkParam;C=YAHOO.EU.Shopping.linkTracking.getTrackerLink(C,"globalnav");YAHOO.EU.Shopping.linkTracking.trackUxActions(C)}});YAHOO.util.Event.addListener("homepageLink","click",function(D){YAHOO.util.Event.preventDefault(D);var B=window.location.href;if(B.indexOf("?")>=0){B=B+"&source=homepage"}else{B=B+"?source=homepage"}var A=YAHOO.EU.Shopping.Utils.BookmarkManager.setHomePage(D,B);if(A){var C="http://"+window.location.host+YAHOO.EU.Shopping.config.bookmark.trackingUrl+"?"+YAHOO.EU.Shopping.config.bookmark.homepageParam;C=YAHOO.EU.Shopping.linkTracking.getTrackerLink(C,"globalnav");YAHOO.EU.Shopping.linkTracking.trackUxActions(C)}})}})}};YAHOO.util.Event.onDOMReady(function(){if(document.getElementById("bmk1")||document.getElementById("bmk2")){YAHOO.EU.Shopping.Utils.BookmarkManager.initLinks()}});YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.Filters=function(B,A){YAHOO.EU.Shopping.Filters.superclass.constructor.call(this,B,A)};YAHOO.extend(YAHOO.EU.Shopping.Filters,YAHOO.widget.Module);YAHOO.EU.Shopping.Filters.pageFilters=[];YAHOO.EU.Shopping.Filters.prototype.init=function(B,A){YAHOO.EU.Shopping.Filters.superclass.init.call(this,B);this.beforeInitEvent.fire(YAHOO.EU.Shopping.Filters);if(A){this.cfg.applyConfig(A,true)}this.initElementReferences();this.initDOMEventListeners();this.initDOMManipulations();this.initEvent.fire(YAHOO.EU.Shopping.Filters);this.redrawIE6()};YAHOO.EU.Shopping.Filters.prototype.initEvents=function(){YAHOO.EU.Shopping.Filters.superclass.initEvents.call(this);this.beforeToggleLastGroupEvent=new YAHOO.util.CustomEvent("beforeToggleLastGroup",this);this.toggleLastGroupEvent=new YAHOO.util.CustomEvent("toggleLastGroup",this)};YAHOO.EU.Shopping.Filters.prototype.initDefaultConfig=function(){YAHOO.EU.Shopping.Filters.superclass.initDefaultConfig.call(this);this.cfg.addProperty("retrieveFiltersOnlyGETParameter",{value:"ajaxModule=filters"});this.cfg.addProperty("retrieveFiltersAndResultsGETParameter",{value:"ajaxModule=results&ajaxModule=filters"})};YAHOO.EU.Shopping.Filters.prototype.initElementReferences=function(){var A=YAHOO.util.Dom.getElementsByClassName(this.element,"groups","ul");if(!A.length){return false}this.groups=A;if(this.groups.length<2){throw ("Filters widgets with less than 2 Filter Groups are not supported")}this.also_group=this.groups[this.groups.length-1];this.toggle_group=this.groups[this.groups.length-2]};YAHOO.EU.Shopping.Filters.prototype.initDOMEventListeners=function(){YAHOO.util.Event.addListener(this.element,"mouseover",this.linkHandler,this,true);YAHOO.util.Event.addListener(this.element,"focus",this.linkHandler,this,true);YAHOO.util.Event.addListener(this.element,"click",this.linkHandler,this,true)};YAHOO.EU.Shopping.Filters.prototype.initDOMManipulations=function(F){var D=this.element.getElementsByTagName("span");var G=[];for(var E=0,J;J=D[E];E++){G.push(J)}var L=[];for(var E=0,J;J=G[E];E++){if(J.id&&(J.id.indexOf("encoded-")==0)){var I=document.createElement("a");I.id=J.id;I.href="#";I.innerHTML=J.innerHTML;I.className=J.className;J.parentNode.replaceChild(I,J)}}var A=YAHOO.util.Dom.getElementsByClassName("calendar","li",this.groups);if(A.length){function H(X){var V=X[0];var T=X[1];YAHOO.util.Dom.addClass(V,"calendar-js");var P=document.createElement("div");P.id=V.id+"_cal_container";YAHOO.util.Dom.insertAfter(P,V.getElementsByTagName("h4")[0]);var U=new YAHOO.widget.Calendar("calendar"+V.id,P.id,YAHOO.EU.Shopping.YUICalendarConf);U.cfg.setProperty("title",false);U.cfg.setProperty("close",false);var Z=V.getElementsByTagName("ul")[0];var b=Z.getElementsByTagName("li");U.renderCellDefault=function(e,d){YAHOO.util.Dom.addClass(d,this.Style.CSS_CELL_OOM);YAHOO.util.Dom.removeClass(d,this.Style.CSS_CELL_SELECTABLE);d.innerHTML=e.getDate()};var W=function(e,d){YAHOO.util.Dom.addClass(d,this.Style.CSS_CELL_SELECTABLE);d.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(e)+"</a>";return YAHOO.widget.Calendar.STOP_RENDER};T.calendar_dates={values:[]};for(var S=0;value=b[S];S++){var Y=value.getElementsByTagName("a")[0];if(Y.innerHTML.indexOf("-")==4){T.calendar_dates[Y.innerHTML]=T.calendar_dates.values.length;T.calendar_dates.values.push({date:Y.innerHTML,href:uxDecode64(Y.id.replace("encoded-",""))});var O=Y.innerHTML.split("-");U.addRenderer(O[2]+"/"+O[1]+"/"+O[0],W)}}var R=T.calendar_dates.values[0].date.split("-");var Q=R[2]+"/"+R[1]+"/"+R[0];var a=R[1]+"/"+R[0];R=T.calendar_dates.values[T.calendar_dates.values.length-1].date.split("-");var c=R[2]+"/"+R[1]+"/"+R[0];U.cfg.setProperty("mindate",Q);U.cfg.setProperty("maxdate",c);U.cfg.setProperty("pagedate",a);U.selectEvent.subscribe(YAHOO.EU.Shopping.Filters.prototype.onSelectCalendarDate,T,true);U.render();V.removeChild(Z)}for(var E=0,C;C=A[E];E++){YAHOO.util.Dom.onMethodAvailable("YAHOO.widget.Calendar",H,[C,this],false)}}var N=document.getElementById("filters-bd");var B=document.getElementById("level3");if(N&&!B){N.style.position="relative"}var M=document.getElementById("filters");if(M){YAHOO.util.Event.on("filter-refine-by","click",YAHOO.EU.Shopping.Filters.handleFiltersCollapse,true,true)}var K=YAHOO.util.Dom.getElementsBy(function(){return true},"h4","filters",function(O){YAHOO.util.Event.addListener(O,"click",YAHOO.EU.Shopping.Filters.handleFiltersToggled)})};YAHOO.EU.Shopping.Filters.prototype.leftPadDatePart=function(A){A=A.toString();return(A.length==1)?("0"+A):A};YAHOO.EU.Shopping.Filters.prototype.onSelectCalendarDate=function(){var B=arguments[1][0][0];var A=B[0]+"-"+this.leftPadDatePart(B[1])+"-"+this.leftPadDatePart(B[2]);document.location.href=this.calendar_dates.values[this.calendar_dates[A]].href};YAHOO.EU.Shopping.Filters.updateRemoveFiltersURLs=function(){var A=YAHOO.util.Dom.getElementsByClassName("remove-selected","a","filters");if(A){for(i=0;i<A.length;i++){var B=A[i];B.href=uxDecode64(B.id.replace("encoded-",""))}}};YAHOO.EU.Shopping.Filters.prototype.linkHandler=function(E){var D=YAHOO.util.Event.getTarget(E);if(!D){return }var A=false;if(D.parentNode.tagName.toLowerCase()=="a"){D=D.parentNode;A=true}if(D.nodeName.toLowerCase()=="a"){if(E.type=="click"){if((D.id.indexOf("encoded-")===0)&&(D.getAttribute("href")=="#")){var C=D.innerHTML;D.href=uxDecode64(D.id.replace("encoded-",""));D.innerHTML=C}if(YAHOO.util.Dom.hasClass(D,"more")){YAHOO.util.Event.stopEvent(E);this.onClickFilter(D.href);this.toggleLoadingImage(D);return }var B=D.parentNode;while(B&&(B.id!="filters")){if((B.nodeName.toLowerCase()=="li")&&YAHOO.util.Dom.hasClass(B,"also")){YAHOO.util.Event.stopEvent(E);this.onToggleFilter(D.href);this.toggleLoadingImage(B);return }else{B=B.parentNode}}}}};YAHOO.EU.Shopping.Filters.prototype.onClickFilter=function(A){var C=A;var A=this.appendParamToUrl(A,"retrieveFiltersOnlyGETParameter",true);var D={success:this.onClickFilterSuccess,failure:this.onFilterRxFailure,argument:[C],timeout:5000,scope:this};var B=YAHOO.util.Connect.asyncRequest("GET",A,D)};YAHOO.EU.Shopping.Filters.prototype.onClickFilterSuccess=function(G){var E=document.getElementById("filters");var H=document.getElementById("level-results-page");var A=document.createElement("div");A.innerHTML=G.responseText;A.style.display="none";var B=E.parentNode;B.appendChild(A);var F=document.getElementById("filter-values");var J=null;for(var D=A.firstChild;D;D=D.nextSibling){if(D.id=="level-results-page"){J=D}}if(F!==undefined){var C=document.getElementById(F.className);var I=YAHOO.util.Dom.getElementsBy(function(){return true},"ul",C)[0];F=YAHOO.util.Dom.getElementsBy(function(){return true},"ul",F)[0];C.replaceChild(F,I)}if(J){B.replaceChild(J,E);YAHOO.EU.Shopping.Results.pageResults[0]=new YAHOO.EU.Shopping.Results("level-results-page")}B.removeChild(A)};YAHOO.EU.Shopping.Filters.prototype.toggleLoadingImage=function(B){if(document.getElementById("filter-refine-by")){var C=document.getElementById("filter-refine-by")}else{var C=B}var D=document.getElementById("filter-loading");if(!D){var A=document.createElement("img");A.id="filter-loading";YAHOO.util.Dom.addClass(A,"loading");A.src="http://r6.kelkoo.com/ux/common/loader-small.gif";A.alt=YAHOO.EU.Shopping.locale.loading;A.width=16;A.height=16;C.appendChild(A)}else{if(D&&YAHOO.util.Dom.hasClass(D,"hidden")){YAHOO.util.Dom.removeClass(D,"hidden")}else{if(D&&!YAHOO.util.Dom.hasClass(D,"hidden")){YAHOO.util.Dom.addClass(D,"hidden")}}}};YAHOO.EU.Shopping.Filters.prototype.onToggleFilter=function(A){var C=A;var A=this.appendParamToUrl(A,"retrieveFiltersOnlyGETParameter",true);this.initEvent.fire(YAHOO.EU.Shopping.Filters);this.beforeToggleLastGroupEvent.fire(YAHOO.EU.Shopping.Filters);var D={success:this.onToggleFilterSuccess,failure:this.onFilterRxFailure,argument:[C],timeout:5000,scope:this};var B=YAHOO.util.Connect.asyncRequest("GET",A,D)};YAHOO.EU.Shopping.Filters.prototype.onToggleFilterSuccess=function(C){if(C.status!=200){return false}var E="filters";if(YAHOO.util.Dom.hasClass(this.element,"gen-ter-mod")){E="gen-ter-mod"}var B=document.getElementById("filters");var G=document.createElement("div");G.innerHTML=C.responseText;var F=G.firstChild;while(F){if((F.nodeName.toLowerCase()=="div")&&(F.id=="filters")&&(YAHOO.util.Dom.hasClass(F,E))){break}F=F.nextSibling}if(F){this.toggle_group=null;this.also_group=null;this.groups=null;this.element.innerHTML=F.innerHTML;this.element.className=F.className;this.initElementReferences();this.initDOMManipulations(true);var D="toggled";var A=document.getElementById("filter-refine-by");if(YAHOO.util.Dom.hasClass(A,D)){YAHOO.EU.Shopping.Filters.handleFiltersCollapse(undefined,undefined)}}this.redrawIE6()};YAHOO.EU.Shopping.Filters.prototype.onFilterRxFailure=function(A){if(A.argument&&A.argument[0]!=""){window.location=A.argument[0]}};YAHOO.EU.Shopping.Filters.prototype.appendParamToUrl=function(B,C,A){if(A){C=this.cfg.getProperty(C)}if(B.indexOf("?")!=-1){if(B.charAt(B.length-1)!="?"){B+="&"}}else{B+="?"}return B+C};YAHOO.EU.Shopping.Filters.prototype.redrawIE6=function(){if(YAHOO.env.ua.ie===6){var B=YAHOO.util.Dom.getElementsByClassName("search","div","filters");if(B.length>0){var A=B[0].getElementsByTagName("button");if(A.length>0){A[0].style.display="none";setTimeout(function(){A[0].style.display="inline-block"},0)}}}};YAHOO.EU.Shopping.Filters.postCodeDescription=function(){var D=YAHOO.util.Dom.get("filters-postCode");var A=YAHOO.EU.Shopping.locale.postCodeDescription;if(D&&A){if(D.value==""){D.value=A}D.onclick=function(E){if(this.value==A){this.value=""}};var C=YAHOO.util.Dom.get("form-geolocRefinement");var B=(C)?C:D.parentNode;if(B&&B.tagName=="FORM"){B.onsubmit=function(E){YAHOO.util.Event.preventDefault(E);if(D.value==A){D.value=""}B.submit()}}}};YAHOO.EU.Shopping.Filters.handleFiltersToggled=function(C){var B=YAHOO.util.Event.getTarget(C);var D=B.parentNode;var A="toggled";if(YAHOO.util.Dom.hasClass(D,A)){YAHOO.util.Dom.removeClass(D,A)}else{YAHOO.util.Dom.addClass(D,A)}};YAHOO.EU.Shopping.Filters.handleFiltersCollapse=function(E,A){if(E!==undefined){YAHOO.util.Event.preventDefault(E)}var G="toggled";var C="hide";var D=document.getElementById("filter-refine-by");var B=document.getElementById("filters-bd");var F=document.getElementById("filters-info");if(D&&B&&F){if(YAHOO.util.Dom.hasClass(D,G)){YAHOO.util.Dom.removeClass(D,G);D.blur()}else{YAHOO.util.Dom.addClass(D,G)}if(YAHOO.util.Dom.hasClass(B,C)){YAHOO.util.Dom.removeClass(B,C)}else{YAHOO.util.Dom.addClass(B,C)}if(YAHOO.util.Dom.hasClass(F,C)){YAHOO.util.Dom.removeClass(F,C)}else{YAHOO.util.Dom.addClass(F,C)}}};YAHOO.util.Event.onContentReady("filters",function(){var A=document.getElementById("filters");if(!YAHOO.util.Dom.hasClass(A,"most-pop-cats")){YAHOO.EU.Shopping.Filters.pageFilters.push(new YAHOO.EU.Shopping.Filters(document.getElementById("filters")));YAHOO.EU.Shopping.Filters.updateRemoveFiltersURLs();YAHOO.EU.Shopping.Filters.postCodeDescription()}});YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.Results=function(B,A){YAHOO.EU.Shopping.Results.superclass.constructor.call(this,B,A)};YAHOO.extend(YAHOO.EU.Shopping.Results,YAHOO.widget.Module);YAHOO.EU.Shopping.Results.pageResults=[];YAHOO.EU.Shopping.Results.prototype.init=function(B,A){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var D=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.Results.prototype.init");var C=-1}YAHOO.EU.Shopping.Results.superclass.init.call(this,B);this.beforeInitEvent.fire(YAHOO.EU.Shopping.Results);if(A){this.cfg.applyConfig(A,true)}this.initElementReferences();this.initDOMEventListeners();this.initDOMManipulations();this.initEvent.fire(YAHOO.EU.Shopping.Results);if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(D,C)}};YAHOO.EU.Shopping.Results.prototype.initEvents=function(){YAHOO.EU.Shopping.Results.superclass.initEvents.call(this);this.beforeSubmitViewTypeFormEvent=new YAHOO.util.CustomEvent("beforeSubmitViewTypeForm",this)};YAHOO.EU.Shopping.Results.prototype.initDefaultConfig=function(){YAHOO.EU.Shopping.Results.superclass.initDefaultConfig.call(this);this.cfg.addProperty("shortDetailsLength",{value:70});this.cfg.addProperty("shortDetailsLength-holidays_hotel",{value:160});this.cfg.addProperty("shortDetailsLength-hotel_kelkoo",{value:80})};YAHOO.EU.Shopping.Results.prototype.initElementReferences=function(){this.form=this.element.getElementsByTagName("form")[0]};YAHOO.EU.Shopping.Results.prototype.initDOMEventListeners=function(){YAHOO.util.Event.addListener(this.element,"click",this.onClick,this,true);var C=this.element.getElementsByTagName("form")[1]||undefined;if(C){YAHOO.util.Event.addListener(this.element.getElementsByTagName("form")[1],"submit",this.onSubmitCompareForm,this,true);var A=C.getElementsByTagName("input");for(var D=0,B;B=A[D];D++){if(B.getAttribute("type")=="checkbox"){YAHOO.util.Event.addListener(B,"click",this.onCheckCompareForm,C,true)}}}};YAHOO.EU.Shopping.Results.prototype.onClick=function(W){var Y=YAHOO.util.Event.getTarget(W);if((Y.nodeName.toLowerCase()=="input")&&(YAHOO.util.Dom.hasClass(Y,"date"))){YAHOO.util.Event.stopEvent(W);var D=YAHOO.util.Dom.getRegion(Y);this.calendar.show();this.calendar.text_field=Y;var F=Y;while(F.tagName.toLowerCase()!="form"){F=F.parentNode}var C=F.getElementsByTagName("input");var O=null;var V=null;for(var U=0,L;L=C[U];U++){if(YAHOO.util.Dom.hasClass(L,"from")){O=L}if(YAHOO.util.Dom.hasClass(L,"to")){V=L}}if(YAHOO.util.Dom.hasClass(Y,"from")&&(V!=null)){var E=V.value.split("/");if(E.length==3){var I=E[0]+"/"+E[1]+"/"+E[2];this.calendar.cfg.setProperty("mindate",new Date())}}if(YAHOO.util.Dom.hasClass(Y,"to")&&(O!=null)){var E=O.value.split("/");if(F.catId&&F.catId.value=="170701"&&E.length==3){var B=E[0]+"/"+E[1]+"/"+E[2];var M=new Date(E[2],E[1]-1,E[0]);M.setDate(M.getDate()+1);this.calendar.cfg.setProperty("mindate",M)}else{if(E.length==3){var B=E[0]+"/"+E[1]+"/"+E[2];this.calendar.cfg.setProperty("mindate",B)}}}if(Y.value.length){var E=Y.value.split("/");if(E.length==3){var A=E[0]+"/"+E[1]+"/"+E[2];this.calendar.cfg.setProperty("selected",A);this.calendar.cfg.setProperty("pagedate",E[1]+"/"+E[2])}}this.calendar.render();var X=document.getElementById("calendar_container");X.style.position="absolute";YAHOO.util.Dom.setXY(X,[D.left,D.bottom]);if(YAHOO.util.Dom.isAncestor("action-zoom-container",Y)){YAHOO.util.Event.removeListener("calendar_container","mouseover");YAHOO.util.Event.addListener("calendar_container","mouseover",YAHOO.EU.Shopping.Utils.ZoomManagement.manageLayer,{offerId:YAHOO.EU.Shopping.Utils.ZoomManagement.extendedShown});var N=YAHOO.util.Dom.getElementsByClassName("date-js","input","action-zoom-container");YAHOO.util.Event.removeListener(N,"mouseover");YAHOO.util.Event.addListener(N,"mouseover",YAHOO.EU.Shopping.Utils.ZoomManagement.manageLayer,{offerId:YAHOO.EU.Shopping.Utils.ZoomManagement.extendedShown})}}if(YAHOO.util.Dom.hasClass(Y,"show-hide-details")){YAHOO.util.Event.stopEvent(W);this.showHideDetails(Y)}if(YAHOO.util.Dom.hasClass(Y,"show-hide-dates")){YAHOO.util.Event.stopEvent(W);var S=new RegExp("(show|hide)-dates-(.+)$").exec(Y.id);if(S==null){return }var G=S[2];var T=S[1];var K=(T=="show")?"hide":"show";YAHOO.util.Dom.removeClass(Y,"show-dates");YAHOO.util.Dom.addClass(Y,"hide-dates");YAHOO.util.Dom.removeClass(YAHOO.util.Dom.get(K+"-dates-"+G),"hide-dates");YAHOO.util.Dom.addClass(YAHOO.util.Dom.get(K+"-dates-"+G),"show-dates");YAHOO.util.Dom.removeClass(YAHOO.util.Dom.get("list-dates-"+G),K+"-dates");YAHOO.util.Dom.addClass(YAHOO.util.Dom.get("list-dates-"+G),T+"-dates")}if((Y.tagName.toLowerCase()=="a")&&YAHOO.util.Dom.hasClass(Y.parentNode,"current-view-info")){YAHOO.util.Event.stopEvent(W);if(YAHOO.util.Dom.hasClass(Y,"used")){var R="used"}else{var R="all"}var Q=document.getElementById("results-newused");if(Q){var P=Q.options[0];while(P){if(P.value==R){P.selected=true;break}P=P.nextSibling}Q.form.submit()}}if((Y.tagName.toLowerCase()=="label")&&(Y.htmlFor=="results-view-Details")){var J=YAHOO.util.Dom.getElementsByClassName("show-hide-details");for(var U=0,H;H=J[U];U++){this.showHideDetails(H)}}};YAHOO.EU.Shopping.Results.prototype.onSubmitCompareForm=function(H){var C=0;var F=0;var G=YAHOO.util.Event.getTarget(H);var A=G.getElementsByTagName("input");for(var E=0,B;B=A[E];E++){if(B.getAttribute("type")=="checkbox"){C++;if(B.checked){F++}}}if(C>0&&F<2){YAHOO.util.Event.stopEvent(H);var D=G.getElementsByTagName("button");YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(D[0],YAHOO.EU.Shopping.locale.minProductsToCompare,"compare-min-error");YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(D[1],YAHOO.EU.Shopping.locale.minProductsToCompare,"compare-min-error-2");return false}return true};YAHOO.EU.Shopping.Results.prototype.onCheckCompareForm=function(G,B){var E=0;var A=0;var H=YAHOO.util.Event.getTarget(G);if(H.checked){var F=B.getElementsByTagName("input");for(var D=0,I;I=F[D];D++){if(I.getAttribute("type")=="checkbox"){E++;if(I.checked){A++}}}var C=B.getAttribute("max_compare");if(A>C){YAHOO.log("superieur a max");YAHOO.util.Event.stopEvent(G);H.checked=false;var J=YAHOO.EU.Shopping.locale.maxProductsToCompare.replace("MAX_COMPARE",C);YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(H.parentNode,J,"compare-max-error");return false}return true}};Date.prototype.getFullDate=function(){var A=this.getDate();var B=A;if(A<10){B="0"+A}return B};Date.prototype.getFullMonth=function(){var B=this.getMonth()+1;var A=B;if(B<10){A="0"+B}return A};YAHOO.EU.Shopping.Results.prototype.exportCalendarIntoTextField=function(A,C){var B=null;if(YAHOO.EU.Shopping.YUICalendarConf.MDY_DAY_POSITION<YAHOO.EU.Shopping.YUICalendarConf.MDY_MONTH_POSITION){B=A.getFullDate()+YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+A.getFullMonth()}else{B=A.getFullMonth()+YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+A.getFullDate()}if(YAHOO.EU.Shopping.YUICalendarConf.MDY_YEAR_POSITION==3){B+=YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+A.getFullYear()}else{B=+YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+A.getFullYear()}C.value=B};YAHOO.EU.Shopping.Results.prototype.onCalendarDateSelected=function(M,L,F){var A=L[0];var B=A[0];var N=B[0],K=B[1],O=B[2];var I=new Date();I.setFullYear(N,K-1,O);YAHOO.EU.Shopping.Results.prototype.exportCalendarIntoTextField(I,this.calendar.text_field);this.calendar.hide();var Q=document.getElementById(this.calendar.text_field.id);while(Q.tagName.toLowerCase()!="form"){if(!Q.parentNode){return }Q=Q.parentNode}var H=Q.getElementsByTagName("input");var E=null;var C=null;for(var D=0,P;P=H[D];D++){if(YAHOO.util.Dom.hasClass(P,"from")){E=P}if(YAHOO.util.Dom.hasClass(P,"to")){C=P}}if(YAHOO.util.Dom.hasClass(this.calendar.text_field,"from")&&(C!=null)){var G=new Date();G.setFullYear(N,K-1,O+5);YAHOO.EU.Shopping.Results.prototype.exportCalendarIntoTextField(G,C);var J=new YAHOO.util.ColorAnim(C,{backgroundColor:{to:"#FFF",from:"#FFFF00"}},1,YAHOO.util.Easing.easeIn);J.animate()}};YAHOO.EU.Shopping.Results.prototype.initDOMManipulations=function(){this.initExtendedView();YAHOO.EU.Shopping.PromoToogle.init();YAHOO.EU.Shopping.TextEllipsis.init();if((this.form&&YAHOO.util.Dom.hasClass(this.form,"view-details"))&&(YAHOO.util.Dom.getElementsByClassName("results-flight").length==0)&&(YAHOO.util.Dom.getElementsByClassName("results-hotel").length==0)){YAHOO.util.Dom.addClass(this.form,"view-details-js");var B=this.form.getElementsByTagName("fieldset");if(!B.length){return }if(B.length>=1){var G=B[0].getElementsByTagName("label")}else{var G=B[1].getElementsByTagName("label")}var A=false;for(var F=0,L;L=G[F];F++){var D=document.getElementById(L.htmlFor);if(D&&D.getAttribute("type")=="radio"){D.style.display="none";if(D.getAttribute("checked")=="checked"){D.checked=true;if(D.id=="results-view-Detailed"){A=true}}if(D.checked){YAHOO.util.Dom.addClass(L,"selected")}}YAHOO.util.Event.addListener(L,"click",this.changeViewType,this,true)}YAHOO.util.Dom.batch(this.form.getElementsByTagName("select"),function(M){YAHOO.util.Event.addListener(M,"change",function(){var N=document.getElementById("results-currentPage");if(N){N.parentNode.removeChild(N)}this.submitViewTypeForm(this)},this,true)},this,true)}var J=false;var H=this.element.getElementsByTagName("input");for(var F=0,K;K=H[F];F++){if(YAHOO.util.Dom.hasClass(K,"date")){YAHOO.util.Dom.addClass(K,"date-js");J=true}}if(J){var C=document.getElementById("calendar_container");if(!C){C=document.createElement("div");C.id="calendar_container";YAHOO.util.Dom.addClass(C,"calendar-container");document.body.appendChild(C)}function I(){this.calendar=new YAHOO.widget.Calendar("calendar","calendar_container",YAHOO.EU.Shopping.YUICalendarConf);this.calendar.cfg.setProperty("title",YAHOO.EU.Shopping.locale.chooseDate+":",false);this.calendar.cfg.setProperty("close",true);this.calendar.cfg.setProperty("mindate",new Date());this.calendar.cfg.setProperty("maxdate",YAHOO.widget.DateMath.add(new Date(),YAHOO.widget.DateMath.DAY,365));this.calendar.selectEvent.subscribe(this.onCalendarDateSelected,this,true);this.calendar.render();C.style.display="none"}YAHOO.util.Dom.onMethodAvailable("YAHOO.widget.Calendar",I,this,true)}var E=YAHOO.util.Dom.getElementsBy(function(N){var M=new RegExp(/^lvl-form-/);return(M.test(N.id))},"form",this.element);if(YAHOO.lang.isArray(E)&&E.length>0){YAHOO.util.Dom.batch(E,function(M){YAHOO.util.Event.addListener(M,"submit",YAHOO.EU.Shopping.Results.validateDateForm)})}};YAHOO.EU.Shopping.Results.prototype.submitViewTypeForm=function(A){if(this.beforeSubmitViewTypeFormEvent.fire(this.form,this)){this.form.submit()}};YAHOO.EU.Shopping.Results.validateDateForm=function(F,E){if(F){var E=YAHOO.util.Event.getTarget(F);YAHOO.util.Event.preventDefault(F)}function B(J,H){var I=new YAHOO.util.ColorAnim(J,{backgroundColor:{to:"#FFF",from:"#FFFF00"}},4,YAHOO.util.Easing.easeIn);I.animate();alert(H)}var D=false;if(E.departureDate&&!YAHOO.EU.Shopping.validate.isDate(E.departureDate.value)){B(E.departureDate,YAHOO.EU.Shopping.locale.wrongDateFormat)}else{D=true}var G=YAHOO.widget.DateMath.getDate(E.departureDate.value);if(E.returnDate){var A=E.returnDate.value;if(D&&(!A||!YAHOO.EU.Shopping.validate.isDate(A))){B(E.returnDate,YAHOO.EU.Shopping.locale.wrongDateFormat);D=false}A=YAHOO.widget.DateMath.getDate(A);if(D&&(G.toString()!=A.toString())&&!YAHOO.widget.DateMath.before(G,A)){B(E.returnDate,YAHOO.EU.Shopping.locale.returnDateBeforeDeparture);D=false}if(D&&E.catId&&E.catId.value=="170701"&&G.toString()==A.toString()){B(E.returnDate,YAHOO.EU.Shopping.locale.returnDateEqualsDeparture);D=false}}if(D&&!G){B(E.departureDate,YAHOO.EU.Shopping.locale.wrongDateFormat);D=false}var C=new Date();C.setHours(0);C.setMinutes(0);C.setSeconds(0);C.setMilliseconds(0);if(D&&YAHOO.widget.DateMath.before(G,C)){B(E.departureDate,YAHOO.EU.Shopping.locale.departureDateBeforeToday);D=false}if(D){E.submit()}else{return false}};YAHOO.EU.Shopping.Results.prototype.submitViewTypeForm=function(A){if(this.beforeSubmitViewTypeFormEvent.fire(this.form,this)){this.form.submit()}};YAHOO.EU.Shopping.Results.validateDateForm=function(F,E){if(F){var E=YAHOO.util.Event.getTarget(F);YAHOO.util.Event.preventDefault(F)}function B(J,H){var I=new YAHOO.util.ColorAnim(J,{backgroundColor:{to:"#FFF",from:"#FFFF00"}},4,YAHOO.util.Easing.easeIn);I.animate();alert(H)}var D=false;if(E.departureDate&&!YAHOO.EU.Shopping.validate.isDate(E.departureDate.value)){B(E.departureDate,YAHOO.EU.Shopping.locale.wrongDateFormat)}else{D=true}var G=YAHOO.widget.DateMath.getDate(E.departureDate.value);if(E.returnDate){var A=E.returnDate.value;if(D&&(!A||!YAHOO.EU.Shopping.validate.isDate(A))){B(E.returnDate,YAHOO.EU.Shopping.locale.wrongDateFormat);D=false}A=YAHOO.widget.DateMath.getDate(A);if(D&&(G.toString()!=A.toString())&&!YAHOO.widget.DateMath.before(G,A)){B(E.returnDate,YAHOO.EU.Shopping.locale.returnDateBeforeDeparture);D=false}if(D&&E.catId&&E.catId.value=="170701"&&G.toString()==A.toString()){B(E.returnDate,YAHOO.EU.Shopping.locale.returnDateEqualsDeparture);D=false}}if(D&&!G){B(E.departureDate,YAHOO.EU.Shopping.locale.wrongDateFormat);D=false}var C=new Date();C.setHours(0);C.setMinutes(0);C.setSeconds(0);C.setMilliseconds(0);if(D&&YAHOO.widget.DateMath.before(G,C)){B(E.departureDate,YAHOO.EU.Shopping.locale.departureDateBeforeToday);D=false}if(D){E.submit()}else{return false}};YAHOO.EU.Shopping.Results.prototype.initExtendedView=function(){if(YAHOO.EU.Shopping.Flags.extended){YAHOO.util.Dom.getElementsByClassName("extended-view-btn","span","level-results-page",function(A){YAHOO.EU.Shopping.Results.initSingleExtendedView(A)})}};YAHOO.EU.Shopping.Results.initSingleExtendedView=function(A){result=A;while(result!=null&&YAHOO.util.Dom.hasClass(result,"result")==false){result=result.parentNode}if(result!=null){if(!result.onExtendedViewChange){result.onExtendedViewChange=new YAHOO.util.CustomEvent("extended view changing")}YAHOO.util.Event.addListener(A,"click",function(B){YAHOO.util.Event.getTarget(B).blur();YAHOO.EU.Shopping.initCaroussel(this);if(YAHOO.util.Dom.hasClass(this,"extended-view-shown")){YAHOO.util.Dom.replaceClass(this,"extended-view-shown","extended-view-hidden");this.onExtendedViewChange.fire({display:"hide"})}else{if(YAHOO.util.Dom.hasClass(this,"extended-view-hidden")){YAHOO.util.Dom.replaceClass(this,"extended-view-hidden","extended-view-shown");this.onExtendedViewChange.fire({display:"show"})}}YAHOO.util.Event.preventDefault(B)},result,true)}};YAHOO.EU.Shopping.PromoToogle={currentToogle:null,initialized:false,initBodyEvent:function(){YAHOO.util.Event.addListener(document.body,"click",function(B){if(this.currentToogle!==null){var A=YAHOO.util.Event.getTarget(B);while(A!==null&&!(A.nodeName.toLowerCase()=="div"&&YAHOO.util.Dom.hasClass(A,"toogle-content"))){A=A.parentNode}if(A==null){YAHOO.EU.Shopping.PromoToogle.hideToogle()}}});this.initialized=true},hideToogle:function(){YAHOO.util.Dom.removeClass(this.currentToogle,"opened-toogle");YAHOO.util.Dom.addClass(this.currentToogle,"closed-toogle");this.currentToogle=null},showToogle:function(A){if(this.initialized==false){this.initBodyEvent()}this.currentToogle=A;YAHOO.util.Dom.removeClass(A,"closed-toogle");YAHOO.util.Dom.addClass(A,"opened-toogle")},initShowToogle:function(){YAHOO.util.Dom.getElementsByClassName("promo-toogle","div","level-results-page",function(){var A=YAHOO.util.Dom.getElementsByClassName("closed-toogle-link","a",this);for(var B=0;B<A.length;B++){YAHOO.util.Event.addListener(A[B],"click",function(C){YAHOO.EU.Shopping.PromoToogle.showToogle(this);YAHOO.util.Event.stopEvent(C)},this,true)}})},initHideToogle:function(){YAHOO.util.Dom.getElementsByClassName("promo-toogle","div","level-results-page",function(){var B=YAHOO.util.Dom.getElementsByClassName("opened-toogle-link","a",this);for(var A=0;A<B.length;A++){YAHOO.util.Event.addListener(B[A],"click",function(C){YAHOO.EU.Shopping.PromoToogle.hideToogle();YAHOO.util.Event.stopEvent(C)},this,true)}})},initDisplayToogle:function(){YAHOO.util.Dom.getElementsByClassName("promo-toogle","div","level-results-page",function(){YAHOO.util.Dom.setStyle(this,"display","block")})},init:function(){if(YAHOO.EU.Shopping.Flags.promo){this.initDisplayToogle();this.initShowToogle();this.initHideToogle()}}};YAHOO.EU.Shopping.TextEllipsis={init:function(){if(YAHOO.EU.Shopping.Flags.promo){if(this.internalInit()){return null}var A=YAHOO.util.Dom.getElementsByClassName("ellipsis","span","level-results-page");for(var B=0;B<A.length;B++){this.set(A[B])}}},set:function(B){var A=document.createElement("ins");B.appendChild(A);B.__ElipsisCheck=A;var C=document.createElement("var");B.appendChild(C);B.__ElipsisStyle=C.style;this.handleEllipsis.apply(B);B.addEventListener("overflow",this.handleEllipsis,false);B.addEventListener("underflow",this.handleEllipsis,false)},handleEllipsis:function(){var A=this;setTimeout(function(){A.__ElipsisStyle.display=(A.__ElipsisCheck.offsetLeft>=1)?"block":""},100)},internalInit:function(){sTextOverFlow=YAHOO.util.Dom.getStyle(document.body,"textOverflow");if(typeof (sTextOverFlow)=="string"||!document.getBoxObjectFor){for(i in this){delete this[i]}return true}return false}};YAHOO.EU.Shopping.Results.getOfferType=function(B){while(B.parentNode){var C=new RegExp(/offer-([a-z_-]+)/);var A=C.exec(B.className);if(!YAHOO.lang.isNull(A)&&A[1]!="form"){return A[1]}B=B.parentNode}return false};YAHOO.util.Event.addListener(window,"load",function(){YAHOO.EU.Shopping.Results.pageResults.push(new YAHOO.EU.Shopping.Results("level-results-page"))});var openFreeOfferLayer=function(C,G,B,A){var D=document.getElementById("freeOfferLayer");var E=document.getElementById(G);if(B==""){YAHOO.util.Dom.addClass("freeOfferMsg","hide");YAHOO.util.Dom.removeClass("disclamerMsg","hide")}else{YAHOO.util.Dom.removeClass("freeOfferMsg","hide");YAHOO.util.Dom.addClass("disclamerMsg","hide");YAHOO.util.Dom.getElementsByClassName("last-update-date",null,D,function(){this.innerHTML=B})}if((A!="grid")&&(D.clientHeight<(E.clientHeight-25))){YAHOO.util.Dom.setStyle(D,"height",(E.clientHeight-25)+"px")}else{YAHOO.util.Dom.setStyle(D,"height","auto")}YAHOO.util.Dom.getElementsByClassName("cta",null,D,function(){this.setAttribute("href","javascript:uxViewLink('"+C+"', true);")});var F=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.removeClass(D,"hide");if(A=="grid"){YAHOO.util.Dom.setXY(D,[F[0]+20,F[1]+160])}else{YAHOO.util.Dom.setXY(D,[F[0]+110,F[1]+10])}YAHOO.util.Dom.getElementsByClassName("close",null,D,function(){this.onclick=function(){YAHOO.util.Dom.addClass(D,"hide");return false}})};YAHOO.namespace("YAHOO.EU.Shopping.Utils");YAHOO.EU.Shopping.Utils.ZoomManagement={currentSmallImage:null,currentZoom:null,currentOffer:0,previousOffer:0,zoomOffer:0,zoomShown:false,extendedShown:0,extendedBlocked:false,isImageLoadingOk:false,maxImageWidth:500,maxImageHeight:500,limitWidth:353,defaultImageWidth:90,defaultImageHeight:90,offsetPointerY:37,offsetExtendedPointerY:6,offsetLayerX:100,offsetLayerY:15,displayLimit:100,zoomFailureTimeOut:null,extendedTimeOut:null,extendedTimeOutDuration:1000,loadingImage:"http://r6.kelkoo.com/ux/travel/loading.gif",dropDown:null,init:function(){var E=YAHOO.EU.Shopping.Utils.ZoomManagement;if(document.getElementById("product-overlay")!==null){var F=null;var D=null;var B=0;if(document.getElementById("l3-photo")!==null){F=YAHOO.util.Dom.getElementsByClassName("carousel-zoom","div","l3-photo");for(B=0;B<F.length;B++){if(F[B].childNodes.length>0){D=E.getZoomButton(F[B]);if(D){YAHOO.util.Event.addListener(D,"mouseover",E.manageLayer,{offerId:-2,isFreeOffer:false,isTravelOffer:false})}}}}F=YAHOO.util.Dom.getElementsByClassName("result","li","level-results-page");var C=false;var A=false;if(F.length>0){this.createLayer(D);YAHOO.util.Dom.setStyle("action-zoom-container","visibility","hidden");YAHOO.util.Dom.setStyle("action-zoom-pointer","visibility","hidden");YAHOO.util.Event.addListener(document.getElementsByTagName("html")[0],"mouseover",E.bodyOn,{offerId:-1,isFreeOffer:false,isTravelOffer:false})}for(B=0;B<F.length;B++){if(F[B].childNodes.length>0){A=false;if(YAHOO.util.Dom.hasClass(F[B],"offer-freeoffer")){A=true}C=false;if(YAHOO.util.Dom.hasClass(F[B],"offer-flight_kelkoo")||YAHOO.util.Dom.hasClass(F[B],"offer-hotel_kelkoo")||YAHOO.util.Dom.hasClass(F[B],"offer-car_hire_kelkoo")){C=true}if(YAHOO.util.Dom.hasClass(F[B],"product-tile")){YAHOO.util.Event.removeListener(F[B],"mouseover");YAHOO.util.Event.addListener(F[B],"mouseover",E.manageLayer,{offerId:F[B].id,isFreeOffer:A,isTravelOffer:C});YAHOO.util.Event.removeListener(F[B].getChildren,"mouseover")}D=E.getZoomButton(F[B]);if(D){YAHOO.util.Event.removeListener(D,"mouseover");YAHOO.util.Event.addListener(D,"mouseover",E.manageLayer,{offerId:F[B].id,isFreeOffer:A,isTravelOffer:C})}}}}},getImage:function(D){var A=null;if(YAHOO.util.Dom.hasClass(D,"action-zoom")){A=YAHOO.util.Dom.getAncestorByClassName(D,"photo")}else{A=YAHOO.util.Dom.getElementsByClassName("photo",null,D)[0]}var C=YAHOO.util.Dom.getElementsByClassName("carousel","div",A);if(C.length>0){return C[0]}else{var B=YAHOO.util.Dom.getElementsBy(function(){return true},"img",A);if(B.length>0){return B[0]}return null}},getMerchantImageSrc:function(C){var A=C.parentNode.parentNode;var B=YAHOO.util.Dom.getElementsByClassName("merchant-image",null,A);if(B.length>0){return B[0].innerHTML}return null},getZoomButton:function(A){var B=YAHOO.util.Dom.getElementsByClassName("action-zoom",null,A);if(B.length>0){YAHOO.util.Dom.setStyle(B[0],"cursor","pointer");return B[0]}return null},manageLayer:function(E,B){var G=YAHOO.EU.Shopping.Utils.ZoomManagement;var F=YAHOO.util.Event.getTarget(E);var C=B.offerId;var D=YAHOO.util.Dom.hasClass(F,"action-zoom");if(F.title&&(F.title!=="")&&(F.tagName!="ACRONYM")){F.title=""}var I=document.getElementById(C);if(((C==-1)||(C!=G.currentOffer))&&(G.currentOffer!==0)){clearTimeout(G.extendedTimeOut);G.hideLayer();if(!D){G.previousOffer=G.extendedShown}G.extendedShown=0;G.zoomOffer=0;G.zoomShown=false}if(C!=-1){if(G.isLayerNotDisplay(B.offerId)){return null}}if(C!=-1){if(D&&!G.zoomShown&&((G.zoomOffer!=G.currentOffer)||(G.zoomOffer===0))){clearTimeout(G.extendedTimeOut);YAHOO.util.Dom.removeClass(I,"hover");var A=G.getMerchantImageSrc(F);var H=G.getImage(F);if(H&&A){G.currentSmallImage=H;YAHOO.util.Dom.addClass(H,"hover");YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getAncestorByClassName(H,"result"),"hover");if(G.extendedShown===G.currentOffer){G.createLayer(H);G.displayImage(H,A);G.zoomShown=true}else{G.zoomShown=false;G.extendedTimeOut=setTimeout(function(){G.createLayer(H);G.displayImage(H,A);G.zoomShown=true},G.extendedTimeOutDuration)}YAHOO.util.Event.removeListener("product-overlay","mouseover");if((F.tagName!="EM")&&!B.isFreeOffer){YAHOO.util.Event.addListener("product-overlay","mouseover",G.manageLayer,{offerId:C})}else{YAHOO.util.Event.addListener("product-overlay","mouseover",G.hideLayer)}G.zoomOffer=C;G.previousOffer=0}}else{if(!D&&((C!=G.currentOffer)||((C==G.currentOffer)&&(G.extendedBlocked))||(G.zoomOffer==G.currentOffer))){clearTimeout(G.extendedTimeOut);if(B.isFreeOffer&&G.zoomShown){G.hideLayer();G.zoomShown=false}var H=G.getImage(I);G.currentSmallImage=H;YAHOO.util.Dom.removeClass(G.currentSmallImage,"hover");YAHOO.util.Dom.addClass(I,"hover");I.style.display="none";I.style.display="block";if((!B.isFreeOffer)&&((C!=G.extendedShown)||G.zoomShown)){if(G.zoomShown){YAHOO.util.Dom.removeClass(G.currentSmallImage,"hover");G.displayExtended(I,H,B);G.extendedShown=C;G.zoomShown=false}else{G.extendedTimeOut=setTimeout(function(){G.createLayer(H);G.displayExtended(I,H,B);YAHOO.util.Event.removeListener("product-overlay","mouseover");YAHOO.util.Event.addListener("product-overlay","mouseover",G.manageLayer,{offerId:C});G.extendedShown=C},G.extendedTimeOutDuration)}}G.zoomOffer=0}}}if(C==-1){G.currentOffer=0}else{G.currentOffer=C}G.extendedBlocked=false},bodyOn:function(C,D){var A=YAHOO.EU.Shopping.Utils.ZoomManagement;var B=YAHOO.util.Event.getTarget(C);if(A.currentOffer!==0){if(!YAHOO.util.Dom.isAncestor("product-overlay",B)&&!(B.id=="product-overlay")&&!(YAHOO.util.Dom.isAncestor("level-results-page",B)&&YAHOO.util.Dom.hasClass("level-results-page","results-grid")&&(B.parentNode.className!="grid-3"))&&!YAHOO.util.Dom.hasClass(B,"action-zoom")&&!YAHOO.util.Dom.isAncestor("calendar_container",B)&&!(B.id=="calendar_container")){A.manageLayer(C,D)}}},createLayer:function(J){var F=YAHOO.EU.Shopping.Utils.ZoomManagement;var B=document.getElementById("action-zoom-container");var A=document.getElementById("action-zoom-pointer");var K=null;F.isImageLoadingOk=false;clearTimeout(F.zoomFailureTimeOut);if(B===null){B=document.createElement("div");B.id="action-zoom-container";B.className="yui-module yui-overlay";document.getElementById("product-overlay").appendChild(B);YAHOO.util.Dom.setStyle(B,"visibility","hidden");A=document.createElement("div");A.id="action-zoom-pointer";document.getElementById("product-overlay").appendChild(A);var G=document.createElement("span");G.className="action-zoom-left";B.appendChild(G);var C=document.createElement("span");C.className="action-zoom-bottom";G.appendChild(C);var E=document.createElement("span");E.className="action-zoom-top";C.appendChild(E);var D=document.createElement("span");D.className="action-zoom-right";E.appendChild(D);if(F.dropDown===null){F.dropDown=new YAHOO.widget.Overlay(B,{visible:false,monitorresize:true,iframe:true})}}var I=YAHOO.util.Dom.getX(J);YAHOO.util.Dom.setX("action-zoom-container",I+F.offsetLayerX);var H=YAHOO.util.Dom.getY(J);YAHOO.util.Dom.setY("action-zoom-container",H+F.offsetLayerY)},hideLayer:function(){var B=YAHOO.EU.Shopping.Utils.ZoomManagement;B.dropDown.cfg.setProperty("visible",false);YAHOO.util.Dom.removeClass(B.currentOffer,"hover");YAHOO.util.Dom.removeClass(B.extendedShown,"hover");YAHOO.util.Dom.removeClass(B.currentSmallImage,"hover");var A=document.getElementById("calendar_container");if(A){A.style.display="none"}YAHOO.util.Dom.setStyle("action-zoom-container","visibility","hidden");YAHOO.util.Dom.setStyle("action-zoom-pointer","visibility","hidden")},showLayer:function(){YAHOO.EU.Shopping.Utils.ZoomManagement.dropDown.cfg.setProperty("visible",true);YAHOO.util.Dom.setStyle("action-zoom-container","visibility","visible");YAHOO.util.Dom.setStyle("action-zoom-pointer","visibility","visible")},displayImage:function(J,A){var H=YAHOO.EU.Shopping.Utils.ZoomManagement;var K=YAHOO.util.Dom.getX(J);YAHOO.util.Dom.setX("action-zoom-pointer",K+H.defaultImageWidth+2);var I=YAHOO.util.Dom.getY(J);YAHOO.util.Dom.setY("action-zoom-pointer",I+H.offsetPointerY);var L=YAHOO.util.Dom.getElementsByClassName("action-zoom-right","span","action-zoom-container")[0];L.innerHTML="";var E=document.createElement("img");E.id="action-zoom-merchant-image";E.src=H.loadingImage;YAHOO.util.Dom.setStyle(E,"position","relative");YAHOO.util.Dom.setStyle(E,"top","37px");YAHOO.util.Dom.setStyle(E,"left","0px");L.appendChild(E);YAHOO.util.Dom.setStyle(L,"width",H.defaultImageWidth+"px");YAHOO.util.Dom.setStyle(L,"height",H.defaultImageHeight+"px");var G;G=new Image();G.id="action-zoom-merchant-image";G.src=A;if(!G.complete){if(H.extendedShown===0){H.setDropCoords(true,J,H.defaultImageWidth,H.defaultImageHeight)}YAHOO.util.Event.on(G,"load",function(R){H.isImageLoadingOk=true;var P=G.width;var M=G.height;var O=H.calculateDim(P,M,(YAHOO.util.Dom.getAncestorByClassName(J,"third")!==null));if(O[0]!=-1){try{var N=YAHOO.util.Dom.get("action-zoom-merchant-image");N.src=G.src;YAHOO.util.Dom.setStyle(N,"width",(O[0]+"px"));YAHOO.util.Dom.setStyle(N,"height",(O[1]+"px"));YAHOO.util.Dom.setStyle(N,"top","0px");if(O[0]>=H.defaultImageWidth){YAHOO.util.Dom.setStyle(L,"width","auto")}YAHOO.util.Dom.setStyle(L,"height","auto");H.setDropCoords(false,J,O[0],O[1])}catch(Q){}}else{H.isImageLoadingOk=false;H.handleFailure()}})}else{H.isImageLoadingOk=true;var F=G.width;var C=G.height;var D=H.calculateDim(F,C,(YAHOO.util.Dom.getAncestorByClassName(J,"third")!==null));if(D[0]!=-1){try{E.src=G.src;YAHOO.util.Dom.setStyle(E,"width",(D[0]+"px"));YAHOO.util.Dom.setStyle(E,"height",(D[1]+"px"));YAHOO.util.Dom.setStyle(E,"top","0px");if(D[0]>=H.defaultImageWidth){YAHOO.util.Dom.setStyle(L,"width","auto")}YAHOO.util.Dom.setStyle(L,"height","auto");H.setDropCoords(true,J,D[0],D[1])}catch(B){}}else{H.isImageLoadingOk=false;H.handleFailure()}}H.zoomFailureTimeOut=setTimeout(H.handleFailure,5000);H.showLayer();E.style.display="none";E.style.display="block"},displayExtended:function(C,G,A){var D=YAHOO.EU.Shopping.Utils.ZoomManagement;var J=YAHOO.util.Dom.getElementsByClassName("action-zoom-right","span","action-zoom-container")[0];var H=YAHOO.util.Dom.getX(G);YAHOO.util.Dom.setX("action-zoom-pointer",H+D.defaultImageWidth+2);var I=YAHOO.util.Dom.getElementsBy(function(){return true},"h4",C)[0];var F=YAHOO.util.Dom.getY(I);var E=YAHOO.util.Dom.getStyle(I,"padding-top").replace("px","");YAHOO.util.Dom.setY("action-zoom-pointer",(F+(E*1)+D.offsetExtendedPointerY));if(A.offerId!=D.previousOffer){J.innerHTML="";YAHOO.util.Dom.setStyle(J,"width",D.limitWidth+"px");YAHOO.util.Dom.setStyle(J,"height","auto");var B=document.createElement("div");B.className="extended-information-container";B.innerHTML=YAHOO.util.Dom.getElementsByClassName("extended-information-container","div",C)[0].innerHTML;J.appendChild(B);if(A.isTravelOffer){oResults=new YAHOO.EU.Shopping.Results("action-zoom-container");YAHOO.util.Event.removeListener("calendar_container","mouseover");YAHOO.util.Event.addListener("calendar_container","mouseover",D.manageLayer,{offerId:D.extendedShown})}YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName("close","span","action-zoom-container"),"click",D.hideLayer)}D.setDropCoords(true,G,D.limitWidth,(J.offsetHeight+5));D.showLayer()},setDropCoords:function(D,I,B,K){var E=YAHOO.EU.Shopping.Utils.ZoomManagement;var J=YAHOO.util.Dom.getX(I);var H=YAHOO.util.Dom.getY(I);E.dropDown.cfg.setProperty("width",(B+14)+"px");E.dropDown.cfg.setProperty("height",(K+14)+"px");E.dropDown.cfg.setProperty("x",J+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerX);if(K>=(YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageHeight-2*YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerY)){H=(H+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerY)}else{H=(H+((YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageHeight-K)/2-5))}var C=YAHOO.util.Dom.getDocumentScrollTop();var M=YAHOO.util.Dom.getDocumentScrollTop()+YAHOO.util.Dom.getViewportHeight();var F=H;var G=H+K;if(F<C){H=(H-F+C+10)}else{if(G>M){H=(H-G+M-15)}}E.dropDown.cfg.setProperty("y",H);var A=document.getElementById("action-zoom-pointer");var L=YAHOO.util.Dom.getY(A);if(L<(H+10)){YAHOO.util.Dom.setY(A,(H+10))}else{if(L>(H+K-30)){YAHOO.util.Dom.setY(A,(H+K-30))}}if(D){E.dropDown.cfg.setProperty("visible",true)}},isLayerNotDisplay:function(A){var E=YAHOO.EU.Shopping.Utils.ZoomManagement;var D=document.getElementById(A);if(D===null){return false}var B=YAHOO.util.Dom.getDocumentScrollTop();var G=YAHOO.util.Dom.getDocumentScrollTop()+YAHOO.util.Dom.getViewportHeight();var F=YAHOO.util.Dom.getY(D);var C=F+D.offsetHeight;if(((F+E.displayLimit)>G)||((C-E.displayLimit)<B)){YAHOO.util.Dom.removeClass(E.currentOffer,"hover");YAHOO.util.Dom.addClass(D,"hover");E.currentOffer=A;E.extendedBlocked=true;return true}return false},calculateDim:function(D,A,C){var B=1;if(D<YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageWidth&&A<YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageHeight){return[-1,-1]}if(C&&(D>YAHOO.EU.Shopping.Utils.ZoomManagement.limitWidth)){B=YAHOO.EU.Shopping.Utils.ZoomManagement.limitWidth/D;D=YAHOO.EU.Shopping.Utils.ZoomManagement.limitWidth;A=A*B}if(D>YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageWidth){B=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageWidth/D;D=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageWidth;A=A*B}if(A>YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageHeight){B=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageHeight/A;A=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageHeight;D=D*B}return[D,A]},handleFailure:function(){if(!YAHOO.EU.Shopping.Utils.ZoomManagement.isImageLoadingOk){var D=YAHOO.EU.Shopping.Utils.ZoomManagement.currentSmallImage;var C=YAHOO.EU.Shopping.Utils.ZoomManagement.currentZoom;var B=document.getElementById("action-zoom-merchant-image");B.src=D.src;B.width=D.width;B.height=D.height;YAHOO.util.Dom.setStyle(B,"top","0px");var A=YAHOO.util.Dom.getX(D);YAHOO.util.Dom.setX("action-zoom-container",A+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerX);var E=YAHOO.util.Dom.getY(D);YAHOO.util.Dom.setY("action-zoom-container",E+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerY);contentSpan=YAHOO.util.Dom.getElementsByClassName("action-zoom-right","span","action-zoom-container")[0];if(B.width>=YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageWidth){YAHOO.util.Dom.setStyle(contentSpan,"width","auto")}YAHOO.util.Dom.setStyle(contentSpan,"height","auto");YAHOO.EU.Shopping.Utils.ZoomManagement.setDropCoords(null,true,D,D.width,D.height)}}};YAHOO.util.Event.onDOMReady(function(){if(YAHOO.EU.Shopping.Flags.zoom){YAHOO.EU.Shopping.Utils.ZoomManagement.init()}});YAHOO.namespace("YAHOO.EU.Shopping");(function(){YAHOO.EU.Shopping.Carousel=function(B){var D=YAHOO.util.Dom.getElementsByClassName("img-list","ul",B);D=D[0];this.imageList=[];for(var C=0;C<D.childNodes.length;C++){if(D.childNodes[C].nodeType==1){this.imageList.push(D.childNodes[C].childNodes[0].nodeValue)}}this.loadInitialItems.context=this;YAHOO.EU.Shopping.Carousel.superclass.constructor.call(this,YAHOO.util.Dom.generateId(YAHOO.util.Dom.getElementsByClassName("carousel-component","div",B)[0],"yui-gen-carousel-"),{numVisible:1,animationSpeed:0.25,scrollInc:1,navMargin:0,firstVisible:1,wrap:true,size:this.imageList.length,prevElement:YAHOO.util.Dom.getElementsByClassName("previous","span",B),nextElement:YAHOO.util.Dom.getElementsByClassName("next","span",B),loadInitHandler:this.loadInitialItems,loadNextHandler:this.loadNextItems,loadPrevHandler:this.loadPrevItems,prevButtonStateHandler:this.handlePrevButtonState});var A=B;while(A!==null&&YAHOO.util.Dom.hasClass(A,"result")===false){A=A.parentNode}if(A!==null&&!A.onExtendedViewChange){A.onExtendedViewChange=new YAHOO.util.CustomEvent(this);A.onExtendedViewChange.subscribe(function(E,F){if(F[0].display=="show"){E.show()}})}};YAHOO.extend(YAHOO.EU.Shopping.Carousel,YAHOO.extension.Carousel,{_loadAll:true,_width:130,_height:130,loadInitialItems:function(D,A){if(YAHOO.util.Dom.hasClass(this.carouselList,"carousel_16_9")){this._width=120;this._height=90}var E=A[0];this.load(E);if(this._loadAll){var C=this.getProperty("size");for(var B=E+1;B<=C;B++){this.load(B)}}else{this.load(E+1)}this.updateIcons()},loadNextItems:function(B,A){var D=A[0];var C=A[2];if(!C){this.load(D)}this.updateIcons();this.updateZoomImage();this.load(D+1)},loadPrevItems:function(B,A){var D=A[0];var C=A[2];if(!C){this.load(D)}this.updateIcons();this.updateZoomImage()},handlePrevButtonState:function(D,B){var C=B[0];var A=B[1][0];if(C){YAHOO.util.Dom.removeClass(A,"inactive")}else{YAHOO.util.Dom.addClass(A,"inactive")}},fmtItem:function(B){var A='<div><img src="'+B+'" width="'+this._width+'" height="'+this._height+'"/></div>';return A},updateIcons:function(){var A=this.getLastVisible();var C=YAHOO.util.Dom.getElementsByClassName("position","span",this.carouselElem);for(var B=0;B<C.length;B++){if(B==(A-1)){YAHOO.util.Dom.addClass(C[B],"active")}else{YAHOO.util.Dom.removeClass(C[B],"active")}}},updateZoomImage:function(){var A=YAHOO.util.Dom.getElementsByClassName("merchant-image","span",this.carouselElem);if(A.length>0){A[0].innerHTML=this.imageList[this.getLastVisible()-1]}},load:function(A){if(this.imageList[A-1]!==null){this.addItem(A,this.fmtItem(this.imageList[A-1]))}}});YAHOO.EU.Shopping.initCaroussel=function(A){if(YAHOO.EU.Shopping.Flags.carousel){YAHOO.util.Dom.getElementsByClassName("carousel","div",A,function(D){if(!YAHOO.util.Dom.hasClass(D,"available")){YAHOO.util.Dom.setStyle(D,"display","block");var B=new YAHOO.EU.Shopping.Carousel(D);YAHOO.util.Dom.addClass(D,"available");var C=D.parentNode;YAHOO.util.Dom.getElementsByClassName("extended-photo","a",C,function(E){YAHOO.util.Dom.setStyle(E,"display","none")})}})}};YAHOO.util.Event.onDOMReady(function(){var A=document.getElementById("l3-photo");if(A){YAHOO.EU.Shopping.initCaroussel(A)}})})();YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.ProductDetailOverlay=function(){};YAHOO.EU.Shopping.ProductDetailOverlay.prototype={getIdFromClass:function(E,B){var C=E+"-(\\S+)";var D=new RegExp(C);var A=D.exec(B);if(A&&A[1]){return A[1]}return false},init:function(){this.oConfig=YAHOO.EU.Shopping.config.chartsProductOverlay;this.aDomProductLists=YAHOO.util.Dom.get([this.oConfig.delegateId]);if(!this.aDomProductLists||!this.aDomProductLists[0]){return }this.oProductOverlay=new YAHOO.widget.Overlay("product-overlay",{visible:false,constraintoviewport:true,monitorresize:false});this.oDomProductOverlay=document.getElementById("product-overlay");this.bOpen=false;for(var B in this.aDomProductLists){var C=this.aDomProductLists[B];this.iCatId=this.getIdFromClass("cat",C.className);YAHOO.util.Event.addListener(C,"mouseover",this.productDelegate,this,true)}var A=function(D){if(this.bOpen){this.hide(this.oDomTarget,this.showDelayTimeout)}};YAHOO.util.Event.addListener(document.getElementsByTagName("html")[0],"click",A,this,true);YAHOO.util.Event.addListener(this.oDomProductOverlay,"click",function(D,E){YAHOO.util.Event.stopEvent(D)})},productDelegate:function(F,C){YAHOO.util.Event.stopEvent(F);var E=YAHOO.util.Event.getTarget(F);while(E&&!(E.id==this.oConfig.delegateId)){if(YAHOO.util.Dom.hasClass(E,"photo")&&!YAHOO.util.Dom.hasClass(E,"fn")){YAHOO.util.Dom.addClass(E,"active");YAHOO.util.Event.addListener(E,"mouseout",this.hideTimeout,E,this);var B=E.parentNode.parentNode.parentNode;var A=this.getIdFromClass("prod",B.className);var D=this.getIdFromClass("cat",B.className);if(!D){D=this.iCatId}if(this.oDomTarget&&this.oDomTarget!=E){this.hide(this.oDomTarget,this.showDelayTimeout)}this.showDelayTimeout=window.setTimeout(function(){YAHOO.EU.Shopping.ProductDetailOverlay.instance.show(E,A,D)},800);break}else{E=E.parentNode}}},show:function(F,A,E){this.oDomTarget=F;this.oDomProductLink=F.parentnode;if(this.bOpen){return }var C=this;var B={success:C.ajaxSuccess,failure:C.ajaxFailure,scope:C,argument:{sProdId:A}};var D="/ctl/do/asyncCall/ajax-product/?catId="+E+"&pid="+A;this.oConnection=YAHOO.util.Connect.asyncRequest("GET",D,B);this.oProductOverlay.cfg.setProperty("context",[F,"tl","tr"]);this.oProductOverlay.setBody('<div><img class="throbber" src="http://r6.kelkoo.com/ux/globalnav/throbber.gif" alt="Loading&hellip;"></div>');this.oProductOverlay.render(document.body);this.oProductOverlay.show();YAHOO.util.Event.addListener(document.body,"mouseover",this.hideTimeout,F,this);this.bOpen=true},ajaxSuccess:function(B){var C=B.responseText;if(YAHOO.EU.Shopping.Results&&YAHOO.EU.Shopping.Results.pageResults&&YAHOO.EU.Shopping.Results.pageResults[0]){var A=YAHOO.EU.Shopping.Results.pageResults[0].full_descriptions[B.argument.sProdId];if(A){A=A.replace(/<\/?div>/g,"span");C=C.replace("%DESCRIPTION%",A)}else{C=C.replace("<p>%DESCRIPTION%</p>","")}}this.oProductOverlay.setBody(C)},ajaxFailure:function(A){this.oProductOverlay.hide()},hideTimeout:function(D,C){if(!this.bOpen){window.clearTimeout(this.showDelayTimeout);YAHOO.util.Dom.removeClass(C,"active");return }var B=YAHOO.util.Event.getTarget(D);if(C!=B&&this.oDomProductOverlay!=B){return }var A=window.setTimeout(function(){YAHOO.EU.Shopping.ProductDetailOverlay.instance.hide(C,this.showDelayTimeout)},700);YAHOO.util.Event.addListener(C,"mouseover",this.cancelHide,{hideDelayTimeout:A,oDomTarget:C},this);YAHOO.util.Event.addListener(this.oDomProductOverlay,"mouseover",this.cancelHide,{hideDelayTimeout:A,oDomTarget:C},this)},cancelHide:function(A,B){YAHOO.util.Event.stopEvent(A);YAHOO.util.Event.removeListener(B.oDomTarget,"mouseout",this.cancelHide);YAHOO.util.Event.removeListener(this.oDomProductOverlay,"mouseout",this.cancelHide);window.clearTimeout(B.hideDelayTimeout)},hide:function(A,B){if(this.oConnection&&YAHOO.util.Connect.isCallInProgress(this.oConnection)){YAHOO.util.Connect.abort(this.oConnection)}window.clearTimeout(B);this.oProductOverlay.hide();YAHOO.util.Event.purgeElement(A);YAHOO.util.Event.purgeElement(this.oDomProductOverlay);YAHOO.util.Dom.removeClass(A,"active");YAHOO.util.Dom.addClass(this.oDomProductLink,"active");this.bOpen=false}};YAHOO.EU.Shopping.ProductDetailOverlay.instance=new YAHOO.EU.Shopping.ProductDetailOverlay();YAHOO.util.Event.addListener(window,"load",function(){YAHOO.EU.Shopping.ProductDetailOverlay.instance.init()},YAHOO.EU.Shopping.ProductDetailOverlay.instance,true);YAHOO.namespace("YAHOO.EU.Shopping.Stores");YAHOO.EU.Shopping.Stores.Finder={init:function(){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var K=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.Stores.Finder.init");var A=1}var E=document.getElementById("themed-nav-hub");if(!E){A=-1;if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(K,A)}return false}var H=E.getElementsByTagName("h3");var I=E.getElementsByTagName("ul")[0];var B=document.createElement("ul");YAHOO.util.Dom.addClass(B,"side-menu");YAHOO.util.Dom.addClass(E,"js");for(var G=0,J=H.length;G<J;G++){var M=H[G].parentNode;YAHOO.util.Dom.addClass(M,"js-themed-li");var F=document.createElement("li");var D=document.createElement("a");D.innerHTML=H[G].innerHTML;F.appendChild(D);B.appendChild(F);var L=function(R,S){var T=S[0];var O=S[1];var N=S[2].getElementsByTagName("a");var Q=S[3];for(var P=0;N[P];P++){YAHOO.util.Dom.removeClass(N[P],"active");YAHOO.util.Dom.removeClass(Q[P].parentNode,"active")}YAHOO.util.Dom.addClass(T,"active");YAHOO.util.Dom.addClass(O,"active")};if(G==0){YAHOO.util.Dom.addClass(D,"active");YAHOO.util.Dom.addClass(M,"active");YAHOO.util.Dom.addClass(D.parentNode,"first")}if(G==(J-1)){YAHOO.util.Dom.addClass(D.parentNode,"last")}var C=[D,M,B,H];YAHOO.util.Event.addListener(D,"click",L,C)}E.insertBefore(B,I);if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(K,A)}}};YAHOO.EU.Shopping.Stores.productSearch=function(B){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var E=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.Stores.productSearch");var C=-1}var D=document.getElementById("store-ser");if(D.value==""){C=1;YAHOO.util.Event.stopEvent(B);if(!document.getElementById("merchant-search-error")){var A=document.createElement("span");A.id="merchant-search-error";A.appendChild(document.createTextNode(YAHOO.EU.Shopping.locale.merchantSearchError));YAHOO.util.Dom.insertBefore(A,D)}}if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(E,C)}};YAHOO.util.Event.onDOMReady(function(){if(YAHOO.EU.Shopping.Flags.storeSearch){YAHOO.EU.Shopping.Stores.Finder.init();var A=document.getElementById("store-ser");if(A){YAHOO.util.Event.addListener(A.form,"submit",YAHOO.EU.Shopping.Stores.productSearch)}}});YAHOO.namespace("YAHOO.EU.Shopping.FormValidation.Abuse");YAHOO.EU.Shopping.FormValidation.Abuse={addErrorMsg:function(C,A){var B=document.createElement("p");YAHOO.util.Dom.addClass(B,"error");B.innerHTML=A;if(!C.nextSibling.nodeType!=1){C.parentNode.appendChild(B)}else{C.insertBefore(B,C.nextSibling)}},onsubmit:function(E){var C=document.getElementById("abuseForm");var B=YAHOO.util.Dom.getElementsByClassName("error","p",C);if(B.length>0){YAHOO.util.Dom.batch(B,function(F){F.parentNode.removeChild(F)})}var D=true;var A=/.+\@.+\..+/;if(C.email&&!A.test(C.email.value)){D=false;YAHOO.EU.Shopping.FormValidation.Abuse.addErrorMsg(C.email,YAHOO.EU.Shopping.locale.emailErrorMsg)}if(C.subject&&C.subject.value=="reviews.abuse.form.option.choose"){D=false;YAHOO.EU.Shopping.FormValidation.Abuse.addErrorMsg(C.subject,YAHOO.EU.Shopping.locale.subjectErrorMsg)}if(C.feedback&&C.feedback.value==""){D=false;YAHOO.EU.Shopping.FormValidation.Abuse.addErrorMsg(C.feedback,YAHOO.EU.Shopping.locale.feedbackErrorMsg)}if(!D){YAHOO.util.Event.stopEvent(E)}},init:function(){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var C=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.FormValidation.Abuse.init");var B=-1}var A=document.getElementById("abuseForm");if(A){B=1;YAHOO.util.Event.addListener(A,"submit",YAHOO.EU.Shopping.FormValidation.Abuse.onsubmit)}if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(C,B)}}};YAHOO.util.Event.onDOMReady(function(){if(YAHOO.EU.Shopping.Flags.reportAbuse){YAHOO.EU.Shopping.FormValidation.Abuse.init()}});function kk_updateSearchForm(B,A){A=unescape(A);if(B){if(B.type=="text"||B.type=="hidden"){B.value=kk_decodeParams(A)}else{if(B.type=="select-one"){for(i=0;i<B.length;i++){if(B.options[i].value==A){B.selectedIndex=i}}}else{if(B.type=="checkbox"){B.checked=true}else{if(B[0]){for(i=0;i<B.length;i++){if(B[i].value==A){B[i].checked=true}}}}}}}}function kk_decodeParams(A){var B=A;while(B.indexOf("&#39;")>-1){B=B.replace("&#39;","'")}while(B.indexOf("&quot;")>-1){B=B.replace("&quot;",'"')}while(B.indexOf("&#34;")>-1){B=B.replace("&#34;",'"')}while(B.indexOf("&amp;")>-1){B=B.replace("&amp;","&")}return B}(function(){YAHOO.namespace("YAHOO.EU.Shopping.TUX");YAHOO.EU.Shopping.TUX.ResultsUI=function(A,I){var B;var D;var C=0;var F="";var H=this;function G(J,K){if(YAHOO.lang.isString(J)){this.oResultsContainer=document.getElementById(J)}else{this.oResultsContainer=J}if(this.oResultsContainer.nodeName.toUpperCase()=="OL"){B=oResultsContainer}else{B=document.createElement("OL");oResultsContainer.appendChild(B)}if(YAHOO.lang.isObject(K)){D=K}else{D={}}D.idPrefix=D.idPrefix||"result-";D.template=D.template||"<div>{result-title null}</div>";D.formatters=D.formatters||YAHOO.EU.Shopping.TUX.Utils.Formatters}this.insertResult=function(J,L){var M=E(J);if(YAHOO.EU.Shopping.config.oTUX.iAnimation){M.style.visibility="hidden";M.style.overflow="hidden";M.style.height="1px";YAHOO.util.Dom.setStyle(M,"opacity",0)}if(B.childNodes.length>0&&B.childNodes.length>L){var N=B.childNodes[L];YAHOO.util.Dom.insertBefore(M,N)}else{B.appendChild(M)}YAHOO.util.Dom.getElementsByClassName("extended-view-btn","span",M,function(O){YAHOO.EU.Shopping.Results.initSingleExtendedView(O)});if(YAHOO.EU.Shopping.config.oTUX.iAnimation){var K=new YAHOO.util.Anim(M,{height:{to:100}},0.5,YAHOO.util.Easing.easeOut);K.onComplete.subscribe(function(){M.style.height="auto";var O=new YAHOO.util.Anim(M,{opacity:{from:0,to:1}},0.5,YAHOO.util.Easing.easeIn);O.onStart.subscribe(function(){M.style.visibility="visible"});O.animate();return M});K.animate()}else{return M}};function E(J){var K=document.createElement("DIV");var M=D.idPrefix+J.offerId;if(!document.getElementById(M)){K.id=M;try{K.innerHTML=YAHOO.EU.Shopping.TUX.Utils.renderTemplate(D.template,J,D.formatters);YAHOO.EU.Shopping.TUX.ResultsUI.AirportInfo.enhanceTooltips(K,false,document.getElementById("airportBubble"))}catch(L){}return K.firstChild}else{return false}}this.addResults=function(J){if(YAHOO.lang.isArray(J)){var M=[];var L=B.childNodes.length;var K=0;(function(){start=new Date().getTime();for(;r=J[K];K++){if(YAHOO.lang.isObject(r)){if(!M[K]){M[K]=H.insertResult(r,(L+K))}}if(new Date().getTime()-start>50){setTimeout(arguments.callee,0);break}}})();return M}else{if(YAHOO.lang.isObject(J)){return this.insertResult(J,B.childNodes.length)}else{return false}}};this.removeResult=function(J){var L;if(YAHOO.lang.isObject(J)){L=J.offerId}else{L=J}var K=document.getElementById(D.idPrefix+L);if(K){return K.parentNode.removeChild(K)}else{return false}};this.buildResultsList=function(J){if(YAHOO.lang.isArray(J)){B.innerHTML="";if(this.addResults(J)===false){return false}else{return true}}else{return false}};G(A,I);return this}})();(function(){YAHOO.namespace("YAHOO.EU.Shopping.TUX");YAHOO.EU.Shopping.TUX.ResultsUI.AirportInfo=new function(){function A(B,E){if(B.innerHTML!=undefined&&B.innerHTML!=""&&B.title!=undefined&&B.title!=""&&!YAHOO.util.Dom.hasClass(B,"has-bubble-tooltip")){if(E==undefined){E=document.body}var G=document.createElement("div");var H=B.title;G.className="airport-tooltip";var I=document.createElement("p");var D=document.createElement("dfn");D.appendChild(document.createTextNode(YAHOO.EU.Shopping.locale.airportcode));I.appendChild(D);I.appendChild(document.createTextNode(B.innerHTML+" : "+B.title));G.appendChild(I);G.style.display="none";G.style.position="absolute";YAHOO.util.Dom.addClass(B,"has-bubble-tooltip");E.appendChild(G);function C(){var J=YAHOO.util.Dom.getXY(B);var K=YAHOO.util.Dom.getXY(E);B.title="";G.style.visibility="hidden";G.style.display="block";G.style.top=(J[1]-(K[1]-E.offsetTop)-G.clientHeight)+"px";G.style.left=(J[0]-K[0]+B.offsetWidth)+"px";G.style.visibility="visible"}function F(){B.title=H;G.style.display="none"}YAHOO.util.Event.addListener(B,"mouseover",C);YAHOO.util.Event.addListener(B,"mouseout",F)}}this.enhanceTooltips=function(C,D,E){if(C===undefined){C=document.getElementsByTagName("body")[0]}var F=C.getElementsByTagName("acronym");for(var B=0;B<F.length;B++){A(F[B],E)}};this.enhanceTooltipsOnStartup=function(B){YAHOO.EU.Shopping.TUX.ResultsUI.AirportInfo.enhanceTooltips(undefined,true)}}()})();YAHOO.util.Event.onDOMReady(function(){if(!YAHOO.util.Dom.hasClass(document.getElementById("level-results-page"),"results-grid")){YAHOO.EU.Shopping.TUX.ResultsUI.AirportInfo.enhanceTooltips(undefined,true)}});var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(D){for(var A=0;A<D.length;A++){var B=D[A].string;var C=D[A].prop;this.versionSearchString=D[A].versionSearch||D[A].identity;if(B){if(B.indexOf(D[A].subString)!=-1){return D[A].identity}}else{if(C){return D[A].identity}}}},searchVersion:function(B){var A=B.indexOf(this.versionSearchString);if(A==-1){return }return parseFloat(B.substring(A+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};(function(){YAHOO.util.Event.onDOMReady(function(){if(pageTrackerPerfs!==undefined){try{plend=new Date();plload=plend.getTime()-plstart.getTime();var I=Math.round(plload/100)*100+" ms";var H=document.location.pathname;if(document.location.search){H+=document.location.search}if((YAHOO.util.Dom.getElementsByClassName("offer").length==15)||(YAHOO.util.Dom.getElementsByClassName("catalog").length==15)){var E="";if(H.match(/^.*\/c-(\d+)-.+\.html.*$/gi)){E=H.replace(/^.*\/c-(\d+)-.+\.html.*$/gi,"$1")}else{if(H.match(/^.*\/d-.+-(\d+).*$/gi)){E=H.replace(/^.*\/d-.+-(\d+).*$/gi,"$1")}}var G="";if(H.match(/^.*ss[^-]*-\d*[-]*(.+).html.*$/gi)){G=H.replace(/^.*ss[^-]*-\d*[-]*(.+).html.*$/gi,"$1")}else{if(H.match(/^.*siteSearchQuery=([^&]+).*$/gi)){G=H.replace(/^.*siteSearchQuery=([^&]+).*$/gi,"$1")}}if(E!=""){pageTrackerPerfs._trackPageview("/load times by catId (ms)/"+E+"/"+I)}if(G!=""){pageTrackerPerfs._trackPageview("/load times by query (ms)/"+G+"/"+I)}}var C="other";if(perfsPageType!==undefined){if(perfsPageType.match("l1")){C="L1"}else{if(perfsPageType.match("l2")){C="L2"}else{if(perfsPageType.match("l3")){C="L3"}}}}if(C!="other"){var D="";var K="";var A=YAHOO.util.Dom.getElementsByClassName("view-type","fieldset","level-results-page");if(A.length>0){K=YAHOO.util.Dom.getElementsBy(function(){return true},"input",YAHOO.util.Dom.getElementsByClassName("view-type","fieldset","level-results-page")[0])}if(K.length>0){D=YAHOO.util.Dom.getElementsBy(function(){return true},"input",YAHOO.util.Dom.getElementsByClassName("view-type","fieldset","level-results-page")[0])[0].value}C=C+" "+D}pageTrackerPerfs._trackPageview("/load times by page type (ms)/"+C+"/"+I);if(plload<1000){lc="Very Fast"}else{if(plload<3000){lc="Fast"}else{if(plload<5000){lc="Medium"}else{if(plload<10000){lc="Sluggish"}else{if(plload<20000){lc="Slow"}else{lc="Very Slow"}}}}}pageTrackerPerfs._trackEvent("Page Load (ms)",lc+" pages",H,Math.round(plload));BrowserDetect.init();var F=BrowserDetect.browser;var J=BrowserDetect.version;pageTrackerPerfs._trackEvent("Page Load (ms)",F+" "+J,H,Math.round(plload));if(perfsServerTime!==undefined){var L=Math.round(perfsServerTime/100)*100+" ms";pageTrackerPerfs._trackPageview("/server time (ms)/"+C+"/"+L+"/"+H);pageTrackerPerfs._trackEvent("Server time (ms)",C+" pages",H,Math.round(perfsServerTime))}}catch(B){console.log("Unknown load time"+B)}}else{console.log("No tracker for perfs")}})})();