
(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}if(!owner){}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";
Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);
this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)
},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();
this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)
}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},prop,property;for(prop in this.config){property=this.config[prop];
if(property&&property.event){cfg[prop]=property.value}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined
}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);
return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];
if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true
}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;
if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;
iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);
foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];
qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);
this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)
}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oValue,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]
}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){this.refireEvent(prop)
}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];
property=this.config[key];property.value=value;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];
if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];
if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output
},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output
},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null
}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;
if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());
YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,add:function(date,field,amount){var d=new Date(date.getTime());switch(field){case this.MONTH:var newMonth=date.getMonth()+amount;
var years=0;if(newMonth<0){while(newMonth<0){newMonth+=12;years-=1}}else{if(newMonth>11){while(newMonth>11){newMonth-=12;years+=1}}}d.setMonth(newMonth);d.setFullYear(date.getFullYear()+years);break;case this.DAY:d.setDate(date.getDate()+amount);
break;case this.YEAR:d.setFullYear(date.getFullYear()+amount);break;case this.WEEK:d.setDate(date.getDate()+(amount*7));break}return d},subtract:function(date,field,amount){return this.add(date,field,(amount*-1))
},before:function(date,compareTo){var ms=compareTo.getTime();if(date.getTime()<ms){return true}else{return false}},after:function(date,compareTo){var ms=compareTo.getTime();if(date.getTime()>ms){return true
}else{return false}},between:function(date,dateBegin,dateEnd){if(this.after(date,dateBegin)&&this.before(date,dateEnd)){return true}else{return false}},getJan1:function(calendarYear){return new Date(calendarYear,0,1)
},getDayOffset:function(date,calendarYear){var beginYear=this.getJan1(calendarYear);var dayOffset=Math.ceil((date.getTime()-beginYear.getTime())/this.ONE_DAY_MS);return dayOffset},getWeekNumber:function(date,calendarYear){date=this.clearTime(date);
var nearestThurs=new Date(date.getTime()+(4*this.ONE_DAY_MS)-((date.getDay())*this.ONE_DAY_MS));var jan1=new Date(nearestThurs.getFullYear(),0,1);var dayOfYear=((nearestThurs.getTime()-jan1.getTime())/this.ONE_DAY_MS)-1;
var weekNum=Math.ceil((dayOfYear)/7);return weekNum},isYearOverlapWeek:function(weekBeginDate){var overlaps=false;var nextWeek=this.add(weekBeginDate,this.DAY,6);if(nextWeek.getFullYear()!=weekBeginDate.getFullYear()){overlaps=true
}return overlaps},isMonthOverlapWeek:function(weekBeginDate){var overlaps=false;var nextWeek=this.add(weekBeginDate,this.DAY,6);if(nextWeek.getMonth()!=weekBeginDate.getMonth()){overlaps=true}return overlaps
},findMonthStart:function(date){var start=new Date(date.getFullYear(),date.getMonth(),1);return start},findMonthEnd:function(date){var start=this.findMonthStart(date);var nextMonth=this.add(start,this.MONTH,1);
var end=this.subtract(nextMonth,this.DAY,1);return end},clearTime:function(date){date.setHours(12,0,0,0);return date}};YAHOO.widget.Calendar=function(id,containerId,config){this.init(id,containerId,config)
};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(id,containerId,config){this.initEvents();this.today=new Date();YAHOO.widget.DateMath.clearTime(this.today);this.id=id;this.oDomContainer=document.getElementById(containerId);
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(config){this.cfg.applyConfig(config,true)}this.cfg.fireQueue()};YAHOO.widget.Calendar.prototype.configIframe=function(type,args,obj){var useIframe=args[0];
if(!this.parent){if(YAHOO.util.Dom.inDocument(this.oDomContainer)){if(useIframe){var pos=YAHOO.util.Dom.getStyle(this.oDomContainer,"position");if(pos=="absolute"||pos=="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(type,args,obj){var title=args[0],tDiv;
if(title){this.createTitleBar(title)}else{var close=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);if(!close){this.removeTitleBar()}else{this.createTitleBar("&#160;")}}};YAHOO.widget.Calendar.prototype.configClose=function(type,args,obj){var close=args[0],title=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);
if(close){if(!title){this.createTitleBar("&#160;")}this.createCloseButton()}else{this.removeCloseButton();if(!title){this.removeTitleBar()}}};YAHOO.widget.Calendar.prototype.initEvents=function(){var defEvents=YAHOO.widget.Calendar._EVENT_TYPES;
this.beforeSelectEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT);this.selectEvent=new YAHOO.util.CustomEvent(defEvents.SELECT);this.beforeDeselectEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT);
this.deselectEvent=new YAHOO.util.CustomEvent(defEvents.DESELECT);this.changePageEvent=new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);this.beforeRenderEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
this.renderEvent=new YAHOO.util.CustomEvent(defEvents.RENDER);this.resetEvent=new YAHOO.util.CustomEvent(defEvents.RESET);this.clearEvent=new YAHOO.util.CustomEvent(defEvents.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(e,cal){var cell,index,d,date;
var target=YAHOO.util.Event.getTarget(e);var tagName=target.tagName.toLowerCase();var defSelector=false;while(tagName!="td"&&!YAHOO.util.Dom.hasClass(target,cal.Style.CSS_CELL_SELECTABLE)){if(!defSelector&&tagName=="a"&&YAHOO.util.Dom.hasClass(target,cal.Style.CSS_CELL_SELECTOR)){defSelector=true
}target=target.parentNode;tagName=target.tagName.toLowerCase();if(tagName=="html"){return }}if(defSelector){YAHOO.util.Event.preventDefault(e)}cell=target;if(YAHOO.util.Dom.hasClass(cell,cal.Style.CSS_CELL_SELECTABLE)){index=cell.id.split("cell")[1];
d=cal.cellDates[index];date=new Date(d[0],d[1]-1,d[2]);var link;if(cal.Options.MULTI_SELECT){link=cell.getElementsByTagName("a")[0];if(link){link.blur()}var cellDate=cal.cellDates[index];var cellDateIndex=cal._indexOfSelectedFieldArray(cellDate);
if(cellDateIndex>-1){cal.deselectCell(index)}else{cal.selectCell(index)}}else{link=cell.getElementsByTagName("a")[0];if(link){link.blur()}cal.selectCell(index)}}};YAHOO.widget.Calendar.prototype.doCellMouseOver=function(e,cal){var target;
if(e){target=YAHOO.util.Event.getTarget(e)}else{target=this}while(target.tagName.toLowerCase()!="td"){target=target.parentNode;if(target.tagName.toLowerCase()=="html"){return }}if(YAHOO.util.Dom.hasClass(target,cal.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.addClass(target,cal.Style.CSS_CELL_HOVER)
}};YAHOO.widget.Calendar.prototype.doCellMouseOut=function(e,cal){var target;if(e){target=YAHOO.util.Event.getTarget(e)}else{target=this}while(target.tagName.toLowerCase()!="td"){target=target.parentNode;
if(target.tagName.toLowerCase()=="html"){return }}if(YAHOO.util.Dom.hasClass(target,cal.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.removeClass(target,cal.Style.CSS_CELL_HOVER)}};YAHOO.widget.Calendar.prototype.setupConfig=function(){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;
this.cfg.addProperty(defCfg.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(defCfg.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(defCfg.TITLE.key,{value:defCfg.TITLE.value,handler:this.configTitle});
this.cfg.addProperty(defCfg.CLOSE.key,{value:defCfg.CLOSE.value,handler:this.configClose});this.cfg.addProperty(defCfg.IFRAME.key,{value:defCfg.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});
this.cfg.addProperty(defCfg.MINDATE.key,{value:defCfg.MINDATE.value,handler:this.configMinDate});this.cfg.addProperty(defCfg.MAXDATE.key,{value:defCfg.MAXDATE.value,handler:this.configMaxDate});this.cfg.addProperty(defCfg.MULTI_SELECT.key,{value:defCfg.MULTI_SELECT.value,handler:this.configOptions,validator:this.cfg.checkBoolean});
this.cfg.addProperty(defCfg.START_WEEKDAY.key,{value:defCfg.START_WEEKDAY.value,handler:this.configOptions,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,{value:defCfg.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});
this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key,{value:defCfg.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{value:defCfg.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});
this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key,{value:defCfg.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,{value:defCfg.NAV_ARROW_LEFT.value,handler:this.configOptions});
this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key,{value:defCfg.NAV_ARROW_RIGHT.value,handler:this.configOptions});this.cfg.addProperty(defCfg.MONTHS_SHORT.key,{value:defCfg.MONTHS_SHORT.value,handler:this.configLocale});
this.cfg.addProperty(defCfg.MONTHS_LONG.key,{value:defCfg.MONTHS_LONG.value,handler:this.configLocale});this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,{value:defCfg.WEEKDAYS_1CHAR.value,handler:this.configLocale});
this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,{value:defCfg.WEEKDAYS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,{value:defCfg.WEEKDAYS_MEDIUM.value,handler:this.configLocale});
this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,{value:defCfg.WEEKDAYS_LONG.value,handler:this.configLocale});var refreshLocale=function(){this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key)
};this.cfg.subscribeToConfigEvent(defCfg.START_WEEKDAY.key,refreshLocale,this,true);this.cfg.subscribeToConfigEvent(defCfg.MONTHS_SHORT.key,refreshLocale,this,true);this.cfg.subscribeToConfigEvent(defCfg.MONTHS_LONG.key,refreshLocale,this,true);
this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_1CHAR.key,refreshLocale,this,true);this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_SHORT.key,refreshLocale,this,true);this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_MEDIUM.key,refreshLocale,this,true);
this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_LONG.key,refreshLocale,this,true);this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,{value:defCfg.LOCALE_MONTHS.value,handler:this.configLocaleValues});this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,{value:defCfg.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});
this.cfg.addProperty(defCfg.DATE_DELIMITER.key,{value:defCfg.DATE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key,{value:defCfg.DATE_FIELD_DELIMITER.value,handler:this.configLocale});
this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key,{value:defCfg.DATE_RANGE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,{value:defCfg.MY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});
this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,{value:defCfg.MY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,{value:defCfg.MD_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});
this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,{value:defCfg.MD_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,{value:defCfg.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});
this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,{value:defCfg.MDY_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,{value:defCfg.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});
this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,{value:defCfg.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,{value:defCfg.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});
this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,{value:defCfg.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key,{value:defCfg.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale})
};YAHOO.widget.Calendar.prototype.configPageDate=function(type,args,obj){this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key,this._parsePageDate(args[0]),true)};YAHOO.widget.Calendar.prototype.configMinDate=function(type,args,obj){var val=args[0];
if(YAHOO.lang.isString(val)){val=this._parseDate(val);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key,new Date(val[0],(val[1]-1),val[2]))}};YAHOO.widget.Calendar.prototype.configMaxDate=function(type,args,obj){var val=args[0];
if(YAHOO.lang.isString(val)){val=this._parseDate(val);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key,new Date(val[0],(val[1]-1),val[2]))}};YAHOO.widget.Calendar.prototype.configSelected=function(type,args,obj){var selected=args[0];
var cfgSelected=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;if(selected){if(YAHOO.lang.isString(selected)){this.cfg.setProperty(cfgSelected,this._parseDates(selected),true)}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(cfgSelected)
}};YAHOO.widget.Calendar.prototype.configOptions=function(type,args,obj){this.Options[type.toUpperCase()]=args[0]};YAHOO.widget.Calendar.prototype.configLocale=function(type,args,obj){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;
this.Locale[type.toUpperCase()]=args[0];this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key);this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key)};YAHOO.widget.Calendar.prototype.configLocaleValues=function(type,args,obj){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;
type=type.toLowerCase();var val=args[0];switch(type){case defCfg.LOCALE_MONTHS.key:switch(val){case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(defCfg.MONTHS_SHORT.key).concat();
break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(defCfg.MONTHS_LONG.key).concat();break}break;case defCfg.LOCALE_WEEKDAYS.key:switch(val){case YAHOO.widget.Calendar.ONE_CHAR:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(defCfg.WEEKDAYS_1CHAR.key).concat();
break;case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(defCfg.WEEKDAYS_SHORT.key).concat();break;case YAHOO.widget.Calendar.MEDIUM:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(defCfg.WEEKDAYS_MEDIUM.key).concat();
break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(defCfg.WEEKDAYS_LONG.key).concat();break}var START_WEEKDAY=this.cfg.getProperty(defCfg.START_WEEKDAY.key);if(START_WEEKDAY>0){for(var w=0;
w<START_WEEKDAY;++w){this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift())}}break}};YAHOO.widget.Calendar.prototype.initStyles=function(){var defStyle=YAHOO.widget.Calendar._STYLES;this.Style={CSS_ROW_HEADER:defStyle.CSS_ROW_HEADER,CSS_ROW_FOOTER:defStyle.CSS_ROW_FOOTER,CSS_CELL:defStyle.CSS_CELL,CSS_CELL_SELECTOR:defStyle.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:defStyle.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:defStyle.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:defStyle.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:defStyle.CSS_CELL_TODAY,CSS_CELL_OOM:defStyle.CSS_CELL_OOM,CSS_CELL_OOB:defStyle.CSS_CELL_OOB,CSS_HEADER:defStyle.CSS_HEADER,CSS_HEADER_TEXT:defStyle.CSS_HEADER_TEXT,CSS_BODY:defStyle.CSS_BODY,CSS_WEEKDAY_CELL:defStyle.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:defStyle.CSS_WEEKDAY_ROW,CSS_FOOTER:defStyle.CSS_FOOTER,CSS_CALENDAR:defStyle.CSS_CALENDAR,CSS_SINGLE:defStyle.CSS_SINGLE,CSS_CONTAINER:defStyle.CSS_CONTAINER,CSS_NAV_LEFT:defStyle.CSS_NAV_LEFT,CSS_NAV_RIGHT:defStyle.CSS_NAV_RIGHT,CSS_CLOSE:defStyle.CSS_CLOSE,CSS_CELL_TOP:defStyle.CSS_CELL_TOP,CSS_CELL_LEFT:defStyle.CSS_CELL_LEFT,CSS_CELL_RIGHT:defStyle.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:defStyle.CSS_CELL_BOTTOM,CSS_CELL_HOVER:defStyle.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:defStyle.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:defStyle.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:defStyle.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:defStyle.CSS_CELL_HIGHLIGHT4}
};YAHOO.widget.Calendar.prototype.buildMonthLabel=function(){var pageDate=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);var monthLabel=this.Locale.LOCALE_MONTHS[pageDate.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX;
var yearLabel=pageDate.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return yearLabel+monthLabel}else{return monthLabel+yearLabel
}};YAHOO.widget.Calendar.prototype.buildDayLabel=function(workingDate){return workingDate.getDate()};YAHOO.widget.Calendar.prototype.createTitleBar=function(strTitle){var tDiv=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");
tDiv.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;tDiv.innerHTML=strTitle;this.oDomContainer.insertBefore(tDiv,this.oDomContainer.firstChild);YAHOO.util.Dom.addClass(this.oDomContainer,"withtitle");
return tDiv};YAHOO.widget.Calendar.prototype.removeTitleBar=function(){var tDiv=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(tDiv){YAHOO.util.Event.purgeElement(tDiv);
this.oDomContainer.removeChild(tDiv)}YAHOO.util.Dom.removeClass(this.oDomContainer,"withtitle")};YAHOO.widget.Calendar.prototype.createCloseButton=function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,cssClose=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,DEPR_CLOSE_PATH="us/my/bn/x_d.gif";
var lnk=Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0];if(!lnk){lnk=document.createElement("a");Event.addListener(lnk,"click",function(e,cal){cal.hide();Event.preventDefault(e)},this)
}lnk.href="#";lnk.className="link-close";if(YAHOO.widget.Calendar.IMG_ROOT!==null){var img=Dom.getElementsByClassName(cssClose,"img",lnk)[0]||document.createElement("img");img.src=YAHOO.widget.Calendar.IMG_ROOT+DEPR_CLOSE_PATH;
img.className=cssClose;lnk.appendChild(img)}else{lnk.innerHTML='<span class="'+cssClose+" "+this.Style.CSS_CLOSE+'"></span>'}this.oDomContainer.appendChild(lnk);return lnk};YAHOO.widget.Calendar.prototype.removeCloseButton=function(){var btn=YAHOO.util.Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;
if(btn){YAHOO.util.Event.purgeElement(btn);this.oDomContainer.removeChild(btn)}};YAHOO.widget.Calendar.prototype.renderHeader=function(html){var colSpan=7;var DEPR_NAV_LEFT="us/tr/callt.gif";var DEPR_NAV_RIGHT="us/tr/calrt.gif";
var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)){colSpan+=1}if(this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)){colSpan+=1}html[html.length]="<thead>";
html[html.length]="<tr>";html[html.length]='<th colspan="'+colSpan+'" class="'+this.Style.CSS_HEADER_TEXT+'">';html[html.length]='<div class="'+this.Style.CSS_HEADER+'">';var renderLeft,renderRight=false;
if(this.parent){if(this.index===0){renderLeft=true}if(this.index==(this.parent.cfg.getProperty("pages")-1)){renderRight=true}}else{renderLeft=true;renderRight=true}var cal=this.parent||this;if(renderLeft){var leftArrow=this.cfg.getProperty(defCfg.NAV_ARROW_LEFT.key);
if(leftArrow===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){leftArrow=YAHOO.widget.Calendar.IMG_ROOT+DEPR_NAV_LEFT}var leftStyle=(leftArrow===null)?"":' style="background-image:url('+leftArrow+')"';html[html.length]='<a class="'+this.Style.CSS_NAV_LEFT+'"'+leftStyle+" >&#160;</a>"
}html[html.length]=this.buildMonthLabel();if(renderRight){var rightArrow=this.cfg.getProperty(defCfg.NAV_ARROW_RIGHT.key);if(rightArrow===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){rightArrow=YAHOO.widget.Calendar.IMG_ROOT+DEPR_NAV_RIGHT
}var rightStyle=(rightArrow===null)?"":' style="background-image:url('+rightArrow+')"';html[html.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+rightStyle+" >&#160;</a>"}html[html.length]="</div>\n</th>\n</tr>";
if(this.cfg.getProperty(defCfg.SHOW_WEEKDAYS.key)){html=this.buildWeekdays(html)}html[html.length]="</thead>";return html};YAHOO.widget.Calendar.prototype.buildWeekdays=function(html){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;
html[html.length]='<tr class="'+this.Style.CSS_WEEKDAY_ROW+'">';if(this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key)){html[html.length]="<th>&#160;</th>"}for(var i=0;i<this.Locale.LOCALE_WEEKDAYS.length;
++i){html[html.length]='<th class="calweekdaycell">'+this.Locale.LOCALE_WEEKDAYS[i]+"</th>"}if(this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key)){html[html.length]="<th>&#160;</th>"}html[html.length]="</tr>";
return html};YAHOO.widget.Calendar.prototype.renderBody=function(workingDate,html){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;var startDay=this.cfg.getProperty(defCfg.START_WEEKDAY.key);this.preMonthDays=workingDate.getDay();
if(startDay>0){this.preMonthDays-=startDay}if(this.preMonthDays<0){this.preMonthDays+=7}this.monthDays=YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();this.postMonthDays=YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;
workingDate=YAHOO.widget.DateMath.subtract(workingDate,YAHOO.widget.DateMath.DAY,this.preMonthDays);var weekNum,weekClass;var weekPrefix="w";var cellPrefix="_cell";var workingDayPrefix="wd";var dayPrefix="d";
var cellRenderers;var renderer;var todayYear=this.today.getFullYear();var todayMonth=this.today.getMonth();var todayDate=this.today.getDate();var useDate=this.cfg.getProperty(defCfg.PAGEDATE.key);var hideBlankWeeks=this.cfg.getProperty(defCfg.HIDE_BLANK_WEEKS.key);
var showWeekFooter=this.cfg.getProperty(defCfg.SHOW_WEEK_FOOTER.key);var showWeekHeader=this.cfg.getProperty(defCfg.SHOW_WEEK_HEADER.key);var mindate=this.cfg.getProperty(defCfg.MINDATE.key);var maxdate=this.cfg.getProperty(defCfg.MAXDATE.key);
if(mindate){mindate=YAHOO.widget.DateMath.clearTime(mindate)}if(maxdate){maxdate=YAHOO.widget.DateMath.clearTime(maxdate)}html[html.length]='<tbody class="m'+(useDate.getMonth()+1)+" "+this.Style.CSS_BODY+'">';
var i=0;var tempDiv=document.createElement("div");var cell=document.createElement("td");tempDiv.appendChild(cell);var jan1=new Date(useDate.getFullYear(),0,1);var cal=this.parent||this;for(var r=0;r<6;
r++){weekNum=YAHOO.widget.DateMath.getWeekNumber(workingDate,useDate.getFullYear(),startDay);weekClass=weekPrefix+weekNum;if(r!==0&&hideBlankWeeks===true&&workingDate.getMonth()!=useDate.getMonth()){break
}else{html[html.length]='<tr class="'+weekClass+'">';if(showWeekHeader){html=this.renderRowHeader(weekNum,html)}for(var d=0;d<7;d++){cellRenderers=[];renderer=null;this.clearElement(cell);cell.className=this.Style.CSS_CELL;
cell.id=this.id+cellPrefix+i;if(workingDate.getDate()==todayDate&&workingDate.getMonth()==todayMonth&&workingDate.getFullYear()==todayYear){cellRenderers[cellRenderers.length]=cal.renderCellStyleToday}var workingArray=[workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];
this.cellDates[this.cellDates.length]=workingArray;if(workingDate.getMonth()!=useDate.getMonth()){cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth}else{YAHOO.util.Dom.addClass(cell,workingDayPrefix+workingDate.getDay());
YAHOO.util.Dom.addClass(cell,dayPrefix+workingDate.getDate());for(var s=0;s<this.renderStack.length;++s){var rArray=this.renderStack[s];var type=rArray[0];var month;var day;var year;switch(type){case YAHOO.widget.Calendar.DATE:month=rArray[1][1];
day=rArray[1][2];year=rArray[1][0];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day&&workingDate.getFullYear()==year){renderer=rArray[2];this.renderStack.splice(s,1)}break;case YAHOO.widget.Calendar.MONTH_DAY:month=rArray[1][0];
day=rArray[1][1];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day){renderer=rArray[2];this.renderStack.splice(s,1)}break;case YAHOO.widget.Calendar.RANGE:var date1=rArray[1][0];var date2=rArray[1][1];
var d1month=date1[1];var d1day=date1[2];var d1year=date1[0];var d1=new Date(d1year,d1month-1,d1day);var d2month=date2[1];var d2day=date2[2];var d2year=date2[0];var d2=new Date(d2year,d2month-1,d2day);if(workingDate.getTime()>=d1.getTime()&&workingDate.getTime()<=d2.getTime()){renderer=rArray[2];
if(workingDate.getTime()==d2.getTime()){this.renderStack.splice(s,1)}}break;case YAHOO.widget.Calendar.WEEKDAY:var weekday=rArray[1][0];if(workingDate.getDay()+1==weekday){renderer=rArray[2]}break;case YAHOO.widget.Calendar.MONTH:month=rArray[1][0];
if(workingDate.getMonth()+1==month){renderer=rArray[2]}break}if(renderer){cellRenderers[cellRenderers.length]=renderer}}}if(this._indexOfSelectedFieldArray(workingArray)>-1){cellRenderers[cellRenderers.length]=cal.renderCellStyleSelected
}if((mindate&&(workingDate.getTime()<mindate.getTime()))||(maxdate&&(workingDate.getTime()>maxdate.getTime()))){cellRenderers[cellRenderers.length]=cal.renderOutOfBoundsDate}else{cellRenderers[cellRenderers.length]=cal.styleCellDefault;
cellRenderers[cellRenderers.length]=cal.renderCellDefault}for(var x=0;x<cellRenderers.length;++x){if(cellRenderers[x].call(cal,workingDate,cell)==YAHOO.widget.Calendar.STOP_RENDER){break}}workingDate.setTime(workingDate.getTime()+YAHOO.widget.DateMath.ONE_DAY_MS);
if(i>=0&&i<=6){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_TOP)}if((i%7)===0){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_LEFT)}if(((i+1)%7)===0){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_RIGHT)
}var postDays=this.postMonthDays;if(hideBlankWeeks&&postDays>=7){var blankWeeks=Math.floor(postDays/7);for(var p=0;p<blankWeeks;++p){postDays-=7}}if(i>=((this.preMonthDays+postDays+this.monthDays)-7)){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_BOTTOM)
}html[html.length]=tempDiv.innerHTML;i++}if(showWeekFooter){html=this.renderRowFooter(weekNum,html)}html[html.length]="</tr>"}}html[html.length]="</tbody>";return html};YAHOO.widget.Calendar.prototype.renderFooter=function(html){return html
};YAHOO.widget.Calendar.prototype.render=function(){this.beforeRenderEvent.fire();var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;var workingDate=YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(defCfg.PAGEDATE.key));
this.resetRenderers();this.cellDates.length=0;YAHOO.util.Event.purgeElement(this.oDomContainer,true);var html=[];html[html.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALENDAR+" y"+workingDate.getFullYear()+'" id="'+this.id+'">';
html=this.renderHeader(html);html=this.renderBody(workingDate,html);html=this.renderFooter(html);html[html.length]="</table>";this.oDomContainer.innerHTML=html.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElementsByTagName("td");
this.cfg.refireEvent(defCfg.TITLE.key);this.cfg.refireEvent(defCfg.CLOSE.key);this.cfg.refireEvent(defCfg.IFRAME.key);this.renderEvent.fire()};YAHOO.widget.Calendar.prototype.applyListeners=function(){var root=this.oDomContainer;
var cal=this.parent||this;var anchor="a";var mousedown="mousedown";var linkLeft=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT,anchor,root);var linkRight=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT,anchor,root);
if(linkLeft&&linkLeft.length>0){this.linkLeft=linkLeft[0];YAHOO.util.Event.addListener(this.linkLeft,mousedown,cal.previousMonth,cal,true)}if(linkRight&&linkRight.length>0){this.linkRight=linkRight[0];
YAHOO.util.Event.addListener(this.linkRight,mousedown,cal.nextMonth,cal,true)}if(this.domEventMap){var el,elements;for(var cls in this.domEventMap){if(YAHOO.lang.hasOwnProperty(this.domEventMap,cls)){var items=this.domEventMap[cls];
if(!(items instanceof Array)){items=[items]}for(var i=0;i<items.length;i++){var item=items[i];elements=YAHOO.util.Dom.getElementsByClassName(cls,item.tag,this.oDomContainer);for(var c=0;c<elements.length;
c++){el=elements[c];YAHOO.util.Event.addListener(el,item.event,item.handler,item.scope,item.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(id){var date=this.getDateFieldsByCellId(id);return new Date(date[0],date[1]-1,date[2])
};YAHOO.widget.Calendar.prototype.getDateFieldsByCellId=function(id){id=id.toLowerCase().split("_cell")[1];id=parseInt(id,10);return this.cellDates[id]};YAHOO.widget.Calendar.prototype.renderOutOfBoundsDate=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_OOB);
cell.innerHTML=workingDate.getDate();return YAHOO.widget.Calendar.STOP_RENDER};YAHOO.widget.Calendar.prototype.renderRowHeader=function(weekNum,html){html[html.length]='<th class="calrowhead">'+weekNum+"</th>";
return html};YAHOO.widget.Calendar.prototype.renderRowFooter=function(weekNum,html){html[html.length]='<th class="calrowfoot">'+weekNum+"</th>";return html};YAHOO.widget.Calendar.prototype.renderCellDefault=function(workingDate,cell){cell.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(workingDate)+"</a>"
};YAHOO.widget.Calendar.prototype.styleCellDefault=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_SELECTABLE)};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT1)
};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT2)};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT3)
};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_HIGHLIGHT4)};YAHOO.widget.Calendar.prototype.renderCellStyleToday=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_TODAY)
};YAHOO.widget.Calendar.prototype.renderCellStyleSelected=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_SELECTED)};YAHOO.widget.Calendar.prototype.renderCellNotThisMonth=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_OOM);
cell.innerHTML=workingDate.getDate();return YAHOO.widget.Calendar.STOP_RENDER};YAHOO.widget.Calendar.prototype.renderBodyCellRestricted=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL);
YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_RESTRICTED);cell.innerHTML=workingDate.getDate();return YAHOO.widget.Calendar.STOP_RENDER};YAHOO.widget.Calendar.prototype.addMonths=function(count){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
this.cfg.setProperty(cfgPageDate,YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate),YAHOO.widget.DateMath.MONTH,count));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.subtractMonths=function(count){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
this.cfg.setProperty(cfgPageDate,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate),YAHOO.widget.DateMath.MONTH,count));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.addYears=function(count){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
this.cfg.setProperty(cfgPageDate,YAHOO.widget.DateMath.add(this.cfg.getProperty(cfgPageDate),YAHOO.widget.DateMath.YEAR,count));this.resetRenderers();this.changePageEvent.fire()};YAHOO.widget.Calendar.prototype.subtractYears=function(count){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
this.cfg.setProperty(cfgPageDate,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(cfgPageDate),YAHOO.widget.DateMath.YEAR,count));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 defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.resetProperty(defCfg.SELECTED.key);this.cfg.resetProperty(defCfg.PAGEDATE.key);this.resetEvent.fire()
};YAHOO.widget.Calendar.prototype.clear=function(){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.setProperty(defCfg.SELECTED.key,[]);this.cfg.setProperty(defCfg.PAGEDATE.key,new Date(this.today.getTime()));
this.clearEvent.fire()};YAHOO.widget.Calendar.prototype.select=function(date){var aToBeSelected=this._toFieldArray(date);var validDates=[];var selected=[];var cfgSelected=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
for(var a=0;a<aToBeSelected.length;++a){var toSelect=aToBeSelected[a];if(!this.isDateOOB(this._toDate(toSelect))){if(validDates.length===0){this.beforeSelectEvent.fire();selected=this.cfg.getProperty(cfgSelected)
}validDates.push(toSelect);if(this._indexOfSelectedFieldArray(toSelect)==-1){selected[selected.length]=toSelect}}}if(validDates.length>0){if(this.parent){this.parent.cfg.setProperty(cfgSelected,selected)
}else{this.cfg.setProperty(cfgSelected,selected)}this.selectEvent.fire(validDates)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype.selectCell=function(cellIndex){var cell=this.cells[cellIndex];
var cellDate=this.cellDates[cellIndex];var dCellDate=this._toDate(cellDate);var selectable=YAHOO.util.Dom.hasClass(cell,this.Style.CSS_CELL_SELECTABLE);if(selectable){this.beforeSelectEvent.fire();var cfgSelected=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
var selected=this.cfg.getProperty(cfgSelected);var selectDate=cellDate.concat();if(this._indexOfSelectedFieldArray(selectDate)==-1){selected[selected.length]=selectDate}if(this.parent){this.parent.cfg.setProperty(cfgSelected,selected)
}else{this.cfg.setProperty(cfgSelected,selected)}this.renderCellStyleSelected(dCellDate,cell);this.selectEvent.fire([selectDate]);this.doCellMouseOut.call(cell,null,this)}return this.getSelectedDates()
};YAHOO.widget.Calendar.prototype.deselect=function(date){var aToBeDeselected=this._toFieldArray(date);var validDates=[];var selected=[];var cfgSelected=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;
for(var a=0;a<aToBeDeselected.length;++a){var toDeselect=aToBeDeselected[a];if(!this.isDateOOB(this._toDate(toDeselect))){if(validDates.length===0){this.beforeDeselectEvent.fire();selected=this.cfg.getProperty(cfgSelected)
}validDates.push(toDeselect);var index=this._indexOfSelectedFieldArray(toDeselect);if(index!=-1){selected.splice(index,1)}}}if(validDates.length>0){if(this.parent){this.parent.cfg.setProperty(cfgSelected,selected)
}else{this.cfg.setProperty(cfgSelected,selected)}this.deselectEvent.fire(validDates)}return this.getSelectedDates()};YAHOO.widget.Calendar.prototype.deselectCell=function(cellIndex){var cell=this.cells[cellIndex];
var cellDate=this.cellDates[cellIndex];var cellDateIndex=this._indexOfSelectedFieldArray(cellDate);var selectable=YAHOO.util.Dom.hasClass(cell,this.Style.CSS_CELL_SELECTABLE);if(selectable){this.beforeDeselectEvent.fire();
var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;var selected=this.cfg.getProperty(defCfg.SELECTED.key);var dCellDate=this._toDate(cellDate);var selectDate=cellDate.concat();if(cellDateIndex>-1){if(this.cfg.getProperty(defCfg.PAGEDATE.key).getMonth()==dCellDate.getMonth()&&this.cfg.getProperty(defCfg.PAGEDATE.key).getFullYear()==dCellDate.getFullYear()){YAHOO.util.Dom.removeClass(cell,this.Style.CSS_CELL_SELECTED)
}selected.splice(cellDateIndex,1)}if(this.parent){this.parent.cfg.setProperty(defCfg.SELECTED.key,selected)}else{this.cfg.setProperty(defCfg.SELECTED.key,selected)}this.deselectEvent.fire(selectDate)}return this.getSelectedDates()
};YAHOO.widget.Calendar.prototype.deselectAll=function(){this.beforeDeselectEvent.fire();var cfgSelected=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var selected=this.cfg.getProperty(cfgSelected);
var count=selected.length;var sel=selected.concat();if(this.parent){this.parent.cfg.setProperty(cfgSelected,[])}else{this.cfg.setProperty(cfgSelected,[])}if(count>0){this.deselectEvent.fire(sel)}return this.getSelectedDates()
};YAHOO.widget.Calendar.prototype._toFieldArray=function(date){var returnDate=[];if(date instanceof Date){returnDate=[[date.getFullYear(),date.getMonth()+1,date.getDate()]]}else{if(YAHOO.lang.isString(date)){returnDate=this._parseDates(date)
}else{if(YAHOO.lang.isArray(date)){for(var i=0;i<date.length;++i){var d=date[i];returnDate[returnDate.length]=[d.getFullYear(),d.getMonth()+1,d.getDate()]}}}}return returnDate};YAHOO.widget.Calendar.prototype._toDate=function(dateFieldArray){if(dateFieldArray instanceof Date){return dateFieldArray
}else{return new Date(dateFieldArray[0],dateFieldArray[1]-1,dateFieldArray[2])}};YAHOO.widget.Calendar.prototype._fieldArraysAreEqual=function(array1,array2){var match=false;if(array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]){match=true
}return match};YAHOO.widget.Calendar.prototype._indexOfSelectedFieldArray=function(find){var selected=-1;var seldates=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var s=0;
s<seldates.length;++s){var sArray=seldates[s];if(find[0]==sArray[0]&&find[1]==sArray[1]&&find[2]==sArray[2]){selected=s;break}}return selected};YAHOO.widget.Calendar.prototype.isDateOOM=function(date){return(date.getMonth()!=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth())
};YAHOO.widget.Calendar.prototype.isDateOOB=function(date){var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;var minDate=this.cfg.getProperty(defCfg.MINDATE.key);var maxDate=this.cfg.getProperty(defCfg.MAXDATE.key);
var dm=YAHOO.widget.DateMath;if(minDate){minDate=dm.clearTime(minDate)}if(maxDate){maxDate=dm.clearTime(maxDate)}var clearedDate=new Date(date.getTime());clearedDate=dm.clearTime(clearedDate);return((minDate&&clearedDate.getTime()<minDate.getTime())||(maxDate&&clearedDate.getTime()>maxDate.getTime()))
};YAHOO.widget.Calendar.prototype._parsePageDate=function(date){var parsedDate;var defCfg=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(date){if(date instanceof Date){parsedDate=YAHOO.widget.DateMath.findMonthStart(date)
}else{var month,year,aMonthYear;aMonthYear=date.split(this.cfg.getProperty(defCfg.DATE_FIELD_DELIMITER.key));month=parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_MONTH_POSITION.key)-1],10)-1;year=parseInt(aMonthYear[this.cfg.getProperty(defCfg.MY_YEAR_POSITION.key)-1],10);
parsedDate=new Date(year,month,1)}}else{parsedDate=new Date(this.today.getFullYear(),this.today.getMonth(),1)}return parsedDate};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(selected){};YAHOO.widget.Calendar.prototype.onBeforeDeselect=function(){};
YAHOO.widget.Calendar.prototype.onDeselect=function(deselected){};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(sDate){var aDate=sDate.split(this.Locale.DATE_FIELD_DELIMITER);
var rArray;if(aDate.length==2){rArray=[aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]];rArray.type=YAHOO.widget.Calendar.MONTH_DAY}else{rArray=[aDate[this.Locale.MDY_YEAR_POSITION-1],aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]];
rArray.type=YAHOO.widget.Calendar.DATE}for(var i=0;i<rArray.length;i++){rArray[i]=parseInt(rArray[i],10)}return rArray};YAHOO.widget.Calendar.prototype._parseDates=function(sDates){var aReturn=[];var aDates=sDates.split(this.Locale.DATE_DELIMITER);
for(var d=0;d<aDates.length;++d){var sDate=aDates[d];if(sDate.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var aRange=sDate.split(this.Locale.DATE_RANGE_DELIMITER);var dateStart=this._parseDate(aRange[0]);
var dateEnd=this._parseDate(aRange[1]);var fullRange=this._parseRange(dateStart,dateEnd);aReturn=aReturn.concat(fullRange)}else{var aDate=this._parseDate(sDate);aReturn.push(aDate)}}return aReturn};YAHOO.widget.Calendar.prototype._parseRange=function(startDate,endDate){var dStart=new Date(startDate[0],startDate[1]-1,startDate[2]);
var dCurrent=YAHOO.widget.DateMath.add(new Date(startDate[0],startDate[1]-1,startDate[2]),YAHOO.widget.DateMath.DAY,1);var dEnd=new Date(endDate[0],endDate[1]-1,endDate[2]);var results=[];results.push(startDate);
while(dCurrent.getTime()<=dEnd.getTime()){results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,dCurrent.getDate()]);dCurrent=YAHOO.widget.DateMath.add(dCurrent,YAHOO.widget.DateMath.DAY,1)}return results
};YAHOO.widget.Calendar.prototype.resetRenderers=function(){this.renderStack=this._renderStack.concat()};YAHOO.widget.Calendar.prototype.clearElement=function(cell){cell.innerHTML="&#160;";cell.className=""
};YAHOO.widget.Calendar.prototype.addRenderer=function(sDates,fnRender){var aDates=this._parseDates(sDates);for(var i=0;i<aDates.length;++i){var aDate=aDates[i];if(aDate.length==2){if(aDate[0] instanceof Array){this._addRenderer(YAHOO.widget.Calendar.RANGE,aDate,fnRender)
}else{this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,aDate,fnRender)}}else{if(aDate.length==3){this._addRenderer(YAHOO.widget.Calendar.DATE,aDate,fnRender)}}}};YAHOO.widget.Calendar.prototype._addRenderer=function(type,aDates,fnRender){var add=[type,aDates,fnRender];
this.renderStack.unshift(add);this._renderStack=this.renderStack.concat()};YAHOO.widget.Calendar.prototype.addMonthRenderer=function(month,fnRender){this._addRenderer(YAHOO.widget.Calendar.MONTH,[month],fnRender)
};YAHOO.widget.Calendar.prototype.addWeekdayRenderer=function(weekday,fnRender){this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[weekday],fnRender)};YAHOO.widget.Calendar.prototype.clearAllBodyCellStyles=function(style){for(var c=0;
c<this.cells.length;++c){YAHOO.util.Dom.removeClass(this.cells[c],style)}};YAHOO.widget.Calendar.prototype.setMonth=function(month){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var current=this.cfg.getProperty(cfgPageDate);
current.setMonth(parseInt(month,10));this.cfg.setProperty(cfgPageDate,current)};YAHOO.widget.Calendar.prototype.setYear=function(year){var cfgPageDate=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;
var current=this.cfg.getProperty(cfgPageDate);current.setFullYear(parseInt(year,10));this.cfg.setProperty(cfgPageDate,current)};YAHOO.widget.Calendar.prototype.getSelectedDates=function(){var returnDates=[];
var selected=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var d=0;d<selected.length;++d){var dateArray=selected[d];var date=new Date(dateArray[0],dateArray[1]-1,dateArray[2]);
returnDates.push(date)}returnDates.sort(function(a,b){return a-b});return returnDates};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 ua=navigator.userAgent.toLowerCase();if(ua.indexOf("opera")!=-1){return"opera"}else{if(ua.indexOf("msie 7")!=-1){return"ie7"}else{if(ua.indexOf("msie")!=-1){return"ie"
}else{if(ua.indexOf("safari")!=-1){return"safari"}else{if(ua.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(id,containerId,config){if(arguments.length>0){this.init(id,containerId,config)
}};YAHOO.widget.CalendarGroup.prototype.init=function(id,containerId,config){this.initEvents();this.initStyles();this.pages=[];this.id=id;this.containerId=containerId;this.oDomContainer=document.getElementById(containerId);
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(config){this.cfg.applyConfig(config,true)}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true)}};YAHOO.widget.CalendarGroup.prototype.setupConfig=function(){var defCfg=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;
this.cfg.addProperty(defCfg.PAGES.key,{value:defCfg.PAGES.value,validator:this.cfg.checkNumber,handler:this.configPages});this.cfg.addProperty(defCfg.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});
this.cfg.addProperty(defCfg.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(defCfg.TITLE.key,{value:defCfg.TITLE.value,handler:this.configTitle});this.cfg.addProperty(defCfg.CLOSE.key,{value:defCfg.CLOSE.value,handler:this.configClose});
this.cfg.addProperty(defCfg.IFRAME.key,{value:defCfg.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.MINDATE.key,{value:defCfg.MINDATE.value,handler:this.delegateConfig});
this.cfg.addProperty(defCfg.MAXDATE.key,{value:defCfg.MAXDATE.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.MULTI_SELECT.key,{value:defCfg.MULTI_SELECT.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});
this.cfg.addProperty(defCfg.START_WEEKDAY.key,{value:defCfg.START_WEEKDAY.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key,{value:defCfg.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});
this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key,{value:defCfg.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{value:defCfg.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});
this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key,{value:defCfg.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key,{value:defCfg.NAV_ARROW_LEFT.value,handler:this.delegateConfig});
this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key,{value:defCfg.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.MONTHS_SHORT.key,{value:defCfg.MONTHS_SHORT.value,handler:this.delegateConfig});
this.cfg.addProperty(defCfg.MONTHS_LONG.key,{value:defCfg.MONTHS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key,{value:defCfg.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});
this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key,{value:defCfg.WEEKDAYS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key,{value:defCfg.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});
this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key,{value:defCfg.WEEKDAYS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.LOCALE_MONTHS.key,{value:defCfg.LOCALE_MONTHS.value,handler:this.delegateConfig});
this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key,{value:defCfg.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.DATE_DELIMITER.key,{value:defCfg.DATE_DELIMITER.value,handler:this.delegateConfig});
this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key,{value:defCfg.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key,{value:defCfg.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});
this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key,{value:defCfg.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key,{value:defCfg.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});
this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key,{value:defCfg.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MD_DAY_POSITION.key,{value:defCfg.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});
this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key,{value:defCfg.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key,{value:defCfg.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});
this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key,{value:defCfg.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key,{value:defCfg.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});
this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key,{value:defCfg.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key,{value:defCfg.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});
this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key,{value:defCfg.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig})};YAHOO.widget.CalendarGroup.prototype.initEvents=function(){var me=this;var strEvent="Event";
var sub=function(fn,obj,bOverride){for(var p=0;p<me.pages.length;++p){var cal=me.pages[p];cal[this.type+strEvent].subscribe(fn,obj,bOverride)}};var unsub=function(fn,obj){for(var p=0;p<me.pages.length;
++p){var cal=me.pages[p];cal[this.type+strEvent].unsubscribe(fn,obj)}};var defEvents=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT);this.beforeSelectEvent.subscribe=sub;
this.beforeSelectEvent.unsubscribe=unsub;this.selectEvent=new YAHOO.util.CustomEvent(defEvents.SELECT);this.selectEvent.subscribe=sub;this.selectEvent.unsubscribe=unsub;this.beforeDeselectEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT);
this.beforeDeselectEvent.subscribe=sub;this.beforeDeselectEvent.unsubscribe=unsub;this.deselectEvent=new YAHOO.util.CustomEvent(defEvents.DESELECT);this.deselectEvent.subscribe=sub;this.deselectEvent.unsubscribe=unsub;
this.changePageEvent=new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE);this.changePageEvent.subscribe=sub;this.changePageEvent.unsubscribe=unsub;this.beforeRenderEvent=new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER);
this.beforeRenderEvent.subscribe=sub;this.beforeRenderEvent.unsubscribe=unsub;this.renderEvent=new YAHOO.util.CustomEvent(defEvents.RENDER);this.renderEvent.subscribe=sub;this.renderEvent.unsubscribe=unsub;
this.resetEvent=new YAHOO.util.CustomEvent(defEvents.RESET);this.resetEvent.subscribe=sub;this.resetEvent.unsubscribe=unsub;this.clearEvent=new YAHOO.util.CustomEvent(defEvents.CLEAR);this.clearEvent.subscribe=sub;
this.clearEvent.unsubscribe=unsub};YAHOO.widget.CalendarGroup.prototype.configPages=function(type,args,obj){var pageCount=args[0];var cfgPageDate=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
var sep="_";var groupCalClass="groupcal";var firstClass="first-of-type";var lastClass="last-of-type";for(var p=0;p<pageCount;++p){var calId=this.id+sep+p;var calContainerId=this.containerId+sep+p;var childConfig=this.cfg.getConfig();
childConfig.close=false;childConfig.title=false;var cal=this.constructChild(calId,calContainerId,childConfig);var caldate=cal.cfg.getProperty(cfgPageDate);this._setMonthOnDate(caldate,caldate.getMonth()+p);
cal.cfg.setProperty(cfgPageDate,caldate);YAHOO.util.Dom.removeClass(cal.oDomContainer,this.Style.CSS_SINGLE);YAHOO.util.Dom.addClass(cal.oDomContainer,groupCalClass);if(p===0){YAHOO.util.Dom.addClass(cal.oDomContainer,firstClass)
}if(p==(pageCount-1)){YAHOO.util.Dom.addClass(cal.oDomContainer,lastClass)}cal.parent=this;cal.index=p;this.pages[this.pages.length]=cal}};YAHOO.widget.CalendarGroup.prototype.configPageDate=function(type,args,obj){var val=args[0];
var firstPageDate;var cfgPageDate=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];if(p===0){firstPageDate=cal._parsePageDate(val);cal.cfg.setProperty(cfgPageDate,firstPageDate)
}else{var pageDate=new Date(firstPageDate);this._setMonthOnDate(pageDate,pageDate.getMonth()+p);cal.cfg.setProperty(cfgPageDate,pageDate)}}};YAHOO.widget.CalendarGroup.prototype.configSelected=function(type,args,obj){var cfgSelected=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;
this.delegateConfig(type,args,obj);var selected=(this.pages.length>0)?this.pages[0].cfg.getProperty(cfgSelected):[];this.cfg.setProperty(cfgSelected,selected,true)};YAHOO.widget.CalendarGroup.prototype.delegateConfig=function(type,args,obj){var val=args[0];
var cal;for(var p=0;p<this.pages.length;p++){cal=this.pages[p];cal.cfg.setProperty(type,val)}};YAHOO.widget.CalendarGroup.prototype.setChildFunction=function(fnName,fn){var pageCount=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
for(var p=0;p<pageCount;++p){this.pages[p][fnName]=fn}};YAHOO.widget.CalendarGroup.prototype.callChildFunction=function(fnName,args){var pageCount=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
for(var p=0;p<pageCount;++p){var page=this.pages[p];if(page[fnName]){var fn=page[fnName];fn.call(page,args)}}};YAHOO.widget.CalendarGroup.prototype.constructChild=function(id,containerId,config){var container=document.getElementById(containerId);
if(!container){container=document.createElement("div");container.id=containerId;this.oDomContainer.appendChild(container)}return new YAHOO.widget.Calendar(id,containerId,config)};YAHOO.widget.CalendarGroup.prototype.setMonth=function(month){month=parseInt(month,10);
var currYear;var cfgPageDate=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];var pageDate=cal.cfg.getProperty(cfgPageDate);if(p===0){currYear=pageDate.getFullYear()
}else{pageDate.setYear(currYear)}this._setMonthOnDate(pageDate,month+p);cal.cfg.setProperty(cfgPageDate,pageDate)}};YAHOO.widget.CalendarGroup.prototype.setYear=function(year){var cfgPageDate=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;
year=parseInt(year,10);for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];var pageDate=cal.cfg.getProperty(cfgPageDate);if((pageDate.getMonth()+1)==1&&p>0){year+=1}cal.setYear(year)}};YAHOO.widget.CalendarGroup.prototype.render=function(){this.renderHeader();
for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.render()}this.renderFooter()};YAHOO.widget.CalendarGroup.prototype.select=function(date){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];
cal.select(date)}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.selectCell=function(cellIndex){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.selectCell(cellIndex)
}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.deselect=function(date){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.deselect(date)}return this.getSelectedDates()
};YAHOO.widget.CalendarGroup.prototype.deselectAll=function(){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.deselectAll()}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.deselectCell=function(cellIndex){for(var p=0;
p<this.pages.length;++p){var cal=this.pages[p];cal.deselectCell(cellIndex)}return this.getSelectedDates()};YAHOO.widget.CalendarGroup.prototype.reset=function(){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];
cal.reset()}};YAHOO.widget.CalendarGroup.prototype.clear=function(){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.clear()}};YAHOO.widget.CalendarGroup.prototype.nextMonth=function(){for(var p=0;
p<this.pages.length;++p){var cal=this.pages[p];cal.nextMonth()}};YAHOO.widget.CalendarGroup.prototype.previousMonth=function(){for(var p=this.pages.length-1;p>=0;--p){var cal=this.pages[p];cal.previousMonth()
}};YAHOO.widget.CalendarGroup.prototype.nextYear=function(){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.nextYear()}};YAHOO.widget.CalendarGroup.prototype.previousYear=function(){for(var p=0;
p<this.pages.length;++p){var cal=this.pages[p];cal.previousYear()}};YAHOO.widget.CalendarGroup.prototype.getSelectedDates=function(){var returnDates=[];var selected=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);
for(var d=0;d<selected.length;++d){var dateArray=selected[d];var date=new Date(dateArray[0],dateArray[1]-1,dateArray[2]);returnDates.push(date)}returnDates.sort(function(a,b){return a-b});return returnDates
};YAHOO.widget.CalendarGroup.prototype.addRenderer=function(sDates,fnRender){for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];cal.addRenderer(sDates,fnRender)}};YAHOO.widget.CalendarGroup.prototype.addMonthRenderer=function(month,fnRender){for(var p=0;
p<this.pages.length;++p){var cal=this.pages[p];cal.addMonthRenderer(month,fnRender)}};YAHOO.widget.CalendarGroup.prototype.addWeekdayRenderer=function(weekday,fnRender){for(var p=0;p<this.pages.length;
++p){var cal=this.pages[p];cal.addWeekdayRenderer(weekday,fnRender)}};YAHOO.widget.CalendarGroup.prototype.renderHeader=function(){};YAHOO.widget.CalendarGroup.prototype.renderFooter=function(){};YAHOO.widget.CalendarGroup.prototype.addMonths=function(count){this.callChildFunction("addMonths",count)
};YAHOO.widget.CalendarGroup.prototype.subtractMonths=function(count){this.callChildFunction("subtractMonths",count)};YAHOO.widget.CalendarGroup.prototype.addYears=function(count){this.callChildFunction("addYears",count)
};YAHOO.widget.CalendarGroup.prototype.subtractYears=function(count){this.callChildFunction("subtractYears",count)};YAHOO.widget.CalendarGroup.prototype.show=function(){this.oDomContainer.style.display="block";
if(YAHOO.env.ua.opera){this._fixWidth()}};YAHOO.widget.CalendarGroup.prototype._setMonthOnDate=function(date,iMonth){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(iMonth<0||iMonth>11)){var DM=YAHOO.widget.DateMath;
var newDate=DM.add(date,DM.MONTH,iMonth-date.getMonth());date.setTime(newDate.getTime())}else{date.setMonth(iMonth)}};YAHOO.widget.CalendarGroup.prototype._fixWidth=function(){var startW=this.oDomContainer.offsetWidth;
var w=0;for(var p=0;p<this.pages.length;++p){var cal=this.pages[p];w+=cal.oDomContainer.offsetWidth}if(w>0){this.oDomContainer.style.width=w+"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(id,containerId,config){this.init(id,containerId,config)};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(carouselElementID,carouselCfg){this.init(carouselElementID,carouselCfg)};YAHOO.extension.Carousel.prototype={UNBOUNDED_SIZE:1000000,init:function(carouselElementID,carouselCfg){var oThis=this;
this.getCarouselItem=this.getItem;var carouselListClass="carousel-list";var carouselClipRegionClass="carousel-clip-region";var carouselNextClass="carousel-next";var carouselPrevClass="carousel-prev";this._carouselElemID=carouselElementID;
this.carouselElem=YAHOO.util.Dom.get(carouselElementID);this._prevEnabled=true;this._nextEnabled=true;this.cfg=new YAHOO.util.Config(this);this.cfg.addProperty("scrollBeforeAmount",{value:0,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkNumber});
this.cfg.addProperty("scrollAfterAmount",{value:0,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkNumber});this.cfg.addProperty("loadOnStart",{value:true,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkBoolean});
this.cfg.addProperty("orientation",{value:"horizontal",handler:function(type,args,carouselElem){oThis.reload()},validator:function(orientation){if(typeof orientation=="string"){return("horizontal,vertical".indexOf(orientation.toLowerCase())!=-1)
}else{return false}}});this.cfg.addProperty("size",{value:this.UNBOUNDED_SIZE,handler:function(type,args,carouselElem){oThis.reload()},validator:oThis.cfg.checkNumber});this.cfg.addProperty("numVisible",{value:3,handler:function(type,args,carouselElem){oThis.reload()
},validator:oThis.cfg.checkNumber});this.cfg.addProperty("firstVisible",{value:1,handler:function(type,args,carouselElem){oThis.moveTo(args[0])},validator:oThis.cfg.checkNumber});this.cfg.addProperty("scrollInc",{value:3,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkNumber});
this.cfg.addProperty("animationSpeed",{value:0.25,handler:function(type,args,carouselElem){oThis.animationSpeed=args[0]},validator:oThis.cfg.checkNumber});this.cfg.addProperty("animationMethod",{value:YAHOO.util.Easing.easeOut,handler:function(type,args,carouselElem){}});
this.cfg.addProperty("animationCompleteHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._animationCompleteEvt){oThis._animationCompleteEvt.unsubscribe(oThis._currAnimationCompleteHandler,oThis)
}oThis._currAnimationCompleteHandler=args[0];if(oThis._currAnimationCompleteHandler){if(!oThis._animationCompleteEvt){oThis._animationCompleteEvt=new YAHOO.util.CustomEvent("onAnimationComplete",oThis)
}oThis._animationCompleteEvt.subscribe(oThis._currAnimationCompleteHandler,oThis)}}});this.cfg.addProperty("autoPlay",{value:0,handler:function(type,args,carouselElem){var autoPlay=args[0];if(autoPlay>0){oThis.startAutoPlay()
}else{oThis.stopAutoPlay()}}});this.cfg.addProperty("wrap",{value:false,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkBoolean});this.cfg.addProperty("navMargin",{value:0,handler:function(type,args,carouselElem){oThis.calculateSize()
},validator:oThis.cfg.checkNumber});this.cfg.addProperty("revealAmount",{value:0,handler:function(type,args,carouselElem){oThis.reload()},validator:oThis.cfg.checkNumber});this.cfg.addProperty("prevElementID",{value:null,handler:function(type,args,carouselElem){if(oThis._carouselPrev){YAHOO.util.Event.removeListener(oThis._carouselPrev,"click",oThis._scrollPrev)
}oThis._prevElementID=args[0];if(oThis._prevElementID==null){oThis._carouselPrev=YAHOO.util.Dom.getElementsByClassName(carouselPrevClass,"div",oThis.carouselElem)[0]}else{oThis._carouselPrev=YAHOO.util.Dom.get(oThis._prevElementID)
}YAHOO.util.Event.addListener(oThis._carouselPrev,"click",oThis._scrollPrev,oThis)}});this.cfg.addProperty("prevElement",{value:null,handler:function(type,args,carouselElem){if(oThis._carouselPrev){YAHOO.util.Event.removeListener(oThis._carouselPrev,"click",oThis._scrollPrev)
}oThis._prevElementID=args[0];if(oThis._prevElementID==null){oThis._carouselPrev=YAHOO.util.Dom.getElementsByClassName(carouselPrevClass,"div",oThis.carouselElem)[0]}else{oThis._carouselPrev=YAHOO.util.Dom.get(oThis._prevElementID)
}YAHOO.util.Event.addListener(oThis._carouselPrev,"click",oThis._scrollPrev,oThis)}});this.cfg.addProperty("nextElementID",{value:null,handler:function(type,args,carouselElem){if(oThis._carouselNext){YAHOO.util.Event.removeListener(oThis._carouselNext,"click",oThis._scrollNext)
}oThis._nextElementID=args[0];if(oThis._nextElementID==null){oThis._carouselNext=YAHOO.util.Dom.getElementsByClassName(carouselNextClass,"div",oThis.carouselElem)}else{oThis._carouselNext=YAHOO.util.Dom.get(oThis._nextElementID)
}if(oThis._carouselNext){YAHOO.util.Event.addListener(oThis._carouselNext,"click",oThis._scrollNext,oThis)}}});this.cfg.addProperty("nextElement",{value:null,handler:function(type,args,carouselElem){if(oThis._carouselNext){YAHOO.util.Event.removeListener(oThis._carouselNext,"click",oThis._scrollNext)
}oThis._nextElementID=args[0];if(oThis._nextElementID==null){oThis._carouselNext=YAHOO.util.Dom.getElementsByClassName(carouselNextClass,"div",oThis.carouselElem)}else{oThis._carouselNext=YAHOO.util.Dom.get(oThis._nextElementID)
}if(oThis._carouselNext){YAHOO.util.Event.addListener(oThis._carouselNext,"click",oThis._scrollNext,oThis)}}});this.cfg.addProperty("disableSelection",{value:true,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkBoolean});
this.cfg.addProperty("loadInitHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._loadInitHandlerEvt){oThis._loadInitHandlerEvt.unsubscribe(oThis._currLoadInitHandler,oThis)}oThis._currLoadInitHandler=args[0];
if(oThis._currLoadInitHandler){if(!oThis._loadInitHandlerEvt){oThis._loadInitHandlerEvt=new YAHOO.util.CustomEvent("onLoadInit",oThis)}oThis._loadInitHandlerEvt.subscribe(oThis._currLoadInitHandler,oThis)
}}});this.cfg.addProperty("loadNextHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._loadNextHandlerEvt){oThis._loadNextHandlerEvt.unsubscribe(oThis._currLoadNextHandler,oThis)}oThis._currLoadNextHandler=args[0];
if(oThis._currLoadNextHandler){if(!oThis._loadNextHandlerEvt){oThis._loadNextHandlerEvt=new YAHOO.util.CustomEvent("onLoadNext",oThis)}oThis._loadNextHandlerEvt.subscribe(oThis._currLoadNextHandler,oThis)
}}});this.cfg.addProperty("loadPrevHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._loadPrevHandlerEvt){oThis._loadPrevHandlerEvt.unsubscribe(oThis._currLoadPrevHandler,oThis)}oThis._currLoadPrevHandler=args[0];
if(oThis._currLoadPrevHandler){if(!oThis._loadPrevHandlerEvt){oThis._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",oThis)}oThis._loadPrevHandlerEvt.subscribe(oThis._currLoadPrevHandler,oThis)
}}});this.cfg.addProperty("prevButtonStateHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._currPrevButtonStateHandler){oThis._prevButtonStateHandlerEvt.unsubscribe(oThis._currPrevButtonStateHandler,oThis)
}oThis._currPrevButtonStateHandler=args[0];if(oThis._currPrevButtonStateHandler){if(!oThis._prevButtonStateHandlerEvt){oThis._prevButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onPrevButtonStateChange",oThis)
}oThis._prevButtonStateHandlerEvt.subscribe(oThis._currPrevButtonStateHandler,oThis)}}});this.cfg.addProperty("nextButtonStateHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._currNextButtonStateHandler){oThis._nextButtonStateHandlerEvt.unsubscribe(oThis._currNextButtonStateHandler,oThis)
}oThis._currNextButtonStateHandler=args[0];if(oThis._currNextButtonStateHandler){if(!oThis._nextButtonStateHandlerEvt){oThis._nextButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onNextButtonStateChange",oThis)
}oThis._nextButtonStateHandlerEvt.subscribe(oThis._currNextButtonStateHandler,oThis)}}});if(carouselCfg){this.cfg.applyConfig(carouselCfg)}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(carouselListClass,"ul",this.carouselElem)[0];
if(this._nextElementID==null){this._carouselNext=YAHOO.util.Dom.getElementsByClassName(carouselNextClass,"div",this.carouselElem)[0]}else{this._carouselNext=YAHOO.util.Dom.get(this._nextElementID)}if(this._prevElementID==null){this._carouselPrev=YAHOO.util.Dom.getElementsByClassName(carouselPrevClass,"div",this.carouselElem)[0]
}else{this._carouselPrev=YAHOO.util.Dom.get(this._prevElementID)}this._clipReg=YAHOO.util.Dom.getElementsByClassName(carouselClipRegionClass,"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 loadInitHandler=this.cfg.getProperty("loadInitHandler");if(loadInitHandler){this._loadInitHandlerEvt=new YAHOO.util.CustomEvent("onLoadInit",this);this._loadInitHandlerEvt.subscribe(loadInitHandler,this)
}var loadNextHandler=this.cfg.getProperty("loadNextHandler");if(loadNextHandler){this._loadNextHandlerEvt=new YAHOO.util.CustomEvent("onLoadNext",this);this._loadNextHandlerEvt.subscribe(loadNextHandler,this)
}var loadPrevHandler=this.cfg.getProperty("loadPrevHandler");if(loadPrevHandler){this._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",this);this._loadPrevHandlerEvt.subscribe(loadPrevHandler,this)
}var animationCompleteHandler=this.cfg.getProperty("animationCompleteHandler");if(animationCompleteHandler){this._animationCompleteEvt=new YAHOO.util.CustomEvent("onAnimationComplete",this);this._animationCompleteEvt.subscribe(animationCompleteHandler,this)
}var prevButtonStateHandler=this.cfg.getProperty("prevButtonStateHandler");if(prevButtonStateHandler){this._prevButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onPrevButtonStateChange",this);this._prevButtonStateHandlerEvt.subscribe(prevButtonStateHandler,this)
}var nextButtonStateHandler=this.cfg.getProperty("nextButtonStateHandler");if(nextButtonStateHandler){this._nextButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onNextButtonStateChange",this);this._nextButtonStateHandlerEvt.subscribe(nextButtonStateHandler,this)
}var visibleExtent=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+visibleExtent.start,this._calculateSize,this);if(this.cfg.getProperty("loadOnStart")){this._loadInitial()
}},_handleMouseDownForSelection:function(e){if(this.cfg.getProperty("disableSelection")){YAHOO.util.Event.preventDefault(e);YAHOO.util.Event.stopPropagation(e)}},clear:function(){var loadInitHandler=this.cfg.getProperty("loadInitHandler");
if(loadInitHandler){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(numVisible){if(this._isValidObj(numVisible)){this.cfg.setProperty("numVisible",numVisible)}this.clear();var visibleExtent=this._calculateVisibleExtent();
YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+visibleExtent.start,this._calculateSize,this);this._loadInitial()},load:function(){var visibleExtent=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+visibleExtent.start,this._calculateSize,this);
this._loadInitial()},addItem:function(idx,innerHTMLOrElem,itemClass){if(idx>this.cfg.getProperty("size")){return null}var liElem=this.getItem(idx);if(!this._isValidObj(liElem)){liElem=this._createItem(idx,innerHTMLOrElem);
this.carouselList.appendChild(liElem)}else{if(this._isValidObj(liElem.placeholder)){var newLiElem=this._createItem(idx,innerHTMLOrElem);this.carouselList.replaceChild(newLiElem,liElem);liElem=newLiElem
}}if(this._isValidObj(itemClass)){YAHOO.util.Dom.addClass(liElem,itemClass)}if(this.isVertical()){setTimeout(function(){liElem.style.display="block"},1)}return liElem},insertBefore:function(refIdx,innerHTML){if(refIdx>=this.cfg.getProperty("size")){return null
}if(refIdx<1){refIdx=1}var insertionIdx=refIdx-1;if(insertionIdx>this._lastPrebuiltIdx){this._prebuildItems(this._lastPrebuiltIdx,refIdx)}var liElem=this._insertBeforeItem(refIdx,innerHTML);this._enableDisableControls();
return liElem},insertAfter:function(refIdx,innerHTML){if(refIdx>this.cfg.getProperty("size")){refIdx=this.cfg.getProperty("size")}var insertionIdx=refIdx+1;if(insertionIdx>this._lastPrebuiltIdx){this._prebuildItems(this._lastPrebuiltIdx,insertionIdx+1)
}var liElem=this._insertAfterItem(refIdx,innerHTML);if(insertionIdx>this.cfg.getProperty("size")){this.cfg.setProperty("size",insertionIdx,true)}this._enableDisableControls();return liElem},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(newStart){this._position(newStart,true)
},moveTo:function(newStart){this._position(newStart,false)},startAutoPlay:function(interval){if(this._isValidObj(interval)){this.cfg.setProperty("autoPlay",interval,true)}if(this._autoPlayTimer!==null){return this._autoPlayTimer
}var oThis=this;var autoScroll=function(){oThis.scrollNext()};this._autoPlayTimer=setTimeout(autoScroll,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(idx){var liElem=this.getItem(idx);if(this._isValidObj(liElem)&&!this._isValidObj(liElem.placeholder)){return true
}return false},getItem:function(idx){var elemName=this._carouselElemID+"-item-"+idx;var liElem=YAHOO.util.Dom.get(elemName);return liElem},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 ulKids=this.carouselList.childNodes;var li=null;for(var i=0;i<ulKids.length;
i++){li=ulKids[i];if(li.tagName=="LI"||li.tagName=="li"){break}}var navMargin=this.cfg.getProperty("navMargin");var numVisible=this.cfg.getProperty("numVisible");var firstVisible=this.cfg.getProperty("firstVisible");
var pl=this._getStyleVal(li,"paddingLeft");var pr=this._getStyleVal(li,"paddingRight");var ml=this._getStyleVal(li,"marginLeft");var mr=this._getStyleVal(li,"marginRight");var pt=this._getStyleVal(li,"paddingTop");
var pb=this._getStyleVal(li,"paddingBottom");var mt=this._getStyleVal(li,"marginTop");var mb=this._getStyleVal(li,"marginBottom");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-vertical");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-horizontal");
if(this.isVertical()){var liPaddingMarginWidth=pl+pr+ml+mr;YAHOO.util.Dom.addClass(this.carouselList,"carousel-vertical");var liPaddingMarginHeight=pt+pb+mt+mb;var upt=this._getStyleVal(this.carouselList,"paddingTop");
var upb=this._getStyleVal(this.carouselList,"paddingBottom");var umt=this._getStyleVal(this.carouselList,"marginTop");var umb=this._getStyleVal(this.carouselList,"marginBottom");var ulPaddingHeight=upt+upb+umt+umb;
var revealAmt=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(liPaddingMarginHeight)/2):0;var liHeight=this._getStyleVal(li,"height",true);this.scrollAmountPerInc=(liHeight+liPaddingMarginHeight);
var liWidth=this._getStyleVal(li,"width");this.carouselElem.style.width=(liWidth+liPaddingMarginWidth)+"px";this._clipReg.style.height=(this.scrollAmountPerInc*numVisible+revealAmt*2+ulPaddingHeight)+"px";
this.carouselElem.style.height=(this.scrollAmountPerInc*numVisible+revealAmt*2+navMargin*2+ulPaddingHeight)+"px";var revealTop=(this._isExtraRevealed())?(revealAmt-(Math.abs(mt-mb)+Math.abs(pt-pb))/2):0;
YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"top",""+revealTop+"px");var currY=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,currY-this.scrollAmountPerInc*(firstVisible-1))
}else{YAHOO.util.Dom.addClass(this.carouselList,"carousel-horizontal");var upl=this._getStyleVal(this.carouselList,"paddingLeft");var upr=this._getStyleVal(this.carouselList,"paddingRight");var uml=this._getStyleVal(this.carouselList,"marginLeft");
var umr=this._getStyleVal(this.carouselList,"marginRight");var ulPaddingWidth=upl+upr+uml+umr;var liMarginWidth=ml+mr;var liPaddingMarginWidth=liMarginWidth+pr+pl;var revealAmt=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(liPaddingMarginWidth)/2):0;
var liWidth=li.offsetWidth;this.scrollAmountPerInc=liWidth+liMarginWidth;this._clipReg.style.width=(this.scrollAmountPerInc*numVisible+revealAmt*2)+"px";this.carouselElem.style.width=(this.scrollAmountPerInc*numVisible+navMargin*2+revealAmt*2+ulPaddingWidth)+"px";
var revealLeft=(this._isExtraRevealed())?(revealAmt-(Math.abs(mr-ml)+Math.abs(pr-pl))/2-(uml+upl)):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"left",""+revealLeft+"px");
var currX=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,currX-this.scrollAmountPerInc*(firstVisible-1))}},setProperty:function(property,value,silent){this.cfg.setProperty(property,value,silent)
},getProperty:function(property){return this.cfg.getProperty(property)},getFirstItemRevealed:function(){return this._firstItemRevealed},getLastItemRevealed:function(){return this._lastItemRevealed},getFirstVisible:function(){return this.cfg.getProperty("firstVisible")
},getLastVisible:function(){var firstVisible=this.cfg.getProperty("firstVisible");var numVisible=this.cfg.getProperty("numVisible");return firstVisible+numVisible-1},_getStyleVal:function(li,style,returnFloat){var styleValStr=YAHOO.util.Dom.getStyle(li,style);
var styleVal=returnFloat?parseFloat(styleValStr):parseInt(styleValStr,10);if(style=="height"&&isNaN(styleVal)){styleVal=li.offsetHeight}else{if(isNaN(styleVal)){styleVal=0}}return styleVal},_calculateSize:function(me){me.calculateSize();
me.show()},_removeChildrenFromNode:function(node){if(!this._isValidObj(node)){return }var len=node.childNodes.length;while(node.hasChildNodes()){node.removeChild(node.firstChild)}},_prebuildLiElem:function(idx){if(idx<1){return 
}var liElem=document.createElement("li");liElem.id=this._carouselElemID+"-item-"+idx;liElem.placeholder=true;this.carouselList.appendChild(liElem);this._lastPrebuiltIdx=(idx>this._lastPrebuiltIdx)?idx:this._lastPrebuiltIdx
},_createItem:function(idx,innerHTMLOrElem){if(idx<1){return }var liElem=document.createElement("li");liElem.id=this._carouselElemID+"-item-"+idx;if(typeof (innerHTMLOrElem)==="string"){liElem.innerHTML=innerHTMLOrElem
}else{liElem.appendChild(innerHTMLOrElem)}return liElem},_insertAfterItem:function(refIdx,innerHTMLOrElem){return this._insertBeforeItem(refIdx+1,innerHTMLOrElem)},_insertBeforeItem:function(refIdx,innerHTMLOrElem){var refItem=this.getItem(refIdx);
var size=this.cfg.getProperty("size");if(size!=this.UNBOUNDED_SIZE){this.cfg.setProperty("size",size+1,true)}for(var i=this._lastPrebuiltIdx;i>=refIdx;i--){var anItem=this.getItem(i);if(this._isValidObj(anItem)){anItem.id=this._carouselElemID+"-item-"+(i+1)
}}var liElem=this._createItem(refIdx,innerHTMLOrElem);var insertedItem=this.carouselList.insertBefore(liElem,refItem);this._lastPrebuiltIdx+=1;return liElem},insertAfterEnd:function(innerHTMLOrElem){return this.insertAfter(this.cfg.getProperty("size"),innerHTMLOrElem)
},_position:function(newStart,showAnimation){var currStart=this._priorFirstVisible;if(newStart>currStart){var inc=newStart-currStart;this._scrollNextInc(inc,showAnimation)}else{var dec=currStart-newStart;
this._scrollPrevInc(dec,showAnimation)}},_scrollPrev:function(e,carousel){if(e!==null){carousel.stopAutoPlay()}carousel._scrollPrevInc(carousel.cfg.getProperty("scrollInc"),(carousel.cfg.getProperty("animationSpeed")!==0))
},_scrollNext:function(e,carousel){if(e!==null){carousel.stopAutoPlay()}carousel._scrollNextInc(carousel.cfg.getProperty("scrollInc"),(carousel.cfg.getProperty("animationSpeed")!==0))},_handleAnimationComplete:function(type,args,argList){var carousel=argList[0];
var direction=argList[1];carousel._animationCompleteEvt.fire(direction)},_areAllItemsLoaded:function(first,last){var itemsLoaded=true;for(var i=first;i<=last;i++){var liElem=this.getItem(i);if(!this._isValidObj(liElem)){this._prebuildLiElem(i);
itemsLoaded=false}else{if(this._isValidObj(liElem.placeholder)){itemsLoaded=false}}}return itemsLoaded},_prebuildItems:function(first,last){for(var i=first;i<=last;i++){var liElem=this.getItem(i);if(!this._isValidObj(liElem)){this._prebuildLiElem(i)
}}},_isExtraRevealed:function(){return(this.cfg.getProperty("revealAmount")>0)},_scrollNextInc:function(inc,showAnimation){if(this._scrollNextAnim.isAnimated()||this._scrollPrevAnim.isAnimated()){return false
}var numVisible=this.cfg.getProperty("numVisible");var currStart=this._priorFirstVisible;var currEnd=this._priorLastVisible;var size=this.cfg.getProperty("size");var scrollExtent=this._calculateAllowableScrollExtent();
if(this.cfg.getProperty("wrap")&&currEnd==scrollExtent.end){this.scrollTo(scrollExtent.start);return }var newStart=currStart+inc;var newEnd=newStart+numVisible-1;if(newEnd>scrollExtent.end){newEnd=scrollExtent.end;
newStart=newEnd-numVisible+1}inc=newStart-currStart;this.cfg.setProperty("firstVisible",newStart,true);if(inc>0){if(this._isValidObj(this.cfg.getProperty("loadNextHandler"))){var visibleExtent=this._calculateVisibleExtent(newStart,newEnd);
var cacheStart=(currEnd+1)<visibleExtent.start?(currEnd+1):visibleExtent.start;var alreadyCached=this._areAllItemsLoaded(cacheStart,visibleExtent.end);this._loadNextHandlerEvt.fire(visibleExtent.start,visibleExtent.end,alreadyCached)
}if(showAnimation){var nextParams={points:{by:[-this.scrollAmountPerInc*inc,0]}};if(this.isVertical()){nextParams={points:{by:[0,-this.scrollAmountPerInc*inc]}}}this._scrollNextAnim=new YAHOO.util.Motion(this.carouselList,nextParams,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 currY=YAHOO.util.Dom.getY(this.carouselList);
YAHOO.util.Dom.setY(this.carouselList,currY-this.scrollAmountPerInc*inc)}else{var currX=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,currX-this.scrollAmountPerInc*inc)}}}this._priorFirstVisible=newStart;
this._priorLastVisible=newEnd;this._enableDisableControls();return false},_scrollPrevInc:function(dec,showAnimation){if(this._scrollNextAnim.isAnimated()||this._scrollPrevAnim.isAnimated()){return false
}var numVisible=this.cfg.getProperty("numVisible");var currStart=this._priorFirstVisible;var currEnd=this._priorLastVisible;var size=this.cfg.getProperty("size");var newStart=currStart-dec;var scrollExtent=this._calculateAllowableScrollExtent();
newStart=(newStart<scrollExtent.start)?scrollExtent.start:newStart;var newEnd=newStart+numVisible-1;if(newEnd>scrollExtent.end){newEnd=scrollExtent.end;newStart=newEnd-numVisible+1}dec=currStart-newStart;
this.cfg.setProperty("firstVisible",newStart,true);if(dec>0){if(this._isValidObj(this.cfg.getProperty("loadPrevHandler"))){var visibleExtent=this._calculateVisibleExtent(newStart,newEnd);var cacheEnd=(currStart-1)>visibleExtent.end?(currStart-1):visibleExtent.end;
var alreadyCached=this._areAllItemsLoaded(visibleExtent.start,cacheEnd);this._loadPrevHandlerEvt.fire(visibleExtent.start,visibleExtent.end,alreadyCached)}if(showAnimation){var prevParams={points:{by:[this.scrollAmountPerInc*dec,0]}};
if(this.isVertical()){prevParams={points:{by:[0,this.scrollAmountPerInc*dec]}}}this._scrollPrevAnim=new YAHOO.util.Motion(this.carouselList,prevParams,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 currY=YAHOO.util.Dom.getY(this.carouselList);
YAHOO.util.Dom.setY(this.carouselList,currY+this.scrollAmountPerInc*dec)}else{var currX=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,currX+this.scrollAmountPerInc*dec)}}}this._priorFirstVisible=newStart;
this._priorLastVisible=newEnd;this._enableDisableControls();return false},_enableDisableControls:function(){var firstVisible=this.cfg.getProperty("firstVisible");var lastVisible=this.getLastVisible();var scrollExtent=this._calculateAllowableScrollExtent();
if(this._prevEnabled){if(firstVisible===scrollExtent.start){this._disablePrev()}}if(this._prevEnabled===false){if(firstVisible>scrollExtent.start){this._enablePrev()}}if(this._nextEnabled){if(lastVisible===scrollExtent.end){this._disableNext()
}}if(this._nextEnabled===false){if(lastVisible<scrollExtent.end){this._enableNext()}}},_loadInitial:function(){var firstVisible=this.cfg.getProperty("firstVisible");this._priorLastVisible=this.getLastVisible();
if(this._loadInitHandlerEvt){var visibleExtent=this._calculateVisibleExtent(firstVisible,this._priorLastVisible);var alreadyCached=this._areAllItemsLoaded(1,visibleExtent.end);this._loadInitHandlerEvt.fire(visibleExtent.start,visibleExtent.end,alreadyCached)
}if(this.cfg.getProperty("autoPlay")!==0){this._autoPlayTimer=this.startAutoPlay()}this._enableDisableControls()},_calculateAllowableScrollExtent:function(){var scrollBeforeAmount=this.cfg.getProperty("scrollBeforeAmount");
var scrollAfterAmount=this.cfg.getProperty("scrollAfterAmount");var size=this.cfg.getProperty("size");var extent={start:1-scrollBeforeAmount,end:size+scrollAfterAmount};return extent},_calculateVisibleExtent:function(start,end){if(!start){start=this.cfg.getProperty("firstVisible");
end=this.getLastVisible()}var size=this.cfg.getProperty("size");start=start<1?1:start;end=end>size?size:end;var extent={start:start,end:end};this._firstItemRevealed=-1;this._lastItemRevealed=-1;if(this._isExtraRevealed()){if(start>1){this._firstItemRevealed=start-1;
extent.start=this._firstItemRevealed}if(end<size){this._lastItemRevealed=end+1;extent.end=this._lastItemRevealed}}return extent},_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(obj){if(null==obj){return false}if("undefined"==typeof (obj)){return false}return true}};

(function(){YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.tooltip=function(){function registerTooltip(target,content,container){var tt=document.getElementById("tooltip-layer");if(!tt){tt=document.createElement("div");
tt.id="tooltip-layer";container.appendChild(tt)}var ttbody="<div class='rounded'><div class='tl'></div><div class='tr'></div><div class='tm'></div></div><div class='content'>"+content.innerHTML+"</div><div class='rounded'><div class='bl'></div><div class='br'></div><div class='bm'></div></div></div></div>";
tt.style.display="none";tt.style.position="absolute";var cfg={width:"300px",pos:"tr",offsetX:5,offsetY:5,className:""};function resetClasses(){tt.className=""}function show(){resetClasses();tt.innerHTML=ttbody;
tt.style.visibility="hidden";tt.style.display="block";var userConfig=target.className.split(" ");var nbArgs=userConfig.length;if(nbArgs>=1){var conf;for(var i=0;i<nbArgs;i++){var pattern=/cfg-*/;if(pattern.test(userConfig[i])){conf=userConfig[i].split("-");
if(conf.length==3){if(conf[1]=="width"){cfg.width=((conf[2]=="auto")||(conf[2]=="none"))?"none":conf[2]+"px"}if(conf[1]=="pos"){cfg.pos=conf[2]}if(conf[1]=="className"){cfg.className=conf[2]}if(conf[1]=="offsetX"){cfg.offsetX=parseInt(conf[2])
}if(conf[1]=="offsetY"){cfg.offsetY=parseInt(conf[2])}}}}}if(!YAHOO.util.Dom.hasClass(tt,cfg.className)){YAHOO.util.Dom.addClass(tt,cfg.className)}if(cfg.width!="none"){tt.style.width=cfg.width}var targetRegion=YAHOO.util.Dom.getRegion(target);
switch(cfg.pos){case"tl":YAHOO.util.Dom.setY(tt,(targetRegion.top-tt.offsetHeight)+5+cfg.offsetY);YAHOO.util.Dom.setX(tt,(targetRegion.left-tt.offsetWidth)+5+cfg.offsetX);break;case"bl":YAHOO.util.Dom.setY(tt,(targetRegion.top+target.offsetHeight)-5-cfg.offsetY);
YAHOO.util.Dom.setX(tt,(targetRegion.left-tt.offsetWidth)+5+cfg.offsetX);break;case"br":YAHOO.util.Dom.setY(tt,(targetRegion.bottom-5-cfg.offsetY));YAHOO.util.Dom.setX(tt,(targetRegion.right-5-cfg.offsetX));
break;default:YAHOO.util.Dom.setY(tt,(targetRegion.top-tt.offsetHeight)+5+cfg.offsetY);YAHOO.util.Dom.setX(tt,(targetRegion.right-5-cfg.offsetX));break}tt.style.visibility="visible";tt.className+=" type-"+cfg.pos
}function hide(){tt.style.display="none"}YAHOO.util.Event.addListener(target,"mouseover",show);YAHOO.util.Event.addListener(target,"mouseout",hide)}function init(){var container=document.getElementById("product-overlay");
if(container){var contents=YAHOO.util.Dom.getElementsByClassName("tooltip-content","div");for(var i=0;i<contents.length;i++){if(contents.length==1){var targets=YAHOO.util.Dom.getElementsByClassName("tooltip-target","div");
if(targets.length>0){for(var j=0;j<targets.length;j++){registerTooltip(targets[j],contents[0],container)}}}var targetId="tooltip-target-"+(i+1);var target=document.getElementById(targetId);if(target){registerTooltip(target,contents[i],container)
}}}}YAHOO.util.Event.onContentReady("page",init)}()})();

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 jsperfid=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.globalnav.init");
var jsperfused=1}var YESg=YAHOO.EU.Shopping.globalnav;YESg.dropDown=new YAHOO.widget.Overlay(YESg.config.sIdent,{visible:false,monitorresize:true,iframe:true});YESg.cache.oDrop=document.getElementById(YESg.config.sIdent);
var navWrapper=document.createElement("div");navWrapper.id="nav-wrapper";YESg.cache.oDrop.appendChild(navWrapper);YESg.navWrapper=navWrapper;var aTabs=YESg.config.aTabs;var oElm;for(var i=0,j=aTabs.length;
i<j;i++){oElm=document.getElementById(aTabs[i]);YAHOO.util.Event.addListener(oElm,"mouseup",YESg.tabEventHandler,oElm,true);YAHOO.util.Event.addListener(oElm,"keypress",YESg.tabEventHandler,oElm,true);
YAHOO.util.Event.addListener(oElm,"click",YESg.tabEventHandler,oElm,true)}YAHOO.util.Event.addListener(document.getElementsByTagName("html")[0],"click",YESg.hideDropDown);var resetDropPos=function(){if(YESg.dropDown.cfg.getProperty("visible")){YESg.setDropCoords()
}};YAHOO.widget.Module.textResizeEvent.subscribe(resetDropPos);YAHOO.widget.Overlay.windowResizeEvent.subscribe(resetDropPos);if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(jsperfid,jsperfused)
}},tabEventHandler:function(e){var YESg=YAHOO.EU.Shopping.globalnav;var oTab=this;switch(e.type){case"mouseup":if(YESg.cache.oTabClicked){YAHOO.util.Dom.removeClass(YESg.cache.oTabClicked.parentNode,"gn-drop-down");
YAHOO.util.Dom.removeClass(YESg.cache.oTabClicked.parentNode,"gn-drop-down-nosel")}YESg.cache.isInDropDown=false;var tabLi=oTab.parentNode;YAHOO.util.Dom.addClass(tabLi,"gn-drop-down");var isMSIE=(window.ActiveXObject)?true:false;
if(isMSIE&&tabLi.className.indexOf("subchoice")==-1){YAHOO.util.Dom.addClass(tabLi,"gn-drop-down-nosel")}YESg.cache.sTabClickedId=oTab.id;YESg.cache.oTabClicked=oTab;YESg.loadDropDown(oTab);if(YESg.timedClose){window.clearTimeout(YESg.timedClose)
}if(!YESg.closeDropNotEntered&&!YESg.timedClose&&YESg.config.bCloseIfNotEntered){YESg.closeDropNotEntered=window.setTimeout(function(){if(YESg.cache.isInDropDown==false){YESg.dropDown.cfg.setProperty("visible",false)
}YESg.closeDropNotEntered=null},YESg.config.iMouseEnterDelay)}YAHOO.util.Event.stopEvent(e);break;case"keypress":if(e.keyCode==13){window.location=oTab.href;YAHOO.util.Event.stopEvent(e)}break;case"click":YAHOO.util.Event.stopEvent(e);
break}},getNavData:function(){var YESg=YAHOO.EU.Shopping.globalnav;switch(YESg.config.mode){case"json":var head=document.getElementsByTagName("head")[0];var scpt=document.createElement("script");scpt.type="text/javascript";
scpt.src=YESg.config.sUrl+"?JSON=dataCallBack";head.appendChild(scpt);break;case"ajax":var transaction=YAHOO.util.Connect.asyncRequest("GET",YESg.config.sUrl,YESg.ajaxHandler,null);break}},dataCallBack:function(o){var YESg=YAHOO.EU.Shopping.globalnav;
YESg.cache.dropDownData=o;if(YESg.cache.sTabClickedId&&YESg.cache.dropDownData&&!YAHOO.lang.isUndefined(YESg.cache.dropDownData[YESg.cache.sTabClickedId])){YESg.navWrapper.innerHTML=YESg.cache.dropDownData[YESg.cache.sTabClickedId];
YESg.setCloseEvent()}else{YESg.hideDropDown()}},setCloseEvent:function(){var YESg=YAHOO.EU.Shopping.globalnav;var close=YAHOO.util.Dom.getElementsByClassName("close","a",YESg.cache.oDrop)[0];YAHOO.util.Event.addListener(close,"click",YESg.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(o){var YESg=YAHOO.EU.Shopping.globalnav;window.location=document.getElementById(YESg.cache.sTabClickedId).href},timeout:5000},loadDropDown:function(oTab){var YESg=YAHOO.EU.Shopping.globalnav;
if(!YESg.cache.dropDownData){YESg.getNavData()}else{YESg.navWrapper.innerHTML=YESg.cache.dropDownData[oTab.id];YESg.setCloseEvent()}if(YESg.dropDown){YESg.setDropCoords(null,true);YAHOO.util.Event.addListener(YESg.cache.oDrop,"mouseover",YESg.dropDownEventHandler,this,true);
YAHOO.util.Event.addListener(YESg.cache.oDrop,"mouseout",YESg.dropDownEventHandler,this,true);if(!YESg.cache.dropDownData){YESg.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(e,bVisible){var x;var YESg=YAHOO.EU.Shopping.globalnav;var pageRegion=YAHOO.util.Dom.getRegion("page");var tabRegion=YAHOO.util.Dom.getRegion(YESg.cache.oTabClicked.parentNode?YESg.cache.oTabClicked.parentNode:YESg.cache.oTabClicked);
var pageRight=pageRegion.right;var pageLeft=pageRegion.left;var tabLeft=tabRegion.left;var tabRight=tabRegion.right;var y=tabRegion.bottom-2;var dropWidth=YESg.config.width;if((tabLeft+dropWidth)>pageRight){x=pageRight-dropWidth
}else{x=tabLeft-2}x=pageLeft;YESg.dropDown.cfg.setProperty("x",x);YESg.dropDown.cfg.setProperty("y",y);if(bVisible){YESg.dropDown.cfg.setProperty("visible",true)}},dropDownEventHandler:function(e){var YESg=YAHOO.EU.Shopping.globalnav;
YAHOO.util.Event.stopPropagation(e);var oRelTarg=YAHOO.util.Event.getRelatedTarget(e);var oTarg=YAHOO.util.Event.getTarget(e);switch(e.type){case"mouseover":if(YESg.cache.isInDropDown==false){YESg.cache.isInDropDown=true
}break;case"mouseout":if(oTarg==YESg.cache.oDrop||oTarg.parentNode==YESg.cache.oDrop){YESg.cache.isInDropDown=false;YESg.timedClose=window.setTimeout(function(){if(YESg.cache.isInDropDown==false){YESg.closeDrop()
}},YESg.config.iMouseOverDelay)}break}},closeDrop:function(e){var YESg=YAHOO.EU.Shopping.globalnav;YESg.dropDown.cfg.setProperty("visible",false);if(YESg.cache.oTabClicked){YAHOO.util.Dom.removeClass(YESg.cache.oTabClicked.parentNode,"gn-drop-down");
YAHOO.util.Dom.removeClass(YESg.cache.oTabClicked.parentNode,"gn-drop-down-nosel")}YESg.cache.mouseInDropDown=false},hideDropDown:function(e,o){o=o||null;var targ=YAHOO.util.Event.getTarget(e);var YESg=YAHOO.EU.Shopping.globalnav;
if(o&&o.closelink){YESg.closeDrop(e)}else{if(!YAHOO.util.Dom.isAncestor(YESg.cache.oDrop,targ)){YESg.closeDrop()}}if(e&&YAHOO.util.Event.getTarget(e).className=="close"){YAHOO.util.Event.preventDefault(e)
}}};YAHOO.util.Event.onDOMReady(YAHOO.EU.Shopping.globalnav.init);

YAHOO.EU.Shopping.Newsletter={init:function(){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var jsperfid=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.Newsletter.init");var jsperfused=-1}var sNlLabelValue=document.getElementById("nlemaillab").firstChild.nodeValue;
var oNlEmail=document.getElementById("nlemail");var oNlForm=document.getElementById("nlform");oNlEmail.value=sNlLabelValue;YAHOO.util.Event.addListener(oNlEmail,"focus",function(){if(oNlEmail.value==sNlLabelValue){oNlEmail.value=""
}});YAHOO.util.Event.addListener(oNlEmail,"blur",function(){if(oNlEmail.value==""){oNlEmail.value=sNlLabelValue}});YAHOO.util.Event.addListener(oNlForm,"submit",function(e){if(oNlEmail.value!=sNlLabelValue||oNlEmail.value!=""){YAHOO.EU.Shopping.Newsletter.openWindow(oNlForm)
}},this,true);if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(jsperfid,jsperfused)}},openWindow:function(oElem){var left=window.screenX+20;var top=window.screenY+20;var act=oElem.action;var h=300;
var w=340;window.open(act,"yahoo_nl","screenX="+left+",screenY="+top+",width="+w+",height="+h,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(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src)}else{if(console&&console.log){if(!cat){var cat="info"}return console.log(cat+":"+msg)
}else{return false}}};if(!YAHOO.lang.isFunction(YAHOO.lang.later)){YAHOO.lang.later=function(when,o,fn,data,periodic){when=when||0;o=o||{};var m=fn,d=data,f,r;if(YAHOO.lang.isString(fn)){m=o[fn]}if(!m){throw new TypeError("method undefined")
}if(!YAHOO.lang.isArray(d)){d=[data]}f=function(){m.apply(o,d)};r=(periodic)?setInterval(f,when):setTimeout(f,when);return{interval:periodic,cancel:function(){if(this.interval){clearInterval(r)}else{clearTimeout(r)
}}}}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(elt){var len=this.length;var from=Number(arguments[1])||0;from=(from<0)?Math.ceil(from):Math.floor(from);if(from<0){from+=len}for(;from<len;
from++){if(from in this&&this[from]===elt){return from}}return -1}}YAHOO.EU.Shopping.tooltipMsg={handleMsgDivs:function(e,divIdToCheck){for(var i=0,j=divIdToCheck.length;i<j;i++){var errorDiv=document.getElementById(divIdToCheck[i]);
if(errorDiv){var targetEl=YAHOO.util.Event.getTarget(e);var oSavedLs=YAHOO.EU.Shopping.userHist.config.oSavedLs;var aSavedLis=oSavedLs.getElementsByTagName("li");if(targetEl.nodeName.toLowerCase()!="a"&&YAHOO.util.Dom.hasClass(errorDiv,"hist-too-many-items")&&!YAHOO.util.Dom.isAncestor(targetEl,errorDiv)){errorDiv.parentNode.removeChild(errorDiv)
}else{if(targetEl.nodeName.toLowerCase()!="a"&&targetEl!=errorDiv&&!YAHOO.util.Dom.isAncestor(errorDiv,targetEl)&&aSavedLis.length<=5){errorDiv.parentNode.removeChild(errorDiv)}}}}},setWarningMsg:function(targetEl,warningMsg,divId,action,sExtraClass){var divIdToCheck=["compare-max-error","compare-min-error","compare-min-error-2","hist-error-div","add-warning-msg"];
for(var i=0,j=divIdToCheck.length;i<j;i++){var errorDiv=document.getElementById(divIdToCheck[i]);if(errorDiv){if(divId!="compare-min-error-2"){errorDiv.parentNode.removeChild(errorDiv)}}}var warningDiv=document.createElement("div");
var warningTxt=document.createTextNode(warningMsg);warningDiv.appendChild(warningTxt);var closeLnk=document.createElement("a");var closeImg=document.createElement("img");closeImg.setAttribute("src","http://r6.kelkoo.com/ux/buttons/orange-cross-button.gif");
closeImg.setAttribute("alt",YAHOO.EU.Shopping.locale.close);closeLnk.appendChild(closeImg);closeLnk.href="#";warningDiv.appendChild(closeLnk);YAHOO.util.Event.addListener(closeLnk,"click",function(e){YAHOO.util.Event.preventDefault(e);
warningDiv.parentNode.removeChild(warningDiv)},this,true);targetEl.parentNode.insertBefore(warningDiv,targetEl.parentNode.childNodes[0]);if(action&&action=="delete"){var posY=YAHOO.util.Dom.getY(targetEl);
posY=posY+15;YAHOO.util.Dom.setY(warningDiv,posY)}warningDiv.setAttribute("id",divId);YAHOO.util.Dom.addClass(warningDiv,"warning-msg");if(sExtraClass){YAHOO.util.Dom.addClass(warningDiv,sExtraClass)}}};
YAHOO.EU.Shopping.userHist={config:{sShowAllTxt:YAHOO.EU.Shopping.locale.showAll,sHideAllTxt:YAHOO.EU.Shopping.locale.hideAll},init:function(){var oCnf=YAHOO.EU.Shopping.userHist.config;var oMainContainer=document.getElementById("user-hist");
if(!oMainContainer){return true}oCnf.oSavedLs=document.getElementById("sav-ls");var oSavedLs=oCnf.oSavedLs;if(oSavedLs.className!="intro"){oSavedLs.className="enhanced"}var aHeadLs=oMainContainer.getElementsByTagName("h3");
var aContLs=oMainContainer.getElementsByTagName("ol");var histCookie=YAHOO.EU.Shopping.cookie.get("histCookie");YAHOO.log(histCookie);if(!histCookie||histCookie=="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 iNbrVisibleCont=0;var aCookieKeys=["sav","rv","rs"];if(histCookie){for(i=0;i<3;i++){var iNbrVisibleCont=iNbrVisibleCont+parseInt(YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),aCookieKeys[i],"read"))
}}var oUserCtrls=document.getElementById("user-ctrls");var oUserCtrlsLnk=document.createElement("a");oUserCtrlsLnk.setAttribute("href","#");oUserCtrlsLnk.setAttribute("id","user-ctrl-cl");if(iNbrVisibleCont==3){var sUserCtrlsLnkTxt=document.createTextNode(oCnf.sHideAllTxt)
}else{var sUserCtrlsLnkTxt=document.createTextNode(oCnf.sShowAllTxt)}oUserCtrlsLnk.appendChild(sUserCtrlsLnkTxt);var oUserCtrlsLi=document.createElement("li");oUserCtrlsLi.appendChild(oUserCtrlsLnk);oUserCtrlsLi.className="ctrl-cls";
oUserCtrls.appendChild(oUserCtrlsLi);for(var i=0,j=aHeadLs.length;i<j;i++){if(histCookie){if(YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),aCookieKeys[i],"read")==1){YAHOO.util.Dom.addClass(aHeadLs[i],"hist-op")
}else{YAHOO.util.Dom.addClass(aHeadLs[i],"hist-cl");YAHOO.util.Dom.addClass(aContLs[i],"hide")}}else{if(i==0){YAHOO.util.Dom.addClass(aHeadLs[i],"hist-op")}else{YAHOO.util.Dom.addClass(aHeadLs[i],"hist-cl");
YAHOO.util.Dom.addClass(aContLs[i],"hide")}}var oHeadSpan=aHeadLs[i].getElementsByTagName("span")[0];var oParams={oMainCont:oMainContainer,aHeaders:aHeadLs,oHeader:aHeadLs[i],aContLs:aContLs,oContent:aContLs[i],oIndex:i,oChgAllLnk:document.getElementById("user-ctrl-cl")};
YAHOO.util.Event.addListener(oHeadSpan,"click",switchListDisplay,oParams,true)}YAHOO.util.Event.addListener(oUserCtrlsLnk,"click",chgAll,oUserCtrlsLnk,true);var aSavedLis=oSavedLs.getElementsByTagName("li");
oCnf.aSavedLis=aSavedLis;YAHOO.util.Dom.addClass(aSavedLis[0],"selected");YAHOO.util.Event.addListener(oSavedLs,"click",YAHOO.EU.Shopping.userHist.clickItemHandler,true);function switchListDisplay(e,oParams){if(YAHOO.util.Dom.hasClass(oParams.oHeader,"hist-op")){YAHOO.util.Dom.removeClass(oParams.oHeader,"hist-op");
YAHOO.util.Dom.addClass(oParams.oHeader,"hist-cl");YAHOO.util.Dom.addClass(oParams.oContent,"hide");iNbrVisibleCont=iNbrVisibleCont-1;if(histCookie){YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),aCookieKeys[oParams.oIndex],"update")
}}else{YAHOO.util.Dom.removeClass(oParams.oHeader,"hist-cl");YAHOO.util.Dom.addClass(oParams.oHeader,"hist-op");YAHOO.util.Dom.removeClass(oParams.oContent,"hide");iNbrVisibleCont=iNbrVisibleCont+1;if(histCookie){YAHOO.EU.Shopping.userHist.returnCookieVal(YAHOO.EU.Shopping.cookie.get("histCookie"),aCookieKeys[oParams.oIndex],"update")
}}if(iNbrVisibleCont==3){oParams.oChgAllLnk.firstChild.nodeValue=oCnf.sHideAllTxt}else{if(iNbrVisibleCont==0){oParams.oChgAllLnk.firstChild.nodeValue=oCnf.sShowAllTxt}}}function chgAll(e){YAHOO.util.Event.preventDefault(e);
if(this.firstChild.nodeValue==oCnf.sHideAllTxt){this.firstChild.nodeValue=oCnf.sShowAllTxt;for(var i=0,j=aHeadLs.length;i<j;i++){if(YAHOO.util.Dom.hasClass(aHeadLs[i],"hist-op")){YAHOO.util.Dom.removeClass(aHeadLs[i],"hist-op");
YAHOO.util.Dom.addClass(aHeadLs[i],"hist-cl");YAHOO.util.Dom.addClass(aContLs[i],"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"))
}}iNbrVisibleCont=0}else{if(this.firstChild.nodeValue==oCnf.sShowAllTxt){this.firstChild.nodeValue=oCnf.sHideAllTxt;for(var i=0,j=aHeadLs.length;i<j;i++){if(YAHOO.util.Dom.hasClass(aHeadLs[i],"hist-cl")){YAHOO.util.Dom.removeClass(aHeadLs[i],"hist-cl");
YAHOO.util.Dom.addClass(aHeadLs[i],"hist-op");YAHOO.util.Dom.removeClass(aContLs[i],"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"))
}}iNbrVisibleCont=3}}}},clickItemHandler:function(e){var targetEl=YAHOO.util.Event.getTarget(e);if(targetEl.nodeName.toLowerCase()=="ol"){return }var targetElName=targetEl.nodeName.toLowerCase();if(this.nodeName.toLowerCase()){var parentLI=targetEl
}while(parentLI.nodeName.toLowerCase()!="li"){parentLI=parentLI.parentNode}var liFirstLnk=parentLI.getElementsByTagName("a")[0];if(targetElName=="img"||targetEl==liFirstLnk){YAHOO.util.Event.preventDefault(e);
if(YAHOO.util.Dom.hasClass(parentLI,"selected")){return true}else{YAHOO.EU.Shopping.userHist.updateSelectedLI(parentLI)}}else{if(targetElName=="a"&&YAHOO.util.Dom.hasClass(targetEl,"delete")){YAHOO.util.Event.preventDefault(e);
YAHOO.EU.Shopping.userHist.setLinkAction(targetEl)}}},updateSelectedLI:function(li){var aSavedLis=YAHOO.EU.Shopping.userHist.config.aSavedLis;for(i=0,j=aSavedLis.length;i<j;i++){if(YAHOO.util.Dom.hasClass(aSavedLis[i],"selected")){YAHOO.util.Dom.removeClass(aSavedLis[i],"selected")
}YAHOO.util.Dom.addClass(li,"selected")}},returnCookieVal:function(cookieStr,key,action){var rExp=new RegExp(key+"=[01]","i");var match=rExp.exec(cookieStr);YAHOO.log(match);if(match){var keyValue=match[0].substring(match[0].length-1,match[0].length)
}else{var keyValue=1}if(action=="read"){return keyValue}if(action=="update"){YAHOO.log(keyValue);if(keyValue==0){var newKeyValue=1}else{var newKeyValue=0}var updatedStrValue=key+"="+newKeyValue;var histCookieValues=cookieStr.replace(match,updatedStrValue);
YAHOO.EU.Shopping.cookie.set("histCookie",histCookieValues,365,"."+YAHOO.EU.Shopping.locale.domain);YAHOO.log("cookieset"+YAHOO.EU.Shopping.cookie.get("histCookie"))}},setLinkAction:function(targetEl){if(YAHOO.util.Dom.hasClass(targetEl,"delete")){var action="delete"
}else{var action="add"}var oSavedLs=YAHOO.EU.Shopping.userHist.config.oSavedLs;var aSavedLis=oSavedLs.getElementsByTagName("li");var errorDiv=document.getElementById("hist-error-div");if(errorDiv){errorDiv.parentNode.removeChild(errorDiv)
}if(action=="add"&&aSavedLis.length==5){var errorMsg=YAHOO.EU.Shopping.locale.histOversize;YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(targetEl,errorMsg,"hist-error-div","add","hist-too-many-items");return 
}var targetElUrl=targetEl.href;var catIdIndex=targetElUrl.indexOf("catId");if(catIdIndex==-1){var offerIdIndex=targetElUrl.indexOf("offerId");var offerId=targetElUrl.substring(offerIdIndex+8,targetElUrl.length);
YAHOO.EU.Shopping.userHist.updateSavedList(targetEl,action,offerId)}else{var pidIndex=targetElUrl.indexOf("pid");var catId=targetElUrl.substring(catIdIndex+6,pidIndex);var pid=targetElUrl.substring(pidIndex+4,targetElUrl.length);
YAHOO.EU.Shopping.userHist.updateSavedList(targetEl,action,pid,catId)}},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 productWrap=document.getElementById("level3");if(productWrap){YAHOO.util.Event.addListener(productWrap,"click",YAHOO.EU.Shopping.quickRating.identify,this,true)
}},identify:function(e){var targetEl=YAHOO.util.Event.getTarget(e);var targetElName=targetEl.nodeName.toLowerCase();if(targetElName=="a"&&YAHOO.util.Dom.hasClass(targetEl,"quick-rating")){YAHOO.util.Event.preventDefault(e);
YAHOO.EU.Shopping.quickRating.deploy(targetEl)}},deploy:function(targetEl){if(YAHOO.util.Dom.hasClass(targetEl,"qr-open")){return true}YAHOO.util.Dom.addClass(targetEl,"qr-open");var quickRateDiv=document.createElement("div");
quickRateDiv.className="qr-wrap";YAHOO.util.Dom.generateId(quickRateDiv);var quickRateOl=document.createElement("ol");var sParamStarts=targetEl.href.indexOf("?");var oQuickRateParams=targetEl.href.substring(sParamStarts,targetEl.href.length);
var quickRateClose=document.createElement("a");quickRateClose.href="#";quickRateClose.className="qr-close-lnk";quickRateClose.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 quickRateLi=document.createElement("li");var quickRateLnk=document.createElement("a");quickRateLnk.className="qr-"+i;quickRateLnk.href="#";var quickRateLnkTxt=document.createTextNode(YAHOO.EU.Shopping.locale.rate+" "+i);
quickRateLnk.appendChild(quickRateLnkTxt);quickRateLi.appendChild(quickRateLnk);quickRateOl.appendChild(quickRateLi);var oParams={oQuickRateContainer:quickRateDiv,sUrlParams:oQuickRateParams+"&quick_rating="+i,oCloseLnk:quickRateClose,iRate:i};
YAHOO.util.Event.addListener(quickRateLnk,"click",YAHOO.EU.Shopping.quickRating.rate,oParams,true)}quickRateDiv.appendChild(quickRateOl);quickRateDiv.appendChild(quickRateClose);YAHOO.util.Event.purgeElement(targetEl,0);
YAHOO.util.Event.addListener([quickRateClose,targetEl],"click",YAHOO.EU.Shopping.quickRating.switchDisplay,quickRateDiv,true);YAHOO.util.Dom.insertAfter(quickRateDiv,targetEl)},switchDisplay:function(e,quickRateWrap){YAHOO.util.Event.preventDefault(e);
if(YAHOO.util.Dom.hasClass(quickRateWrap,"hide")){YAHOO.util.Dom.removeClass(quickRateWrap,"hide")}else{YAHOO.util.Dom.addClass(quickRateWrap,"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(e){YAHOO.EU.Shopping.levelsSaveLnksListener.targetSaveLnks(e);var divIdToCheck=["compare-max-error","compare-min-error","compare-min-error-2","hist-error-div","add-warning-msg"];
YAHOO.EU.Shopping.tooltipMsg.handleMsgDivs(e,divIdToCheck)})},targetSaveLnks:function(e){var oSavedLs=document.getElementById("sav-ls");if(!oSavedLs){return }var aSavedLis=oSavedLs.getElementsByTagName("li");
var oSavLsFirstLi=aSavedLis[0];if(oSavLsFirstLi){var targetEl=YAHOO.util.Event.getTarget(e);var targetElName=targetEl.nodeName.toLowerCase();if(targetElName=="a"&&YAHOO.util.Dom.hasClass(targetEl,"add-to-saved-list")){YAHOO.util.Event.preventDefault(e);
YAHOO.EU.Shopping.userHist.setLinkAction(targetEl)}}}};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 oForm=document.getElementById("sorting-form");if(oForm){oForm.parentNode.style.paddingBottom="10px";
var oSubmitButton=YAHOO.util.Dom.getElementsByClassName("cta","button",oForm)[0];oSubmitButton.style.display="none";var aSelects=oForm.getElementsByTagName("select");for(var i=0,j=aSelects.length;i<j;i++){YAHOO.util.Event.addListener(aSelects[i],"change",function(e){oForm.submit()
},true)}}}};YAHOO.util.Event.onDOMReady(function(){if(document.getElementById("sorting-form")){YAHOO.EU.Shopping.sortingFormEnhancement.init()}});YAHOO.EU.Shopping.buying={formCallback:function(e){YAHOO.util.Event.stopEvent(e);
var sDest=document.getElementById("bg-dd-select").value;if(sDest!=""){window.location=sDest}},init:function(){var vToAttach=document.getElementById("buyguide-form-list");var vUl=document.getElementById("bg-dd-ul");
var vForm=document.getElementById("bg-form");if(vForm){YAHOO.util.Event.addListener(vForm,"submit",YAHOO.EU.Shopping.buying.formCallback);var oSelect=document.createElement("select");oSelect.id="bg-dd-select";
var aLis=YAHOO.util.Dom.getElementsByClassName("bg-dd-li","li");for(var i=0,j=aLis.length;i<j;i++){var oAs=aLis[i].firstChild;var oOption=document.createElement("option");var sText=oAs.textContent==""?oAs.textContent:oAs.innerHTML;
var oOptionText=document.createTextNode(sText.replace(/&amp;/gi,"&"));oOption.value=oAs.href;oOption.appendChild(oOptionText);oSelect.appendChild(oOption)}vForm.insertBefore(oSelect,vUl);vForm.removeChild(vUl);
vForm.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 aUls=YAHOO.util.Dom.getElementsByClassName("corp-sublnk","ul");
for(var i=0,j=aUls.length;i<j;i++){var aLis=YAHOO.util.Dom.getElementsByClassName("corp-active","li",aUls[i]);if(aLis.length==0){YAHOO.util.Dom.setStyle(aUls[i],"display","none")}else{var sParent=aUls[i].parentNode;
var oH3=sParent.getElementsByTagName("h3");YAHOO.util.Dom.addClass(oH3,"corp-ttl-active")}}}};if(YAHOO.EU.Shopping.spop===undefined){YAHOO.EU.Shopping.spop=function(el,userConfig){YAHOO.EU.Shopping.spop.superclass.constructor.call(this,el,userConfig)
};YAHOO.extend(YAHOO.EU.Shopping.spop,YAHOO.widget.Module)}YAHOO.EU.Shopping.spop.prototype.init=function(el,userConfig){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(e){YAHOO.util.Event.stopEvent(e);
var sSelCategory="",sSelPrice="",sSelTarget="",sCatId="",sSpopN="";if(document.getElementById("spop-form")){var oForm=document.getElementById("spop-form")}if(document.getElementById("spop-form-target")){var oTarget=document.getElementById("spop-form-target");
sSelTarget=oTarget.value}if(document.getElementById("spop-form-category")){var oCategory=document.getElementById("spop-form-category");sSelCategory=oCategory.value}if(document.getElementById("spop-form-price")){var oPrice=document.getElementById("spop-form-price");
sSelPrice=oPrice.value}if(document.getElementById("spop-form-catId")){var oCatId=document.getElementById("spop-form-catId");sCatId=oCatId.value}if(document.getElementById("spop-form-spopN")){var oSpopN=document.getElementById("spop-form-spopN");
var sSpopN=oSpopN.value}var sLink="/ctl/do/spopResult?category="+sSelCategory+"&price="+sSelPrice+"&target="+sSelTarget+"&catId="+sCatId+"&spopn="+sSpopN+"&keepParams=true";var sDest="/ctl/do/contentWide?catId="+sCatId+"&url="+escape(sLink);
window.location=sDest};YAHOO.EU.Shopping.spop.prototype.spopSubmit=function(e){if(!e){e=window.event}if(e.keyCode==13){this.encodeFormBox(e);return false}};YAHOO.util.Event.onDOMReady(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(sUrl){oScript=document.createElement("script");oScript.type="text/javascript";oScript.src=sUrl;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(name,value,days,domain){var domain="; domain="+domain+";"||"";if(days){var date=new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString()}else{var expires=""}document.cookie=name+"="+value+expires+"; path=/"+domain},get:function(name){var nameEQ=name+"=";
var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length)}}return null
},del:function(name){YAHOO.EU.Shopping.cookie.set(name,"",-1)}};YAHOO.EU.Shopping.openInPopup=function(e,iWidth,iHeight){var target=YAHOO.util.Event.getTarget(e);if(!target){return }if((target.tagName.toLowerCase()=="img")&&target.parentNode){target=target.parentNode
}if(target&&target.tagName.toLowerCase()=="a"&&YAHOO.util.Dom.hasClass(target,"js-popup")){window.open(target.href,"popup","width="+iWidth+",height="+iHeight+",scrollbars=yes,menubar=no,status=no,toolbar=no");
YAHOO.util.Event.stopEvent(e)}};YAHOO.EU.Shopping.validate={isDate:function(sDate){var myRE=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(!myRE.test(sDate)){return false}return true}};YAHOO.widget.DateMath.getDate=function(sDate){if(YAHOO.lang.isString){if(!YAHOO.EU.Shopping.validate.isDate(sDate)){return false}var date=sDate.split(new RegExp(/-|\//));
if(!date||!(date.length>0&&date.length<4)){return false}return new Date(date[YAHOO.EU.Shopping.YUICalendarConf.MDY_YEAR_POSITION-1],date[YAHOO.EU.Shopping.YUICalendarConf.MDY_MONTH_POSITION-1]-1,date[YAHOO.EU.Shopping.YUICalendarConf.MDY_DAY_POSITION-1])
}else{return new Date()}};YAHOO.util.Event.onDOMReady(function(){var iPopupWidth=550;var iPopupHeight=550;YAHOO.util.Event.addListener("level-results-page","click",function(e){YAHOO.EU.Shopping.openInPopup(e,iPopupWidth,iPopupHeight)
});YAHOO.util.Event.addListener("product-overlay","click",function(e){YAHOO.EU.Shopping.openInPopup(e,iPopupWidth,iPopupHeight)});YAHOO.util.Event.addListener("merchant-desc","click",function(e){YAHOO.EU.Shopping.openInPopup(e,iPopupWidth,iPopupHeight)
});YAHOO.util.Event.addListener("sbot","click",function(e){YAHOO.EU.Shopping.openInPopup(e,iPopupWidth,iPopupHeight)});YAHOO.util.Event.addListener("store-profile","click",function(e){YAHOO.EU.Shopping.openInPopup(e,iPopupWidth,iPopupHeight)
})});YAHOO.util.Event.onDOMReady(function(){YAHOO.util.Event.addListener("mer-search","submit",function(e){var oSearchQuery=document.getElementById("mer-search-query");if(oSearchQuery.value==""){YAHOO.util.Event.stopEvent(e);
if(!document.getElementById("merchant-search-error")){var oError=document.createElement("p");oError.id="merchant-search-error";oError.appendChild(document.createTextNode(YAHOO.EU.Shopping.locale.merchantSearchError));
document.getElementById("mer-search").insertBefore(oError,oSearchQuery)}}})});YAHOO.util.Event.onDOMReady(function(){var oShowMoreCatsLnk=document.getElementById("pop-cats-show");var oHideMoreCatsLnk=document.getElementById("pop-cats-hide");
var oMoreCatsDiv=document.getElementById("more-other-cats");if(oShowMoreCatsLnk&&oHideMoreCatsLnk){YAHOO.util.Event.addListener(oShowMoreCatsLnk,"click",function(e){YAHOO.util.Event.preventDefault(e);YAHOO.util.Dom.removeClass(oMoreCatsDiv,"hide");
YAHOO.util.Dom.addClass(oShowMoreCatsLnk,"hide");YAHOO.util.Dom.removeClass(oHideMoreCatsLnk,"hide")});YAHOO.util.Event.addListener(oHideMoreCatsLnk,"click",function(e){YAHOO.util.Event.preventDefault(e);
YAHOO.util.Dom.addClass(oMoreCatsDiv,"hide");YAHOO.util.Dom.removeClass(oShowMoreCatsLnk,"hide");YAHOO.util.Dom.addClass(oHideMoreCatsLnk,"hide")})}});(function(){if(!window.console){window.console={};
window.console.log=function(){return false}}var aPreload=["http://r6.kelkoo.com/ux/common/sprite-global.png","http://r6.kelkoo.com/ux/common/sprite-button.png"];var pre=[];for(var i=0,j=aPreload.length;
i<j;i++){pre[i]=new Image();pre[i].src=aPreload[i]}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 aLinks=YAHOO.util.Dom.getElementsByClassName("form-add-more","a");
for(var i=0,j=aLinks.length;i<j;i++){YAHOO.util.Dom.setStyle(aLinks[i],"display","inline");YAHOO.util.Event.addListener(aLinks[i],"click",YAHOO.EU.Shopping.partnerwithus.createField,this,true)}},createField:function(e){YAHOO.util.Event.preventDefault(e);
var targetEl=YAHOO.util.Event.getTarget(e);var targetElParent=targetEl.parentNode;var targetTitle=targetEl.title;var aSpan=YAHOO.util.Dom.getElementsByClassName("form-original-fields","span",targetElParent);
var aMoreSpan=YAHOO.util.Dom.getElementsByClassName("form-more-fields","span",targetElParent);if(aMoreSpan.length<=8){if(aSpan[0]){var oSpan=document.createElement("span");YAHOO.util.Dom.addClass(oSpan,"form-more-fields");
oSpan.innerHTML="<label>&nbsp;</label>"+aSpan[0].innerHTML;if(aMoreSpan.length<2){targetElParent.appendChild(oSpan)}if(targetTitle=="input"){targetElParent.appendChild(oSpan)}}}}};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 links=YAHOO.util.Dom.getElementsByClassName("obfuscateEmail","a");var spans=YAHOO.util.Dom.getElementsByClassName("obfuscateEmail","span");
return this.unObfuscate(links)&&this.unObfuscate(spans)},unObfuscate:function(aMails){var length=aMails.length;var obfuscationKey=YAHOO.EU.Shopping.locale.obfuscationKey;for(var i=0;i<length;i++){aMails[i].innerHTML=aMails[i].innerHTML.replace(obfuscationKey,"@","g");
if(aMails[i].tagName.toLowerCase()=="a"){aMails[i].href=aMails[i].href.replace(obfuscationKey,"@","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(obj){var link=document.getElementById(obj.linkId);if(link){var hellip=document.getElementById(obj.spanHellipId);var descAfter=document.getElementById(obj.spanAfterId);
YAHOO.util.Event.on(link,"click",function(e){YAHOO.util.Event.stopEvent(e);link.blur();if(hellip&&descAfter&&link){hellip.className=(hellip.className=="show")?"hide":"show";descAfter.className=(descAfter.className=="show")?"hide":"show";
link.className=(link.className=="show-details")?"hide-details":"show-details";link.innerHTML=(link.innerHTML==obj.linkLabelShow)?obj.linkLabelHide:obj.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(url,title){if(typeof (window.external.AddFavorite)!="undefined"){if(title!=="undefined"){window.external.AddFavorite(url,title)
}else{window.external.AddFavorite(url,document.title)}return true}return false},setHomePage:function(ref,url){var a=document.createElement("a");a.href="#";a.style.behavior="url(#default#homepage)";if(typeof (a.setHomePage)!="undefined"){a.setHomePage(url);
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(e){YAHOO.util.Event.preventDefault(e);var url=window.location.href;if(url.indexOf("?")>=0){url=url+"&source=bookmark"
}else{url=url+"?source=bookmark"}var status=YAHOO.EU.Shopping.Utils.BookmarkManager.createBookmark(url,document.title);if(status){var sHref="http://"+window.location.host+YAHOO.EU.Shopping.config.bookmark.trackingUrl+"?"+YAHOO.EU.Shopping.config.bookmark.bookmarkParam;
sHref=YAHOO.EU.Shopping.linkTracking.getTrackerLink(sHref,"globalnav");YAHOO.EU.Shopping.linkTracking.trackUxActions(sHref)}});YAHOO.util.Event.addListener("homepageLink","click",function(e){YAHOO.util.Event.preventDefault(e);
var url=window.location.href;if(url.indexOf("?")>=0){url=url+"&source=homepage"}else{url=url+"?source=homepage"}var status=YAHOO.EU.Shopping.Utils.BookmarkManager.setHomePage(e,url);if(status){var sHref="http://"+window.location.host+YAHOO.EU.Shopping.config.bookmark.trackingUrl+"?"+YAHOO.EU.Shopping.config.bookmark.homepageParam;
sHref=YAHOO.EU.Shopping.linkTracking.getTrackerLink(sHref,"globalnav");YAHOO.EU.Shopping.linkTracking.trackUxActions(sHref)}})}})}};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(el,userConfig){YAHOO.EU.Shopping.Filters.superclass.constructor.call(this,el,userConfig)};YAHOO.extend(YAHOO.EU.Shopping.Filters,YAHOO.widget.Module);
YAHOO.EU.Shopping.Filters.pageFilters=[];YAHOO.EU.Shopping.Filters.prototype.init=function(el,userConfig){YAHOO.EU.Shopping.Filters.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.EU.Shopping.Filters);
if(userConfig){this.cfg.applyConfig(userConfig,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 groups=YAHOO.util.Dom.getElementsByClassName(this.element,"groups","ul");
if(!groups.length){return false}this.groups=groups;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(ignoreShowHideFilters){var tmp=this.element.getElementsByTagName("span");
var spans=[];for(var i=0,span;span=tmp[i];i++){spans.push(span)}var links=[];for(var i=0,span;span=spans[i];i++){if(span.id&&(span.id.indexOf("encoded-")==0)){var link=document.createElement("a");link.id=span.id;
link.href="#";link.innerHTML=span.innerHTML;link.className=span.className;span.parentNode.replaceChild(link,span)}}var calendar_groups=YAHOO.util.Dom.getElementsByClassName("calendar","li",this.groups);
if(calendar_groups.length){function initCalendar(args){var calendar_group=args[0];var obj=args[1];YAHOO.util.Dom.addClass(calendar_group,"calendar-js");var calendar_container=document.createElement("div");
calendar_container.id=calendar_group.id+"_cal_container";YAHOO.util.Dom.insertAfter(calendar_container,calendar_group.getElementsByTagName("h4")[0]);var calendar=new YAHOO.widget.Calendar("calendar"+calendar_group.id,calendar_container.id,YAHOO.EU.Shopping.YUICalendarConf);
calendar.cfg.setProperty("title",false);calendar.cfg.setProperty("close",false);var value_list=calendar_group.getElementsByTagName("ul")[0];var values=value_list.getElementsByTagName("li");calendar.renderCellDefault=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_OOM);
YAHOO.util.Dom.removeClass(cell,this.Style.CSS_CELL_SELECTABLE);cell.innerHTML=workingDate.getDate()};var renderBodyCell=function(workingDate,cell){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_SELECTABLE);
cell.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(workingDate)+"</a>";return YAHOO.widget.Calendar.STOP_RENDER};obj.calendar_dates={values:[]};for(var i=0;value=values[i];
i++){var link=value.getElementsByTagName("a")[0];if(link.innerHTML.indexOf("-")==4){obj.calendar_dates[link.innerHTML]=obj.calendar_dates.values.length;obj.calendar_dates.values.push({date:link.innerHTML,href:uxDecode64(link.id.replace("encoded-",""))});
var dparts=link.innerHTML.split("-");calendar.addRenderer(dparts[2]+"/"+dparts[1]+"/"+dparts[0],renderBodyCell)}}var parts=obj.calendar_dates.values[0].date.split("-");var min_date=parts[2]+"/"+parts[1]+"/"+parts[0];
var min_month=parts[1]+"/"+parts[0];parts=obj.calendar_dates.values[obj.calendar_dates.values.length-1].date.split("-");var max_date=parts[2]+"/"+parts[1]+"/"+parts[0];calendar.cfg.setProperty("mindate",min_date);
calendar.cfg.setProperty("maxdate",max_date);calendar.cfg.setProperty("pagedate",min_month);calendar.selectEvent.subscribe(YAHOO.EU.Shopping.Filters.prototype.onSelectCalendarDate,obj,true);calendar.render();
calendar_group.removeChild(value_list)}for(var i=0,calendar_group;calendar_group=calendar_groups[i];i++){YAHOO.util.Dom.onMethodAvailable("YAHOO.widget.Calendar",initCalendar,[calendar_group,this],false)
}}var filtersBody=document.getElementById("filters-bd");var isLevel3=document.getElementById("level3");if(filtersBody&&!isLevel3){filtersBody.style.position="relative"}var filtersContainer=document.getElementById("filters");
if(filtersContainer){YAHOO.util.Event.on("filter-refine-by","click",YAHOO.EU.Shopping.Filters.handleFiltersCollapse,true,true)}var filterTitles=YAHOO.util.Dom.getElementsBy(function(){return true},"h4","filters",function(element){YAHOO.util.Event.addListener(element,"click",YAHOO.EU.Shopping.Filters.handleFiltersToggled)
})};YAHOO.EU.Shopping.Filters.prototype.leftPadDatePart=function(s){s=s.toString();return(s.length==1)?("0"+s):s};YAHOO.EU.Shopping.Filters.prototype.onSelectCalendarDate=function(){var tmp=arguments[1][0][0];
var date=tmp[0]+"-"+this.leftPadDatePart(tmp[1])+"-"+this.leftPadDatePart(tmp[2]);document.location.href=this.calendar_dates.values[this.calendar_dates[date]].href};YAHOO.EU.Shopping.Filters.updateRemoveFiltersURLs=function(){var filters=YAHOO.util.Dom.getElementsByClassName("remove-selected","a","filters");
if(filters){for(i=0;i<filters.length;i++){var target=filters[i];target.href=uxDecode64(target.id.replace("encoded-",""))}}};YAHOO.EU.Shopping.Filters.prototype.linkHandler=function(e){var target=YAHOO.util.Event.getTarget(e);
if(!target){return }var was_child=false;if(target.parentNode.tagName.toLowerCase()=="a"){target=target.parentNode;was_child=true}if(target.nodeName.toLowerCase()=="a"){if(e.type=="click"){if((target.id.indexOf("encoded-")===0)&&(target.getAttribute("href")=="#")){var innerhtml=target.innerHTML;
target.href=uxDecode64(target.id.replace("encoded-",""));target.innerHTML=innerhtml}if(YAHOO.util.Dom.hasClass(target,"more")){YAHOO.util.Event.stopEvent(e);this.onClickFilter(target.href);this.toggleLoadingImage(target);
return }var parent=target.parentNode;while(parent&&(parent.id!="filters")){if((parent.nodeName.toLowerCase()=="li")&&YAHOO.util.Dom.hasClass(parent,"also")){YAHOO.util.Event.stopEvent(e);this.onToggleFilter(target.href);
this.toggleLoadingImage(parent);return }else{parent=parent.parentNode}}}}};YAHOO.EU.Shopping.Filters.prototype.onClickFilter=function(url){var origURL=url;var url=this.appendParamToUrl(url,"retrieveFiltersOnlyGETParameter",true);
var callback={success:this.onClickFilterSuccess,failure:this.onFilterRxFailure,argument:[origURL],timeout:5000,scope:this};var request=YAHOO.util.Connect.asyncRequest("GET",url,callback)};YAHOO.EU.Shopping.Filters.prototype.onClickFilterSuccess=function(request){var filters=document.getElementById("filters");
var results=document.getElementById("level-results-page");var div=document.createElement("div");div.innerHTML=request.responseText;div.style.display="none";var filtersParent=filters.parentNode;filtersParent.appendChild(div);
var new_filters=document.getElementById("filter-values");var new_results=null;for(var child=div.firstChild;child;child=child.nextSibling){if(child.id=="level-results-page"){new_results=child}}if(new_filters!==undefined){var filter=document.getElementById(new_filters.className);
var old_filters=YAHOO.util.Dom.getElementsBy(function(){return true},"ul",filter)[0];new_filters=YAHOO.util.Dom.getElementsBy(function(){return true},"ul",new_filters)[0];filter.replaceChild(new_filters,old_filters)
}if(new_results){filtersParent.replaceChild(new_results,filters);YAHOO.EU.Shopping.Results.pageResults[0]=new YAHOO.EU.Shopping.Results("level-results-page")}filtersParent.removeChild(div)};YAHOO.EU.Shopping.Filters.prototype.toggleLoadingImage=function(parent){if(document.getElementById("filter-refine-by")){var oRefineBy=document.getElementById("filter-refine-by")
}else{var oRefineBy=parent}var loadingImage=document.getElementById("filter-loading");if(!loadingImage){var oI=document.createElement("img");oI.id="filter-loading";YAHOO.util.Dom.addClass(oI,"loading");
oI.src="http://r6.kelkoo.com/ux/common/loader-small.gif";oI.alt=YAHOO.EU.Shopping.locale.loading;oI.width=16;oI.height=16;oRefineBy.appendChild(oI)}else{if(loadingImage&&YAHOO.util.Dom.hasClass(loadingImage,"hidden")){YAHOO.util.Dom.removeClass(loadingImage,"hidden")
}else{if(loadingImage&&!YAHOO.util.Dom.hasClass(loadingImage,"hidden")){YAHOO.util.Dom.addClass(loadingImage,"hidden")}}}};YAHOO.EU.Shopping.Filters.prototype.onToggleFilter=function(url){var origURL=url;
var url=this.appendParamToUrl(url,"retrieveFiltersOnlyGETParameter",true);this.initEvent.fire(YAHOO.EU.Shopping.Filters);this.beforeToggleLastGroupEvent.fire(YAHOO.EU.Shopping.Filters);var callback={success:this.onToggleFilterSuccess,failure:this.onFilterRxFailure,argument:[origURL],timeout:5000,scope:this};
var request=YAHOO.util.Connect.asyncRequest("GET",url,callback)};YAHOO.EU.Shopping.Filters.prototype.onToggleFilterSuccess=function(request){if(request.status!=200){return false}var ajaxClass="filters";
if(YAHOO.util.Dom.hasClass(this.element,"gen-ter-mod")){ajaxClass="gen-ter-mod"}var filters=document.getElementById("filters");var div=document.createElement("div");div.innerHTML=request.responseText;var child=div.firstChild;
while(child){if((child.nodeName.toLowerCase()=="div")&&(child.id=="filters")&&(YAHOO.util.Dom.hasClass(child,ajaxClass))){break}child=child.nextSibling}if(child){this.toggle_group=null;this.also_group=null;
this.groups=null;this.element.innerHTML=child.innerHTML;this.element.className=child.className;this.initElementReferences();this.initDOMManipulations(true);var sFiltersButtonClass="toggled";var filtersButton=document.getElementById("filter-refine-by");
if(YAHOO.util.Dom.hasClass(filtersButton,sFiltersButtonClass)){YAHOO.EU.Shopping.Filters.handleFiltersCollapse(undefined,undefined)}}this.redrawIE6()};YAHOO.EU.Shopping.Filters.prototype.onFilterRxFailure=function(request){if(request.argument&&request.argument[0]!=""){window.location=request.argument[0]
}};YAHOO.EU.Shopping.Filters.prototype.appendParamToUrl=function(url,param,is_property){if(is_property){param=this.cfg.getProperty(param)}if(url.indexOf("?")!=-1){if(url.charAt(url.length-1)!="?"){url+="&"
}}else{url+="?"}return url+param};YAHOO.EU.Shopping.Filters.prototype.redrawIE6=function(){if(YAHOO.env.ua.ie===6){var filterSearchForm=YAHOO.util.Dom.getElementsByClassName("search","div","filters");if(filterSearchForm.length>0){var filterSearchButton=filterSearchForm[0].getElementsByTagName("button");
if(filterSearchButton.length>0){filterSearchButton[0].style.display="none";setTimeout(function(){filterSearchButton[0].style.display="inline-block"},0)}}}};YAHOO.EU.Shopping.Filters.postCodeDescription=function(){var field=YAHOO.util.Dom.get("filters-postCode");
var defaultValue=YAHOO.EU.Shopping.locale.postCodeDescription;if(field&&defaultValue){if(field.value==""){field.value=defaultValue}field.onclick=function(e){if(this.value==defaultValue){this.value=""}};
var formNode=YAHOO.util.Dom.get("form-geolocRefinement");var postCodeForm=(formNode)?formNode:field.parentNode;if(postCodeForm&&postCodeForm.tagName=="FORM"){postCodeForm.onsubmit=function(e){YAHOO.util.Event.preventDefault(e);
if(field.value==defaultValue){field.value=""}postCodeForm.submit()}}}};YAHOO.EU.Shopping.Filters.handleFiltersToggled=function(event){var element=YAHOO.util.Event.getTarget(event);var oFiltersListItem=element.parentNode;
var sFiltersToggledClass="toggled";if(YAHOO.util.Dom.hasClass(oFiltersListItem,sFiltersToggledClass)){YAHOO.util.Dom.removeClass(oFiltersListItem,sFiltersToggledClass)}else{YAHOO.util.Dom.addClass(oFiltersListItem,sFiltersToggledClass)
}};YAHOO.EU.Shopping.Filters.handleFiltersCollapse=function(event,bToggle){if(event!==undefined){YAHOO.util.Event.preventDefault(event)}var sFiltersButtonClass="toggled";var sHideClass="hide";var filtersButton=document.getElementById("filter-refine-by");
var filtersBody=document.getElementById("filters-bd");var filtersInfos=document.getElementById("filters-info");if(filtersButton&&filtersBody&&filtersInfos){if(YAHOO.util.Dom.hasClass(filtersButton,sFiltersButtonClass)){YAHOO.util.Dom.removeClass(filtersButton,sFiltersButtonClass);
filtersButton.blur()}else{YAHOO.util.Dom.addClass(filtersButton,sFiltersButtonClass)}if(YAHOO.util.Dom.hasClass(filtersBody,sHideClass)){YAHOO.util.Dom.removeClass(filtersBody,sHideClass)}else{YAHOO.util.Dom.addClass(filtersBody,sHideClass)
}if(YAHOO.util.Dom.hasClass(filtersInfos,sHideClass)){YAHOO.util.Dom.removeClass(filtersInfos,sHideClass)}else{YAHOO.util.Dom.addClass(filtersInfos,sHideClass)}}};YAHOO.util.Event.onContentReady("filters",function(){var filtersContainer=document.getElementById("filters");
if(!YAHOO.util.Dom.hasClass(filtersContainer,"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(el,userConfig){YAHOO.EU.Shopping.Results.superclass.constructor.call(this,el,userConfig)};YAHOO.extend(YAHOO.EU.Shopping.Results,YAHOO.widget.Module);
YAHOO.EU.Shopping.Results.pageResults=[];YAHOO.EU.Shopping.Results.prototype.init=function(el,userConfig){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var jsperfid=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.Results.prototype.init");
var jsperfused=-1}YAHOO.EU.Shopping.Results.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.EU.Shopping.Results);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initElementReferences();
this.initDOMEventListeners();this.initDOMManipulations();this.initEvent.fire(YAHOO.EU.Shopping.Results);if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(jsperfid,jsperfused)}};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 compare_form=this.element.getElementsByTagName("form")[1]||undefined;
if(compare_form){YAHOO.util.Event.addListener(this.element.getElementsByTagName("form")[1],"submit",this.onSubmitCompareForm,this,true);var inputs=compare_form.getElementsByTagName("input");for(var i=0,input;
input=inputs[i];i++){if(input.getAttribute("type")=="checkbox"){YAHOO.util.Event.addListener(input,"click",this.onCheckCompareForm,compare_form,true)}}}};YAHOO.EU.Shopping.Results.prototype.onClick=function(e){var target=YAHOO.util.Event.getTarget(e);
if((target.nodeName.toLowerCase()=="input")&&(YAHOO.util.Dom.hasClass(target,"date"))){YAHOO.util.Event.stopEvent(e);var region=YAHOO.util.Dom.getRegion(target);this.calendar.show();this.calendar.text_field=target;
var parent_form=target;while(parent_form.tagName.toLowerCase()!="form"){parent_form=parent_form.parentNode}var inputs=parent_form.getElementsByTagName("input");var from_input=null;var to_input=null;for(var i=0,input;
input=inputs[i];i++){if(YAHOO.util.Dom.hasClass(input,"from")){from_input=input}if(YAHOO.util.Dom.hasClass(input,"to")){to_input=input}}if(YAHOO.util.Dom.hasClass(target,"from")&&(to_input!=null)){var date_parts=to_input.value.split("/");
if(date_parts.length==3){var max_date=date_parts[0]+"/"+date_parts[1]+"/"+date_parts[2];this.calendar.cfg.setProperty("mindate",new Date())}}if(YAHOO.util.Dom.hasClass(target,"to")&&(from_input!=null)){var date_parts=from_input.value.split("/");
if(parent_form.catId&&parent_form.catId.value=="170701"&&date_parts.length==3){var min_date=date_parts[0]+"/"+date_parts[1]+"/"+date_parts[2];var dateMin=new Date(date_parts[2],date_parts[1]-1,date_parts[0]);
dateMin.setDate(dateMin.getDate()+1);this.calendar.cfg.setProperty("mindate",dateMin)}else{if(date_parts.length==3){var min_date=date_parts[0]+"/"+date_parts[1]+"/"+date_parts[2];this.calendar.cfg.setProperty("mindate",min_date)
}}}if(target.value.length){var date_parts=target.value.split("/");if(date_parts.length==3){var selected_date=date_parts[0]+"/"+date_parts[1]+"/"+date_parts[2];this.calendar.cfg.setProperty("selected",selected_date);
this.calendar.cfg.setProperty("pagedate",date_parts[1]+"/"+date_parts[2])}}this.calendar.render();var calendar_container=document.getElementById("calendar_container");calendar_container.style.position="absolute";
YAHOO.util.Dom.setXY(calendar_container,[region.left,region.bottom]);if(YAHOO.util.Dom.isAncestor("action-zoom-container",target)){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 input_date=YAHOO.util.Dom.getElementsByClassName("date-js","input","action-zoom-container");YAHOO.util.Event.removeListener(input_date,"mouseover");YAHOO.util.Event.addListener(input_date,"mouseover",YAHOO.EU.Shopping.Utils.ZoomManagement.manageLayer,{offerId:YAHOO.EU.Shopping.Utils.ZoomManagement.extendedShown})
}}if(YAHOO.util.Dom.hasClass(target,"show-hide-details")){YAHOO.util.Event.stopEvent(e);this.showHideDetails(target)}if(YAHOO.util.Dom.hasClass(target,"show-hide-dates")){YAHOO.util.Event.stopEvent(e);
var m=new RegExp("(show|hide)-dates-(.+)$").exec(target.id);if(m==null){return }var index=m[2];var action=m[1];var reverseaction=(action=="show")?"hide":"show";YAHOO.util.Dom.removeClass(target,"show-dates");
YAHOO.util.Dom.addClass(target,"hide-dates");YAHOO.util.Dom.removeClass(YAHOO.util.Dom.get(reverseaction+"-dates-"+index),"hide-dates");YAHOO.util.Dom.addClass(YAHOO.util.Dom.get(reverseaction+"-dates-"+index),"show-dates");
YAHOO.util.Dom.removeClass(YAHOO.util.Dom.get("list-dates-"+index),reverseaction+"-dates");YAHOO.util.Dom.addClass(YAHOO.util.Dom.get("list-dates-"+index),action+"-dates")}if((target.tagName.toLowerCase()=="a")&&YAHOO.util.Dom.hasClass(target.parentNode,"current-view-info")){YAHOO.util.Event.stopEvent(e);
if(YAHOO.util.Dom.hasClass(target,"used")){var value="used"}else{var value="all"}var select=document.getElementById("results-newused");if(select){var option=select.options[0];while(option){if(option.value==value){option.selected=true;
break}option=option.nextSibling}select.form.submit()}}if((target.tagName.toLowerCase()=="label")&&(target.htmlFor=="results-view-Details")){var show_hide_links=YAHOO.util.Dom.getElementsByClassName("show-hide-details");
for(var i=0,link;link=show_hide_links[i];i++){this.showHideDetails(link)}}};YAHOO.EU.Shopping.Results.prototype.onSubmitCompareForm=function(e){var num_total=0;var num_checked=0;var form=YAHOO.util.Event.getTarget(e);
var inputs=form.getElementsByTagName("input");for(var i=0,input;input=inputs[i];i++){if(input.getAttribute("type")=="checkbox"){num_total++;if(input.checked){num_checked++}}}if(num_total>0&&num_checked<2){YAHOO.util.Event.stopEvent(e);
var submits=form.getElementsByTagName("button");YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(submits[0],YAHOO.EU.Shopping.locale.minProductsToCompare,"compare-min-error");YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(submits[1],YAHOO.EU.Shopping.locale.minProductsToCompare,"compare-min-error-2");
return false}return true};YAHOO.EU.Shopping.Results.prototype.onCheckCompareForm=function(e,compare_form){var num_total=0;var num_checked=0;var checkedBox=YAHOO.util.Event.getTarget(e);if(checkedBox.checked){var inputs=compare_form.getElementsByTagName("input");
for(var i=0,input;input=inputs[i];i++){if(input.getAttribute("type")=="checkbox"){num_total++;if(input.checked){num_checked++}}}var max_compare=compare_form.getAttribute("max_compare");if(num_checked>max_compare){YAHOO.log("superieur a max");
YAHOO.util.Event.stopEvent(e);checkedBox.checked=false;var sErrorMsg=YAHOO.EU.Shopping.locale.maxProductsToCompare.replace("MAX_COMPARE",max_compare);YAHOO.EU.Shopping.tooltipMsg.setWarningMsg(checkedBox.parentNode,sErrorMsg,"compare-max-error");
return false}return true}};Date.prototype.getFullDate=function(){var myDate=this.getDate();var s_myDate=myDate;if(myDate<10){s_myDate="0"+myDate}return s_myDate};Date.prototype.getFullMonth=function(){var myMonth=this.getMonth()+1;
var s_myMonth=myMonth;if(myMonth<10){s_myMonth="0"+myMonth}return s_myMonth};YAHOO.EU.Shopping.Results.prototype.exportCalendarIntoTextField=function(myDate,element){var myValue=null;if(YAHOO.EU.Shopping.YUICalendarConf.MDY_DAY_POSITION<YAHOO.EU.Shopping.YUICalendarConf.MDY_MONTH_POSITION){myValue=myDate.getFullDate()+YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+myDate.getFullMonth()
}else{myValue=myDate.getFullMonth()+YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+myDate.getFullDate()}if(YAHOO.EU.Shopping.YUICalendarConf.MDY_YEAR_POSITION==3){myValue+=YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+myDate.getFullYear()
}else{myValue=+YAHOO.EU.Shopping.YUICalendarConf.DATE_FIELD_DELIMITER+myDate.getFullYear()}element.value=myValue};YAHOO.EU.Shopping.Results.prototype.onCalendarDateSelected=function(type,args,obj){var dates=args[0];
var date=dates[0];var year=date[0],month=date[1],day=date[2];var myDate=new Date();myDate.setFullYear(year,month-1,day);YAHOO.EU.Shopping.Results.prototype.exportCalendarIntoTextField(myDate,this.calendar.text_field);
this.calendar.hide();var parent_form=document.getElementById(this.calendar.text_field.id);while(parent_form.tagName.toLowerCase()!="form"){if(!parent_form.parentNode){return }parent_form=parent_form.parentNode
}var inputs=parent_form.getElementsByTagName("input");var from_input=null;var to_input=null;for(var i=0,input;input=inputs[i];i++){if(YAHOO.util.Dom.hasClass(input,"from")){from_input=input}if(YAHOO.util.Dom.hasClass(input,"to")){to_input=input
}}if(YAHOO.util.Dom.hasClass(this.calendar.text_field,"from")&&(to_input!=null)){var toDate=new Date();toDate.setFullYear(year,month-1,day+5);YAHOO.EU.Shopping.Results.prototype.exportCalendarIntoTextField(toDate,to_input);
var myAnim=new YAHOO.util.ColorAnim(to_input,{backgroundColor:{to:"#FFF",from:"#FFFF00"}},1,YAHOO.util.Easing.easeIn);myAnim.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 fieldsets=this.form.getElementsByTagName("fieldset");if(!fieldsets.length){return }if(fieldsets.length>=1){var labels=fieldsets[0].getElementsByTagName("label")}else{var labels=fieldsets[1].getElementsByTagName("label")
}var detailed_view=false;for(var i=0,label;label=labels[i];i++){var radio=document.getElementById(label.htmlFor);if(radio&&radio.getAttribute("type")=="radio"){radio.style.display="none";if(radio.getAttribute("checked")=="checked"){radio.checked=true;
if(radio.id=="results-view-Detailed"){detailed_view=true}}if(radio.checked){YAHOO.util.Dom.addClass(label,"selected")}}YAHOO.util.Event.addListener(label,"click",this.changeViewType,this,true)}YAHOO.util.Dom.batch(this.form.getElementsByTagName("select"),function(el){YAHOO.util.Event.addListener(el,"change",function(){var currentPage=document.getElementById("results-currentPage");
if(currentPage){currentPage.parentNode.removeChild(currentPage)}this.submitViewTypeForm(this)},this,true)},this,true)}var bCalendar=false;var inputs=this.element.getElementsByTagName("input");for(var i=0,input;
input=inputs[i];i++){if(YAHOO.util.Dom.hasClass(input,"date")){YAHOO.util.Dom.addClass(input,"date-js");bCalendar=true}}if(bCalendar){var calendar_container=document.getElementById("calendar_container");
if(!calendar_container){calendar_container=document.createElement("div");calendar_container.id="calendar_container";YAHOO.util.Dom.addClass(calendar_container,"calendar-container");document.body.appendChild(calendar_container)
}function initCalendar(){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();calendar_container.style.display="none"}YAHOO.util.Dom.onMethodAvailable("YAHOO.widget.Calendar",initCalendar,this,true)
}var date_forms=YAHOO.util.Dom.getElementsBy(function(el){var reg=new RegExp(/^lvl-form-/);return(reg.test(el.id))},"form",this.element);if(YAHOO.lang.isArray(date_forms)&&date_forms.length>0){YAHOO.util.Dom.batch(date_forms,function(form){YAHOO.util.Event.addListener(form,"submit",YAHOO.EU.Shopping.Results.validateDateForm)
})}};YAHOO.EU.Shopping.Results.prototype.submitViewTypeForm=function(e){if(this.beforeSubmitViewTypeFormEvent.fire(this.form,this)){this.form.submit()}};YAHOO.EU.Shopping.Results.validateDateForm=function(e,form){if(e){var form=YAHOO.util.Event.getTarget(e);
YAHOO.util.Event.preventDefault(e)}function displayMessage(oInput,sErrorMessage){var myAnim=new YAHOO.util.ColorAnim(oInput,{backgroundColor:{to:"#FFF",from:"#FFFF00"}},4,YAHOO.util.Easing.easeIn);myAnim.animate();
alert(sErrorMessage)}var valid=false;if(form.departureDate&&!YAHOO.EU.Shopping.validate.isDate(form.departureDate.value)){displayMessage(form.departureDate,YAHOO.EU.Shopping.locale.wrongDateFormat)}else{valid=true
}var departureDate=YAHOO.widget.DateMath.getDate(form.departureDate.value);if(form.returnDate){var returnDate=form.returnDate.value;if(valid&&(!returnDate||!YAHOO.EU.Shopping.validate.isDate(returnDate))){displayMessage(form.returnDate,YAHOO.EU.Shopping.locale.wrongDateFormat);
valid=false}returnDate=YAHOO.widget.DateMath.getDate(returnDate);if(valid&&(departureDate.toString()!=returnDate.toString())&&!YAHOO.widget.DateMath.before(departureDate,returnDate)){displayMessage(form.returnDate,YAHOO.EU.Shopping.locale.returnDateBeforeDeparture);
valid=false}if(valid&&form.catId&&form.catId.value=="170701"&&departureDate.toString()==returnDate.toString()){displayMessage(form.returnDate,YAHOO.EU.Shopping.locale.returnDateEqualsDeparture);valid=false
}}if(valid&&!departureDate){displayMessage(form.departureDate,YAHOO.EU.Shopping.locale.wrongDateFormat);valid=false}var dDate=new Date();dDate.setHours(0);dDate.setMinutes(0);dDate.setSeconds(0);dDate.setMilliseconds(0);
if(valid&&YAHOO.widget.DateMath.before(departureDate,dDate)){displayMessage(form.departureDate,YAHOO.EU.Shopping.locale.departureDateBeforeToday);valid=false}if(valid){form.submit()}else{return false}};
YAHOO.EU.Shopping.Results.prototype.submitViewTypeForm=function(e){if(this.beforeSubmitViewTypeFormEvent.fire(this.form,this)){this.form.submit()}};YAHOO.EU.Shopping.Results.validateDateForm=function(e,form){if(e){var form=YAHOO.util.Event.getTarget(e);
YAHOO.util.Event.preventDefault(e)}function displayMessage(oInput,sErrorMessage){var myAnim=new YAHOO.util.ColorAnim(oInput,{backgroundColor:{to:"#FFF",from:"#FFFF00"}},4,YAHOO.util.Easing.easeIn);myAnim.animate();
alert(sErrorMessage)}var valid=false;if(form.departureDate&&!YAHOO.EU.Shopping.validate.isDate(form.departureDate.value)){displayMessage(form.departureDate,YAHOO.EU.Shopping.locale.wrongDateFormat)}else{valid=true
}var departureDate=YAHOO.widget.DateMath.getDate(form.departureDate.value);if(form.returnDate){var returnDate=form.returnDate.value;if(valid&&(!returnDate||!YAHOO.EU.Shopping.validate.isDate(returnDate))){displayMessage(form.returnDate,YAHOO.EU.Shopping.locale.wrongDateFormat);
valid=false}returnDate=YAHOO.widget.DateMath.getDate(returnDate);if(valid&&(departureDate.toString()!=returnDate.toString())&&!YAHOO.widget.DateMath.before(departureDate,returnDate)){displayMessage(form.returnDate,YAHOO.EU.Shopping.locale.returnDateBeforeDeparture);
valid=false}if(valid&&form.catId&&form.catId.value=="170701"&&departureDate.toString()==returnDate.toString()){displayMessage(form.returnDate,YAHOO.EU.Shopping.locale.returnDateEqualsDeparture);valid=false
}}if(valid&&!departureDate){displayMessage(form.departureDate,YAHOO.EU.Shopping.locale.wrongDateFormat);valid=false}var dDate=new Date();dDate.setHours(0);dDate.setMinutes(0);dDate.setSeconds(0);dDate.setMilliseconds(0);
if(valid&&YAHOO.widget.DateMath.before(departureDate,dDate)){displayMessage(form.departureDate,YAHOO.EU.Shopping.locale.departureDateBeforeToday);valid=false}if(valid){form.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(element){YAHOO.EU.Shopping.Results.initSingleExtendedView(element)
})}};YAHOO.EU.Shopping.Results.initSingleExtendedView=function(element){result=element;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(element,"click",function(e){YAHOO.util.Event.getTarget(e).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(e)},result,true)}};YAHOO.EU.Shopping.PromoToogle={currentToogle:null,initialized:false,initBodyEvent:function(){YAHOO.util.Event.addListener(document.body,"click",function(e){if(this.currentToogle!==null){var target=YAHOO.util.Event.getTarget(e);
while(target!==null&&!(target.nodeName.toLowerCase()=="div"&&YAHOO.util.Dom.hasClass(target,"toogle-content"))){target=target.parentNode}if(target==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(toogle){if(this.initialized==false){this.initBodyEvent()
}this.currentToogle=toogle;YAHOO.util.Dom.removeClass(toogle,"closed-toogle");YAHOO.util.Dom.addClass(toogle,"opened-toogle")},initShowToogle:function(){YAHOO.util.Dom.getElementsByClassName("promo-toogle","div","level-results-page",function(){var closedLink=YAHOO.util.Dom.getElementsByClassName("closed-toogle-link","a",this);
for(var i=0;i<closedLink.length;i++){YAHOO.util.Event.addListener(closedLink[i],"click",function(e){YAHOO.EU.Shopping.PromoToogle.showToogle(this);YAHOO.util.Event.stopEvent(e)},this,true)}})},initHideToogle:function(){YAHOO.util.Dom.getElementsByClassName("promo-toogle","div","level-results-page",function(){var openedLink=YAHOO.util.Dom.getElementsByClassName("opened-toogle-link","a",this);
for(var i=0;i<openedLink.length;i++){YAHOO.util.Event.addListener(openedLink[i],"click",function(e){YAHOO.EU.Shopping.PromoToogle.hideToogle();YAHOO.util.Event.stopEvent(e)},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 i=0;i<a.length;i++){this.set(a[i])}}},set:function(el){var ins=document.createElement("ins");el.appendChild(ins);
el.__ElipsisCheck=ins;var dEllipsis=document.createElement("var");el.appendChild(dEllipsis);el.__ElipsisStyle=dEllipsis.style;this.handleEllipsis.apply(el);el.addEventListener("overflow",this.handleEllipsis,false);
el.addEventListener("underflow",this.handleEllipsis,false)},handleEllipsis:function(){var oThis=this;setTimeout(function(){oThis.__ElipsisStyle.display=(oThis.__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(oElement){while(oElement.parentNode){var re=new RegExp(/offer-([a-z_-]+)/);var m=re.exec(oElement.className);if(!YAHOO.lang.isNull(m)&&m[1]!="form"){return m[1]
}oElement=oElement.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(url,id,date,view){var layer=document.getElementById("freeOfferLayer");
var offer=document.getElementById(id);if(date==""){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,layer,function(){this.innerHTML=date})}if((view!="grid")&&(layer.clientHeight<(offer.clientHeight-35))){YAHOO.util.Dom.setStyle(layer,"height",(offer.clientHeight-35)+"px")
}else{YAHOO.util.Dom.setStyle(layer,"height","auto")}YAHOO.util.Dom.getElementsByClassName("cta",null,layer,function(){this.setAttribute("href","javascript:uxViewLink('"+url+"', true);")});var offerPos=YAHOO.util.Dom.getXY(offer);
YAHOO.util.Dom.removeClass(layer,"hide");if(view=="grid"){YAHOO.util.Dom.setXY(layer,[offerPos[0]+20,offerPos[1]+160])}else{YAHOO.util.Dom.setXY(layer,[offerPos[0]+110,offerPos[1]+10])}YAHOO.util.Dom.getElementsByClassName("close",null,layer,function(){this.onclick=function(){YAHOO.util.Dom.addClass(layer,"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 YESz=YAHOO.EU.Shopping.Utils.ZoomManagement;
if(document.getElementById("product-overlay")!==null){var elements=null;var zoomButton=null;var i=0;if(document.getElementById("l3-photo")!==null){elements=YAHOO.util.Dom.getElementsByClassName("carousel-zoom","div","l3-photo");
for(i=0;i<elements.length;i++){if(elements[i].childNodes.length>0){zoomButton=YESz.getZoomButton(elements[i]);if(zoomButton){YAHOO.util.Event.addListener(zoomButton,"mouseover",YESz.manageLayer,{offerId:-2,isFreeOffer:false,isTravelOffer:false})
}}}}elements=YAHOO.util.Dom.getElementsByClassName("result","li","level-results-page");var isTravelOffer=false;var isFreeOffer=false;if(elements.length>0){this.createLayer(zoomButton);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",YESz.bodyOn,{offerId:-1,isFreeOffer:false,isTravelOffer:false})
}for(i=0;i<elements.length;i++){if(elements[i].childNodes.length>0){isFreeOffer=false;if(YAHOO.util.Dom.hasClass(elements[i],"offer-freeoffer")){isFreeOffer=true}isTravelOffer=false;if(YAHOO.util.Dom.hasClass(elements[i],"offer-flight_kelkoo")||YAHOO.util.Dom.hasClass(elements[i],"offer-hotel_kelkoo")||YAHOO.util.Dom.hasClass(elements[i],"offer-car_hire_kelkoo")){isTravelOffer=true
}if(YAHOO.util.Dom.hasClass(elements[i],"product-tile")){YAHOO.util.Event.removeListener(elements[i],"mouseover");YAHOO.util.Event.addListener(elements[i],"mouseover",YESz.manageLayer,{offerId:elements[i].id,isFreeOffer:isFreeOffer,isTravelOffer:isTravelOffer});
YAHOO.util.Event.removeListener(elements[i].getChildren,"mouseover")}zoomButton=YESz.getZoomButton(elements[i]);if(zoomButton){YAHOO.util.Event.removeListener(zoomButton,"mouseover");YAHOO.util.Event.addListener(zoomButton,"mouseover",YESz.manageLayer,{offerId:elements[i].id,isFreeOffer:isFreeOffer,isTravelOffer:isTravelOffer})
}}}}},getImage:function(target){var root=null;if(YAHOO.util.Dom.hasClass(target,"action-zoom")){root=YAHOO.util.Dom.getAncestorByClassName(target,"photo")}else{root=YAHOO.util.Dom.getElementsByClassName("photo",null,target)[0]
}var carousel=YAHOO.util.Dom.getElementsByClassName("carousel","div",root);if(carousel.length>0){return carousel[0]}else{var elems=YAHOO.util.Dom.getElementsBy(function(){return true},"img",root);if(elems.length>0){return elems[0]
}return null}},getMerchantImageSrc:function(target){var root=target.parentNode.parentNode;var elems=YAHOO.util.Dom.getElementsByClassName("merchant-image",null,root);if(elems.length>0){return elems[0].innerHTML
}return null},getZoomButton:function(root){var elems=YAHOO.util.Dom.getElementsByClassName("action-zoom",null,root);if(elems.length>0){YAHOO.util.Dom.setStyle(elems[0],"cursor","pointer");return elems[0]
}return null},manageLayer:function(e,o){var YESz=YAHOO.EU.Shopping.Utils.ZoomManagement;var target=YAHOO.util.Event.getTarget(e);var offerId=o.offerId;var isZoom=YAHOO.util.Dom.hasClass(target,"action-zoom");
if(target.title&&(target.title!=="")&&(target.tagName!="ACRONYM")){target.title=""}var offer=document.getElementById(offerId);if(((offerId==-1)||(offerId!=YESz.currentOffer))&&(YESz.currentOffer!==0)){clearTimeout(YESz.extendedTimeOut);
YESz.hideLayer();if(!isZoom){YESz.previousOffer=YESz.extendedShown}YESz.extendedShown=0;YESz.zoomOffer=0;YESz.zoomShown=false}if(offerId!=-1){if(YESz.isLayerNotDisplay(o.offerId)){return null}}if(offerId!=-1){if(isZoom&&!YESz.zoomShown&&((YESz.zoomOffer!=YESz.currentOffer)||(YESz.zoomOffer===0))){clearTimeout(YESz.extendedTimeOut);
YAHOO.util.Dom.removeClass(offer,"hover");var merchantImageSrc=YESz.getMerchantImageSrc(target);var smallImage=YESz.getImage(target);if(smallImage&&merchantImageSrc){YESz.currentSmallImage=smallImage;YAHOO.util.Dom.addClass(smallImage,"hover");
YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getAncestorByClassName(smallImage,"result"),"hover");if(YESz.extendedShown===YESz.currentOffer){YESz.createLayer(smallImage);YESz.displayImage(smallImage,merchantImageSrc);
YESz.zoomShown=true}else{YESz.zoomShown=false;YESz.extendedTimeOut=setTimeout(function(){YESz.createLayer(smallImage);YESz.displayImage(smallImage,merchantImageSrc);YESz.zoomShown=true},YESz.extendedTimeOutDuration)
}YAHOO.util.Event.removeListener("product-overlay","mouseover");if((target.tagName!="EM")&&!o.isFreeOffer){YAHOO.util.Event.addListener("product-overlay","mouseover",YESz.manageLayer,{offerId:offerId})
}else{YAHOO.util.Event.addListener("product-overlay","mouseover",YESz.hideLayer)}YESz.zoomOffer=offerId;YESz.previousOffer=0}}else{if(!isZoom&&((offerId!=YESz.currentOffer)||((offerId==YESz.currentOffer)&&(YESz.extendedBlocked))||(YESz.zoomOffer==YESz.currentOffer))){clearTimeout(YESz.extendedTimeOut);
if(o.isFreeOffer&&YESz.zoomShown){YESz.hideLayer();YESz.zoomShown=false}var smallImage=YESz.getImage(offer);YESz.currentSmallImage=smallImage;YAHOO.util.Dom.removeClass(YESz.currentSmallImage,"hover");
YAHOO.util.Dom.addClass(offer,"hover");offer.style.display="none";offer.style.display="block";if((!o.isFreeOffer)&&((offerId!=YESz.extendedShown)||YESz.zoomShown)){if(YESz.zoomShown){YAHOO.util.Dom.removeClass(YESz.currentSmallImage,"hover");
YESz.displayExtended(offer,smallImage,o);YESz.extendedShown=offerId;YESz.zoomShown=false}else{YESz.extendedTimeOut=setTimeout(function(){YESz.createLayer(smallImage);YESz.displayExtended(offer,smallImage,o);
YAHOO.util.Event.removeListener("product-overlay","mouseover");YAHOO.util.Event.addListener("product-overlay","mouseover",YESz.manageLayer,{offerId:offerId});YESz.extendedShown=offerId},YESz.extendedTimeOutDuration)
}}YESz.zoomOffer=0}}}if(offerId==-1){YESz.currentOffer=0}else{YESz.currentOffer=offerId}YESz.extendedBlocked=false},bodyOn:function(e,o){var YESz=YAHOO.EU.Shopping.Utils.ZoomManagement;var target=YAHOO.util.Event.getTarget(e);
if(YESz.currentOffer!==0){if(!YAHOO.util.Dom.isAncestor("product-overlay",target)&&!(target.id=="product-overlay")&&!(YAHOO.util.Dom.isAncestor("level-results-page",target)&&YAHOO.util.Dom.hasClass("level-results-page","results-grid")&&(target.parentNode.className!="grid-3"))&&!YAHOO.util.Dom.hasClass(target,"action-zoom")&&!YAHOO.util.Dom.isAncestor("calendar_container",target)&&!(target.id=="calendar_container")){YESz.manageLayer(e,o)
}}},createLayer:function(smallImage){var YESz=YAHOO.EU.Shopping.Utils.ZoomManagement;var mainContainer=document.getElementById("action-zoom-container");var pointerDiv=document.getElementById("action-zoom-pointer");
var contentSpan=null;YESz.isImageLoadingOk=false;clearTimeout(YESz.zoomFailureTimeOut);if(mainContainer===null){mainContainer=document.createElement("div");mainContainer.id="action-zoom-container";mainContainer.className="yui-module yui-overlay";
document.getElementById("product-overlay").appendChild(mainContainer);YAHOO.util.Dom.setStyle(mainContainer,"visibility","hidden");pointerDiv=document.createElement("div");pointerDiv.id="action-zoom-pointer";
document.getElementById("product-overlay").appendChild(pointerDiv);var leftSpan=document.createElement("span");leftSpan.className="action-zoom-left";mainContainer.appendChild(leftSpan);var bottomSpan=document.createElement("span");
bottomSpan.className="action-zoom-bottom";leftSpan.appendChild(bottomSpan);var topSpan=document.createElement("span");topSpan.className="action-zoom-top";bottomSpan.appendChild(topSpan);var rightSpan=document.createElement("span");
rightSpan.className="action-zoom-right";topSpan.appendChild(rightSpan);if(YESz.dropDown===null){YESz.dropDown=new YAHOO.widget.Overlay(mainContainer,{visible:false,monitorresize:true,iframe:true})}}var x=YAHOO.util.Dom.getX(smallImage);
YAHOO.util.Dom.setX("action-zoom-container",x+YESz.offsetLayerX);var y=YAHOO.util.Dom.getY(smallImage);YAHOO.util.Dom.setY("action-zoom-container",y+YESz.offsetLayerY)},hideLayer:function(){var YESz=YAHOO.EU.Shopping.Utils.ZoomManagement;
YESz.dropDown.cfg.setProperty("visible",false);YAHOO.util.Dom.removeClass(YESz.currentOffer,"hover");YAHOO.util.Dom.removeClass(YESz.extendedShown,"hover");YAHOO.util.Dom.removeClass(YESz.currentSmallImage,"hover");
var calendar_container=document.getElementById("calendar_container");if(calendar_container){calendar_container.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(smallImage,merchantImageSrc){var YESz=YAHOO.EU.Shopping.Utils.ZoomManagement;var x=YAHOO.util.Dom.getX(smallImage);
YAHOO.util.Dom.setX("action-zoom-pointer",x+YESz.defaultImageWidth+2);var y=YAHOO.util.Dom.getY(smallImage);YAHOO.util.Dom.setY("action-zoom-pointer",y+YESz.offsetPointerY);var contentSpan=YAHOO.util.Dom.getElementsByClassName("action-zoom-right","span","action-zoom-container")[0];
contentSpan.innerHTML="";var img=document.createElement("img");img.id="action-zoom-merchant-image";img.src=YESz.loadingImage;YAHOO.util.Dom.setStyle(img,"position","relative");YAHOO.util.Dom.setStyle(img,"top","37px");
YAHOO.util.Dom.setStyle(img,"left","0px");contentSpan.appendChild(img);YAHOO.util.Dom.setStyle(contentSpan,"width",YESz.defaultImageWidth+"px");YAHOO.util.Dom.setStyle(contentSpan,"height",YESz.defaultImageHeight+"px");
var pic;pic=new Image();pic.id="action-zoom-merchant-image";pic.src=merchantImageSrc;if(!pic.complete){if(YESz.extendedShown===0){YESz.setDropCoords(true,smallImage,YESz.defaultImageWidth,YESz.defaultImageHeight)
}YAHOO.util.Event.on(pic,"load",function(e){YESz.isImageLoadingOk=true;var largeWidth=pic.width;var largeHeight=pic.height;var newDim=YESz.calculateDim(largeWidth,largeHeight,(YAHOO.util.Dom.getAncestorByClassName(smallImage,"third")!==null));
if(newDim[0]!=-1){try{var img=YAHOO.util.Dom.get("action-zoom-merchant-image");img.src=pic.src;YAHOO.util.Dom.setStyle(img,"width",(newDim[0]+"px"));YAHOO.util.Dom.setStyle(img,"height",(newDim[1]+"px"));
YAHOO.util.Dom.setStyle(img,"top","0px");if(newDim[0]>=YESz.defaultImageWidth){YAHOO.util.Dom.setStyle(contentSpan,"width","auto")}YAHOO.util.Dom.setStyle(contentSpan,"height","auto");YESz.setDropCoords(false,smallImage,newDim[0],newDim[1])
}catch(err){}}else{YESz.isImageLoadingOk=false;YESz.handleFailure()}})}else{YESz.isImageLoadingOk=true;var largeWidth=pic.width;var largeHeight=pic.height;var newDim=YESz.calculateDim(largeWidth,largeHeight,(YAHOO.util.Dom.getAncestorByClassName(smallImage,"third")!==null));
if(newDim[0]!=-1){try{img.src=pic.src;YAHOO.util.Dom.setStyle(img,"width",(newDim[0]+"px"));YAHOO.util.Dom.setStyle(img,"height",(newDim[1]+"px"));YAHOO.util.Dom.setStyle(img,"top","0px");if(newDim[0]>=YESz.defaultImageWidth){YAHOO.util.Dom.setStyle(contentSpan,"width","auto")
}YAHOO.util.Dom.setStyle(contentSpan,"height","auto");YESz.setDropCoords(true,smallImage,newDim[0],newDim[1])}catch(err){}}else{YESz.isImageLoadingOk=false;YESz.handleFailure()}}YESz.zoomFailureTimeOut=setTimeout(YESz.handleFailure,5000);
YESz.showLayer();img.style.display="none";img.style.display="block"},displayExtended:function(target,smallImage,o){var YESz=YAHOO.EU.Shopping.Utils.ZoomManagement;var contentSpan=YAHOO.util.Dom.getElementsByClassName("action-zoom-right","span","action-zoom-container")[0];
var x=YAHOO.util.Dom.getX(smallImage);YAHOO.util.Dom.setX("action-zoom-pointer",x+YESz.defaultImageWidth+2);var offerTitle=YAHOO.util.Dom.getElementsBy(function(){return true},"h4",target)[0];var y=YAHOO.util.Dom.getY(offerTitle);
var yPadding=YAHOO.util.Dom.getStyle(offerTitle,"padding-top").replace("px","");YAHOO.util.Dom.setY("action-zoom-pointer",(y+(yPadding*1)+YESz.offsetExtendedPointerY));if(o.offerId!=YESz.previousOffer){contentSpan.innerHTML="";
YAHOO.util.Dom.setStyle(contentSpan,"width",YESz.limitWidth+"px");YAHOO.util.Dom.setStyle(contentSpan,"height","auto");var extendedDiv=document.createElement("div");extendedDiv.className="extended-information-container";
extendedDiv.innerHTML=YAHOO.util.Dom.getElementsByClassName("extended-information-container","div",target)[0].innerHTML;contentSpan.appendChild(extendedDiv);if(o.isTravelOffer){oResults=new YAHOO.EU.Shopping.Results("action-zoom-container");
YAHOO.util.Event.removeListener("calendar_container","mouseover");YAHOO.util.Event.addListener("calendar_container","mouseover",YESz.manageLayer,{offerId:YESz.extendedShown})}YAHOO.util.Event.addListener(YAHOO.util.Dom.getElementsByClassName("close","span","action-zoom-container"),"click",YESz.hideLayer)
}YESz.setDropCoords(true,smallImage,YESz.limitWidth,(contentSpan.offsetHeight+5));YESz.showLayer()},setDropCoords:function(bVisible,smallImage,width,height){var YESz=YAHOO.EU.Shopping.Utils.ZoomManagement;
var x=YAHOO.util.Dom.getX(smallImage);var y=YAHOO.util.Dom.getY(smallImage);YESz.dropDown.cfg.setProperty("width",(width+14)+"px");YESz.dropDown.cfg.setProperty("height",(height+14)+"px");YESz.dropDown.cfg.setProperty("x",x+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerX);
if(height>=(YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageHeight-2*YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerY)){y=(y+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerY)}else{y=(y+((YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageHeight-height)/2-5))
}var screenTop=YAHOO.util.Dom.getDocumentScrollTop();var screenBottom=YAHOO.util.Dom.getDocumentScrollTop()+YAHOO.util.Dom.getViewportHeight();var layerTop=y;var layerBottom=y+height;if(layerTop<screenTop){y=(y-layerTop+screenTop+10)
}else{if(layerBottom>screenBottom){y=(y-layerBottom+screenBottom-15)}}YESz.dropDown.cfg.setProperty("y",y);var pointer=document.getElementById("action-zoom-pointer");var yPointer=YAHOO.util.Dom.getY(pointer);
if(yPointer<(y+10)){YAHOO.util.Dom.setY(pointer,(y+10))}else{if(yPointer>(y+height-30)){YAHOO.util.Dom.setY(pointer,(y+height-30))}}if(bVisible){YESz.dropDown.cfg.setProperty("visible",true)}},isLayerNotDisplay:function(offerId){var YESz=YAHOO.EU.Shopping.Utils.ZoomManagement;
var offer=document.getElementById(offerId);if(offer===null){return false}var screenTop=YAHOO.util.Dom.getDocumentScrollTop();var screenBottom=YAHOO.util.Dom.getDocumentScrollTop()+YAHOO.util.Dom.getViewportHeight();
var offerTop=YAHOO.util.Dom.getY(offer);var offerBottom=offerTop+offer.offsetHeight;if(((offerTop+YESz.displayLimit)>screenBottom)||((offerBottom-YESz.displayLimit)<screenTop)){YAHOO.util.Dom.removeClass(YESz.currentOffer,"hover");
YAHOO.util.Dom.addClass(offer,"hover");YESz.currentOffer=offerId;YESz.extendedBlocked=true;return true}return false},calculateDim:function(width,height,limitWidth){var ratio=1;if(width<YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageWidth&&height<YAHOO.EU.Shopping.Utils.ZoomManagement.defaultImageHeight){return[-1,-1]
}if(limitWidth&&(width>YAHOO.EU.Shopping.Utils.ZoomManagement.limitWidth)){ratio=YAHOO.EU.Shopping.Utils.ZoomManagement.limitWidth/width;width=YAHOO.EU.Shopping.Utils.ZoomManagement.limitWidth;height=height*ratio
}if(width>YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageWidth){ratio=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageWidth/width;width=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageWidth;height=height*ratio
}if(height>YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageHeight){ratio=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageHeight/height;height=YAHOO.EU.Shopping.Utils.ZoomManagement.maxImageHeight;width=width*ratio
}return[width,height]},handleFailure:function(){if(!YAHOO.EU.Shopping.Utils.ZoomManagement.isImageLoadingOk){var smallImage=YAHOO.EU.Shopping.Utils.ZoomManagement.currentSmallImage;var zoomButton=YAHOO.EU.Shopping.Utils.ZoomManagement.currentZoom;
var pic=document.getElementById("action-zoom-merchant-image");pic.src=smallImage.src;pic.width=smallImage.width;pic.height=smallImage.height;YAHOO.util.Dom.setStyle(pic,"top","0px");var x=YAHOO.util.Dom.getX(smallImage);
YAHOO.util.Dom.setX("action-zoom-container",x+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerX);var y=YAHOO.util.Dom.getY(smallImage);YAHOO.util.Dom.setY("action-zoom-container",y+YAHOO.EU.Shopping.Utils.ZoomManagement.offsetLayerY);
contentSpan=YAHOO.util.Dom.getElementsByClassName("action-zoom-right","span","action-zoom-container")[0];if(pic.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,smallImage,smallImage.width,smallImage.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(car){var imgList=YAHOO.util.Dom.getElementsByClassName("img-list","ul",car);imgList=imgList[0];this.imageList=[];for(var i=0;
i<imgList.childNodes.length;i++){if(imgList.childNodes[i].nodeType==1){this.imageList.push(imgList.childNodes[i].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",car)[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",car),nextElement:YAHOO.util.Dom.getElementsByClassName("next","span",car),loadInitHandler:this.loadInitialItems,loadNextHandler:this.loadNextItems,loadPrevHandler:this.loadPrevItems,prevButtonStateHandler:this.handlePrevButtonState});
var result=car;while(result!==null&&YAHOO.util.Dom.hasClass(result,"result")===false){result=result.parentNode}if(result!==null&&!result.onExtendedViewChange){result.onExtendedViewChange=new YAHOO.util.CustomEvent(this);
result.onExtendedViewChange.subscribe(function(car,args){if(args[0].display=="show"){car.show()}})}};YAHOO.extend(YAHOO.EU.Shopping.Carousel,YAHOO.extension.Carousel,{_loadAll:true,_width:130,_height:130,loadInitialItems:function(type,args){if(YAHOO.util.Dom.hasClass(this.carouselList,"carousel_16_9")){this._width=120;
this._height=90}var start=args[0];this.load(start);if(this._loadAll){var size=this.getProperty("size");for(var i=start+1;i<=size;i++){this.load(i)}}else{this.load(start+1)}this.updateIcons()},loadNextItems:function(type,args){var start=args[0];
var alreadyCached=args[2];if(!alreadyCached){this.load(start)}this.updateIcons();this.updateZoomImage();this.load(start+1)},loadPrevItems:function(type,args){var start=args[0];var alreadyCached=args[2];
if(!alreadyCached){this.load(start)}this.updateIcons();this.updateZoomImage()},handlePrevButtonState:function(type,args){var enabling=args[0];var leftButton=args[1][0];if(enabling){YAHOO.util.Dom.removeClass(leftButton,"inactive")
}else{YAHOO.util.Dom.addClass(leftButton,"inactive")}},fmtItem:function(imgUrl){var innerHTML='<div><img src="'+imgUrl+'" width="'+this._width+'" height="'+this._height+'"/></div>';return innerHTML},updateIcons:function(){var visibleIndex=this.getLastVisible();
var icons=YAHOO.util.Dom.getElementsByClassName("position","span",this.carouselElem);for(var i=0;i<icons.length;i++){if(i==(visibleIndex-1)){YAHOO.util.Dom.addClass(icons[i],"active")}else{YAHOO.util.Dom.removeClass(icons[i],"active")
}}},updateZoomImage:function(){var merchantImage=YAHOO.util.Dom.getElementsByClassName("merchant-image","span",this.carouselElem);if(merchantImage.length>0){merchantImage[0].innerHTML=this.imageList[this.getLastVisible()-1]
}},load:function(start){if(this.imageList[start-1]!==null){this.addItem(start,this.fmtItem(this.imageList[start-1]))}}});YAHOO.EU.Shopping.initCaroussel=function(oRoot){if(YAHOO.EU.Shopping.Flags.carousel){YAHOO.util.Dom.getElementsByClassName("carousel","div",oRoot,function(carousel){if(!YAHOO.util.Dom.hasClass(carousel,"available")){YAHOO.util.Dom.setStyle(carousel,"display","block");
var tmp=new YAHOO.EU.Shopping.Carousel(carousel);YAHOO.util.Dom.addClass(carousel,"available");var parent=carousel.parentNode;YAHOO.util.Dom.getElementsByClassName("extended-photo","a",parent,function(img){YAHOO.util.Dom.setStyle(img,"display","none")
})}})}};YAHOO.util.Event.onDOMReady(function(){var oMinimodule=document.getElementById("l3-photo");if(oMinimodule){YAHOO.EU.Shopping.initCaroussel(oMinimodule)}})})();

YAHOO.namespace("YAHOO.EU.Shopping");YAHOO.EU.Shopping.ProductDetailOverlay=function(){};YAHOO.EU.Shopping.ProductDetailOverlay.prototype={getIdFromClass:function(sType,sClassName){var sRegExp=sType+"-(\\S+)";
var oRegExp=new RegExp(sRegExp);var aMatches=oRegExp.exec(sClassName);if(aMatches&&aMatches[1]){return aMatches[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 oDomList in this.aDomProductLists){var oDomListEl=this.aDomProductLists[oDomList];this.iCatId=this.getIdFromClass("cat",oDomListEl.className);
YAHOO.util.Event.addListener(oDomListEl,"mouseover",this.productDelegate,this,true)}var oBodyHide=function(e){if(this.bOpen){this.hide(this.oDomTarget,this.showDelayTimeout)}};YAHOO.util.Event.addListener(document.getElementsByTagName("html")[0],"click",oBodyHide,this,true);
YAHOO.util.Event.addListener(this.oDomProductOverlay,"click",function(e,o){YAHOO.util.Event.stopEvent(e)})},productDelegate:function(e,oDomObj){YAHOO.util.Event.stopEvent(e);var oDomTarget=YAHOO.util.Event.getTarget(e);
while(oDomTarget&&!(oDomTarget.id==this.oConfig.delegateId)){if(YAHOO.util.Dom.hasClass(oDomTarget,"photo")&&!YAHOO.util.Dom.hasClass(oDomTarget,"fn")){YAHOO.util.Dom.addClass(oDomTarget,"active");YAHOO.util.Event.addListener(oDomTarget,"mouseout",this.hideTimeout,oDomTarget,this);
var oDomListItem=oDomTarget.parentNode.parentNode.parentNode;var sProdId=this.getIdFromClass("prod",oDomListItem.className);var iCatId=this.getIdFromClass("cat",oDomListItem.className);if(!iCatId){iCatId=this.iCatId
}if(this.oDomTarget&&this.oDomTarget!=oDomTarget){this.hide(this.oDomTarget,this.showDelayTimeout)}this.showDelayTimeout=window.setTimeout(function(){YAHOO.EU.Shopping.ProductDetailOverlay.instance.show(oDomTarget,sProdId,iCatId)
},800);break}else{oDomTarget=oDomTarget.parentNode}}},show:function(oDomTarget,sProdId,iCatId){this.oDomTarget=oDomTarget;this.oDomProductLink=oDomTarget.parentnode;if(this.bOpen){return }var self=this;
var oCallback={success:self.ajaxSuccess,failure:self.ajaxFailure,scope:self,argument:{sProdId:sProdId}};var sUrl="/ctl/do/asyncCall/ajax-product/?catId="+iCatId+"&pid="+sProdId;this.oConnection=YAHOO.util.Connect.asyncRequest("GET",sUrl,oCallback);
this.oProductOverlay.cfg.setProperty("context",[oDomTarget,"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,oDomTarget,this);this.bOpen=true},ajaxSuccess:function(oAjaxResponse){var sOverlayHtml=oAjaxResponse.responseText;
if(YAHOO.EU.Shopping.Results&&YAHOO.EU.Shopping.Results.pageResults&&YAHOO.EU.Shopping.Results.pageResults[0]){var sDesc=YAHOO.EU.Shopping.Results.pageResults[0].full_descriptions[oAjaxResponse.argument.sProdId];
if(sDesc){sDesc=sDesc.replace(/<\/?div>/g,"span");sOverlayHtml=sOverlayHtml.replace("%DESCRIPTION%",sDesc)}else{sOverlayHtml=sOverlayHtml.replace("<p>%DESCRIPTION%</p>","")}}this.oProductOverlay.setBody(sOverlayHtml)
},ajaxFailure:function(oAjaxResponse){this.oProductOverlay.hide()},hideTimeout:function(e,oDomTarget){if(!this.bOpen){window.clearTimeout(this.showDelayTimeout);YAHOO.util.Dom.removeClass(oDomTarget,"active");
return }var oDomEventTarget=YAHOO.util.Event.getTarget(e);if(oDomTarget!=oDomEventTarget&&this.oDomProductOverlay!=oDomEventTarget){return }var hideDelayTimeout=window.setTimeout(function(){YAHOO.EU.Shopping.ProductDetailOverlay.instance.hide(oDomTarget,this.showDelayTimeout)
},700);YAHOO.util.Event.addListener(oDomTarget,"mouseover",this.cancelHide,{hideDelayTimeout:hideDelayTimeout,oDomTarget:oDomTarget},this);YAHOO.util.Event.addListener(this.oDomProductOverlay,"mouseover",this.cancelHide,{hideDelayTimeout:hideDelayTimeout,oDomTarget:oDomTarget},this)
},cancelHide:function(e,o){YAHOO.util.Event.stopEvent(e);YAHOO.util.Event.removeListener(o.oDomTarget,"mouseout",this.cancelHide);YAHOO.util.Event.removeListener(this.oDomProductOverlay,"mouseout",this.cancelHide);
window.clearTimeout(o.hideDelayTimeout)},hide:function(oDomTarget,showDelayTimeout){if(this.oConnection&&YAHOO.util.Connect.isCallInProgress(this.oConnection)){YAHOO.util.Connect.abort(this.oConnection)
}window.clearTimeout(showDelayTimeout);this.oProductOverlay.hide();YAHOO.util.Event.purgeElement(oDomTarget);YAHOO.util.Event.purgeElement(this.oDomProductOverlay);YAHOO.util.Dom.removeClass(oDomTarget,"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 jsperfid=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.Stores.Finder.init");
var jsperfused=1}var oDomModuleContainer=document.getElementById("themed-nav-hub");if(!oDomModuleContainer){jsperfused=-1;if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(jsperfid,jsperfused)}return false
}var aDomHeadings=oDomModuleContainer.getElementsByTagName("h3");var oDomMainList=oDomModuleContainer.getElementsByTagName("ul")[0];var oDomSideMenuUL=document.createElement("ul");YAHOO.util.Dom.addClass(oDomSideMenuUL,"side-menu");
YAHOO.util.Dom.addClass(oDomModuleContainer,"js");for(var i=0,len=aDomHeadings.length;i<len;i++){var oDomImagesLi=aDomHeadings[i].parentNode;YAHOO.util.Dom.addClass(oDomImagesLi,"js-themed-li");var oDomTabLi=document.createElement("li");
var oDomTab=document.createElement("a");oDomTab.innerHTML=aDomHeadings[i].innerHTML;oDomTabLi.appendChild(oDomTab);oDomSideMenuUL.appendChild(oDomTabLi);var funcShowTab=function(e,o){var oDomCurrentTab=o[0];
var oDomCurrentTabPane=o[1];var aDomSideMenuLis=o[2].getElementsByTagName("a");var aDomHeadings=o[3];for(var j=0;aDomSideMenuLis[j];j++){YAHOO.util.Dom.removeClass(aDomSideMenuLis[j],"active");YAHOO.util.Dom.removeClass(aDomHeadings[j].parentNode,"active")
}YAHOO.util.Dom.addClass(oDomCurrentTab,"active");YAHOO.util.Dom.addClass(oDomCurrentTabPane,"active")};if(i==0){YAHOO.util.Dom.addClass(oDomTab,"active");YAHOO.util.Dom.addClass(oDomImagesLi,"active");
YAHOO.util.Dom.addClass(oDomTab.parentNode,"first")}if(i==(len-1)){YAHOO.util.Dom.addClass(oDomTab.parentNode,"last")}var aDomCollection=[oDomTab,oDomImagesLi,oDomSideMenuUL,aDomHeadings];YAHOO.util.Event.addListener(oDomTab,"click",funcShowTab,aDomCollection)
}oDomModuleContainer.insertBefore(oDomSideMenuUL,oDomMainList);if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(jsperfid,jsperfused)}}};YAHOO.EU.Shopping.Stores.productSearch=function(ev){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var jsperfid=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.Stores.productSearch");
var jsperfused=-1}var search_input=document.getElementById("store-ser");if(search_input.value==""){jsperfused=1;YAHOO.util.Event.stopEvent(ev);if(!document.getElementById("merchant-search-error")){var span=document.createElement("span");
span.id="merchant-search-error";span.appendChild(document.createTextNode(YAHOO.EU.Shopping.locale.merchantSearchError));YAHOO.util.Dom.insertBefore(span,search_input)}}if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(jsperfid,jsperfused)
}};YAHOO.util.Event.onDOMReady(function(){if(YAHOO.EU.Shopping.Flags.storeSearch){YAHOO.EU.Shopping.Stores.Finder.init();var search_input=document.getElementById("store-ser");if(search_input){YAHOO.util.Event.addListener(search_input.form,"submit",YAHOO.EU.Shopping.Stores.productSearch)
}}});

YAHOO.namespace("YAHOO.EU.Shopping.FormValidation.Abuse");YAHOO.EU.Shopping.FormValidation.Abuse={addErrorMsg:function(oDomFormItem,sMsg){var oDomErrorMsg=document.createElement("p");YAHOO.util.Dom.addClass(oDomErrorMsg,"error");
oDomErrorMsg.innerHTML=sMsg;if(!oDomFormItem.nextSibling.nodeType!=1){oDomFormItem.parentNode.appendChild(oDomErrorMsg)}else{oDomFormItem.insertBefore(oDomErrorMsg,oDomFormItem.nextSibling)}},onsubmit:function(e){var oDomForm=document.getElementById("abuseForm");
var aDomErrorEl=YAHOO.util.Dom.getElementsByClassName("error","p",oDomForm);if(aDomErrorEl.length>0){YAHOO.util.Dom.batch(aDomErrorEl,function(oDomErrorEl){oDomErrorEl.parentNode.removeChild(oDomErrorEl)
})}var bSubmit=true;var oEmailFilter=/.+\@.+\..+/;if(oDomForm.email&&!oEmailFilter.test(oDomForm.email.value)){bSubmit=false;YAHOO.EU.Shopping.FormValidation.Abuse.addErrorMsg(oDomForm.email,YAHOO.EU.Shopping.locale.emailErrorMsg)
}if(oDomForm.subject&&oDomForm.subject.value=="reviews.abuse.form.option.choose"){bSubmit=false;YAHOO.EU.Shopping.FormValidation.Abuse.addErrorMsg(oDomForm.subject,YAHOO.EU.Shopping.locale.subjectErrorMsg)
}if(oDomForm.feedback&&oDomForm.feedback.value==""){bSubmit=false;YAHOO.EU.Shopping.FormValidation.Abuse.addErrorMsg(oDomForm.feedback,YAHOO.EU.Shopping.locale.feedbackErrorMsg)}if(!bSubmit){YAHOO.util.Event.stopEvent(e)
}},init:function(){if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){var jsperfid=YAHOO.YUIKK.JSPT.mark("YAHOO.EU.Shopping.FormValidation.Abuse.init");var jsperfused=-1}var oDomAbuseForm=document.getElementById("abuseForm");
if(oDomAbuseForm){jsperfused=1;YAHOO.util.Event.addListener(oDomAbuseForm,"submit",YAHOO.EU.Shopping.FormValidation.Abuse.onsubmit)}if(YAHOO.YUIKK&&YAHOO.YUIKK.JSPT){YAHOO.YUIKK.JSPT.unmark(jsperfid,jsperfused)
}}};YAHOO.util.Event.onDOMReady(function(){if(YAHOO.EU.Shopping.Flags.reportAbuse){YAHOO.EU.Shopping.FormValidation.Abuse.init()}});

function kk_updateSearchForm(p,v){v=unescape(v);if(p){if(p.type=="text"||p.type=="hidden"){p.value=kk_decodeParams(v)}else{if(p.type=="select-one"){for(i=0;i<p.length;i++){if(p.options[i].value==v){p.selectedIndex=i
}}}else{if(p.type=="checkbox"){p.checked=true}else{if(p[0]){for(i=0;i<p.length;i++){if(p[i].value==v){p[i].checked=true}}}}}}}}function kk_decodeParams(v){var q=v;while(q.indexOf("&#39;")>-1){q=q.replace("&#39;","'")
}while(q.indexOf("&quot;")>-1){q=q.replace("&quot;",'"')}while(q.indexOf("&#34;")>-1){q=q.replace("&#34;",'"')}while(q.indexOf("&amp;")>-1){q=q.replace("&amp;","&")}return q};

(function(){YAHOO.namespace("YAHOO.EU.Shopping.TUX");YAHOO.EU.Shopping.TUX.ResultsUI=function(container,options){var oResultsList;var oOptions;var iBufferNum=0;var sBuffer="";var self=this;function init(container,options){if(YAHOO.lang.isString(container)){this.oResultsContainer=document.getElementById(container)
}else{this.oResultsContainer=container}if(this.oResultsContainer.nodeName.toUpperCase()=="OL"){oResultsList=oResultsContainer}else{oResultsList=document.createElement("OL");oResultsContainer.appendChild(oResultsList)
}if(YAHOO.lang.isObject(options)){oOptions=options}else{oOptions={}}oOptions.idPrefix=oOptions.idPrefix||"result-";oOptions.template=oOptions.template||"<div>{result-title null}</div>";oOptions.formatters=oOptions.formatters||YAHOO.EU.Shopping.TUX.Utils.Formatters
}this.insertResult=function(result,index){var item=renderResult(result);if(YAHOO.EU.Shopping.config.oTUX.iAnimation){item.style.visibility="hidden";item.style.overflow="hidden";item.style.height="1px";
YAHOO.util.Dom.setStyle(item,"opacity",0)}if(oResultsList.childNodes.length>0&&oResultsList.childNodes.length>index){var elAfter=oResultsList.childNodes[index];YAHOO.util.Dom.insertBefore(item,elAfter)
}else{oResultsList.appendChild(item)}YAHOO.util.Dom.getElementsByClassName("extended-view-btn","span",item,function(element){YAHOO.EU.Shopping.Results.initSingleExtendedView(element)});if(YAHOO.EU.Shopping.config.oTUX.iAnimation){var slideOpen=new YAHOO.util.Anim(item,{height:{to:100}},0.5,YAHOO.util.Easing.easeOut);
slideOpen.onComplete.subscribe(function(){item.style.height="auto";var fadeIn=new YAHOO.util.Anim(item,{opacity:{from:0,to:1}},0.5,YAHOO.util.Easing.easeIn);fadeIn.onStart.subscribe(function(){item.style.visibility="visible"
});fadeIn.animate();return item});slideOpen.animate()}else{return item}};function renderResult(result){var oRendered=document.createElement("DIV");var id=oOptions.idPrefix+result.offerId;if(!document.getElementById(id)){oRendered.id=id;
try{oRendered.innerHTML=YAHOO.EU.Shopping.TUX.Utils.renderTemplate(oOptions.template,result,oOptions.formatters);YAHOO.EU.Shopping.TUX.ResultsUI.AirportInfo.enhanceTooltips(oRendered,false,document.getElementById("airportBubble"))
}catch(e){}return oRendered.firstChild}else{return false}}this.addResults=function(result){if(YAHOO.lang.isArray(result)){var insertedListItems=[];var length=oResultsList.childNodes.length;var i=0;(function(){start=new Date().getTime();
for(;r=result[i];i++){if(YAHOO.lang.isObject(r)){if(!insertedListItems[i]){insertedListItems[i]=self.insertResult(r,(length+i))}}if(new Date().getTime()-start>50){setTimeout(arguments.callee,0);break}}})();
return insertedListItems}else{if(YAHOO.lang.isObject(result)){return this.insertResult(result,oResultsList.childNodes.length)}else{return false}}};this.removeResult=function(result){var id;if(YAHOO.lang.isObject(result)){id=result.offerId
}else{id=result}var el=document.getElementById(oOptions.idPrefix+id);if(el){return el.parentNode.removeChild(el)}else{return false}};this.buildResultsList=function(results){if(YAHOO.lang.isArray(results)){oResultsList.innerHTML="";
if(this.addResults(results)===false){return false}else{return true}}else{return false}};init(container,options);return this}})();

(function(){YAHOO.namespace("YAHOO.EU.Shopping.TUX");YAHOO.EU.Shopping.TUX.ResultsUI.AirportInfo=new function(){function addTooltip(acronym,container){if(acronym.innerHTML!=undefined&&acronym.innerHTML!=""&&acronym.title!=undefined&&acronym.title!=""&&!YAHOO.util.Dom.hasClass(acronym,"has-bubble-tooltip")){if(container==undefined){container=document.body
}var tt=document.createElement("div");var acronym_title=acronym.title;tt.className="airport-tooltip";var p=document.createElement("p");var dfn=document.createElement("dfn");dfn.appendChild(document.createTextNode(YAHOO.EU.Shopping.locale.airportcode));
p.appendChild(dfn);p.appendChild(document.createTextNode(acronym.innerHTML+" : "+acronym.title));tt.appendChild(p);tt.style.display="none";tt.style.position="absolute";YAHOO.util.Dom.addClass(acronym,"has-bubble-tooltip");
container.appendChild(tt);function show(){var point=YAHOO.util.Dom.getXY(acronym);var pointContainer=YAHOO.util.Dom.getXY(container);acronym.title="";tt.style.visibility="hidden";tt.style.display="block";
tt.style.top=(point[1]-(pointContainer[1]-container.offsetTop)-tt.clientHeight)+"px";tt.style.left=(point[0]-pointContainer[0]+acronym.offsetWidth)+"px";tt.style.visibility="visible"}function hide(){acronym.title=acronym_title;
tt.style.display="none"}YAHOO.util.Event.addListener(acronym,"mouseover",show);YAHOO.util.Event.addListener(acronym,"mouseout",hide)}}this.enhanceTooltips=function(el,forceIE,bubbleContainer){if(el===undefined){el=document.getElementsByTagName("body")[0]
}var aconyms=el.getElementsByTagName("acronym");for(var i=0;i<aconyms.length;i++){addTooltip(aconyms[i],bubbleContainer)}};this.enhanceTooltipsOnStartup=function(el){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(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;
if(dataString){if(dataString.indexOf(data[i].subString)!=-1){return data[i].identity}}else{if(dataProp){return data[i].identity}}}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);
if(index==-1){return }return parseFloat(dataString.substring(index+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 roundedLoadTime=Math.round(plload/100)*100+" ms";var fn=document.location.pathname;
if(document.location.search){fn+=document.location.search}if((YAHOO.util.Dom.getElementsByClassName("offer").length==15)||(YAHOO.util.Dom.getElementsByClassName("catalog").length==15)){var catId="";if(fn.match(/^.*\/c-(\d+)-.+\.html.*$/gi)){catId=fn.replace(/^.*\/c-(\d+)-.+\.html.*$/gi,"$1")
}else{if(fn.match(/^.*\/d-.+-(\d+).*$/gi)){catId=fn.replace(/^.*\/d-.+-(\d+).*$/gi,"$1")}}var query="";if(fn.match(/^.*ss.*-\d*[-]*(.+).html.*$/gi)){query=fn.replace(/^.*ss.*-\d*[-]*(.+).html.*$/gi,"$1")
}else{if(fn.match(/^.*siteSearchQuery=([^&]+).*$/gi)){query=fn.replace(/^.*siteSearchQuery=([^&]+).*$/gi,"$1")}}if(catId!=""){pageTrackerPerfs._trackPageview("/load times by catId (ms)/"+catId+"/"+roundedLoadTime)
}if(query!=""){pageTrackerPerfs._trackPageview("/load times by query (ms)/"+query+"/"+roundedLoadTime)}console.log("catID: "+catId+" - query: "+query)}if(perfsPageType!==undefined){if(perfsPageType.match("l1")){perfsGroup="L1"
}else{if(perfsPageType.match("l2")){perfsGroup="L2"}else{if(perfsPageType.match("l3")){perfsGroup="L3"}}}}if(perfsGroup===undefined){perfsGroup="other"}pageTrackerPerfs._trackPageview("/load times by page type (ms)/"+perfsGroup+"/"+roundedLoadTime);
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",fn,Math.round(plload));
BrowserDetect.init();var browserName=BrowserDetect.browser;var browserVersion=BrowserDetect.version;pageTrackerPerfs._trackEvent("Page Load (ms)",browserName+" "+browserVersion,fn,Math.round(plload));console.log("Loaded in "+Math.round(plload)+" ms")
}catch(err){console.log("Unknown load time"+err)}}else{console.log("No tracker for perfs")}})})();

