Type.registerNamespace("Ecom");Type.registerNamespace("Proto");Ecom.Application=function(){this.brand="";this.channel="";this.language="";this.isHomePage=false;this.waiterBox=null;this.extractInfo();Sys.Net.WebRequestManager.add_invokingRequest(this._onInvokingRequest);Sys.Application.add_load(Function.createDelegate(this,this._onDocumentLoad));Sys.Application.add_unload(Function.createDelegate(this,this._onDocumentUnload));this._created=new Date()};Ecom.Application.prototype={_onInvokingRequest:function invokingRequestHandler(d,a){var c=a.get_webRequest();metaCollection=document.getElementsByTagName("meta");for(i=0;i<metaCollection.length;i++){nameAttribute=metaCollection[i].name.search(/PageId/);if(nameAttribute!=-1){c.get_headers()["PageContext"]=metaCollection[i].content}}var b=jQuery("form:first").attr("CultureInfoName");c.get_headers()["CultureInfoName"]=b},extractInfo:function(e){this.brand="";this.channel="";this.language="";var a="body";if(e){a="#"+e}var c=jQuery(a).attr("class").match(/(?:brand|channel|language)-(\w+)/gi)||[];for(var b=c.length-1;b>=0;b--){var d=c[b].split("-");if(d.length==2){this[d[0]]=d[1]}}this.isHomePage=jQuery("body").hasClass("home-layout")},showWaiterBox:function(a){if(this.waiterBox!=null){this.waiterBox.show(a)}},hideWaiterBox:function(){if(this.waiterBox!=null){this.waiterBox.hide()}},_onDocumentLoad:function(){this.waiterBox=new Ecom.UI.ModalBox("#headerWaitPanel",{dialogClass:"waiter-box",width:250,overlay:{id:"waiterOverlay"}})},_onDocumentUnload:function(){ThomasCook.Ecom.Web.BookingAvailability.DeletePageSpecificSessionVariables()}};Ecom.Application.registerClass("Ecom.Application");Ecom.Application=new Ecom.Application();Type.registerNamespace("Ecom.UI");Ecom.UI.Overlay=function(b){var d={id:"modalOverlay",zIndex:900,container:document.body,extraClass:""};b=jQuery.extend(d,b);this._selector="#"+b.id;if(!jQuery(this._selector).length){var c='<div id="'+b.id+'" class="ui-widget-overlay" style="display:none;z-index:'+b.zIndex+';"></div>',e=jQuery(b.container),a=jQuery(c).addClass(b.extraClass).appendTo(e);(jQuery.fn.bgiframe&&a.bgiframe())}};Ecom.UI.Overlay.prototype={show:function(b){var a={left:0,top:0,width:this.width(),height:this.height()};b=jQuery.extend(a,b);jQuery(this._selector).css({left:b.left+"px",top:b.top+"px",width:b.width+"px",height:b.height+"px"}).show()},hide:function(){jQuery(this._selector).hide()},height:function(){if(jQuery.browser.msie&&jQuery.browser.version<7){var c=document.documentElement||{},a=document.body||{},d=Math.max(c.scrollHeight||0,a.scrollHeight||0),b=Math.max(c.offsetHeight||0,a.offsetHeight||0);if(d<b){return jQuery(window).height()}else{return d}}else{return jQuery(document).height()}},width:function(){if(jQuery.browser.msie&&jQuery.browser.version<7){var b=document.documentElement||{},a=document.body||{},c=Math.max(b.scrollWidth||0,a.scrollWidth||0),d=Math.max(b.offsetWidth||0,a.offsetWidth||0);if(c<d){return jQuery(window).width()}else{return c}}else{return jQuery(document).width()}}};Ecom.UI.Overlay.registerClass("Ecom.UI.Overlay");Ecom.UI.ModalBox=function(a,e){var d={autoOpen:false,bgiframe:true,closeOnEscape:false,draggable:false,resizable:false,position:["middle","center"],width:"auto"};var b=jQuery.extend(d,e);b.modal=false;this.initialPosition={};this.initialPosition.left=b.position[0]||"middle";this.initialPosition.top=b.position[1]||"center";var c=jQuery("<div/>");var f=jQuery(a||c);this.element=f.length?f:c;this.element.dialog(b);this.element.closest("div.ui-dialog").find("div.ui-dialog-titlebar").remove();this.overlay=new Ecom.UI.Overlay(b.overlay)};Ecom.UI.ModalBox.prototype={show:function(c){var a={left:this.initialPosition.left,top:this.initialPosition.top};c=jQuery.extend(a,c);if(c.content){var d=jQuery(".content",this.element);if(d.length){d.empty();d.append(c.content)}}jQuery(".close-button",this.element).bind("click",this,this.onCloseButtonClick);this.overlay.show(c.overlay);this.element.dialog("option","position",[c.left,c.top]);this.element.dialog("open");var b=this.element.position().top+this.element.scrollTop();this.element.css("top",b+"px")},hide:function(){jQuery(".close-button",this.element).unbind("click",this.onCloseButtonClick);this.element.dialog("close");this.overlay.hide()},width:function(){return this.element.dialog("option","width")},height:function(){return this.element.dialog("option","height")},dispose:function(){this.element.dialog("destroy").remove()},onCloseButtonClick:function(a){a.data.hide()}};Ecom.UI.ModalBox.registerClass("Ecom.UI.ModalBox",null,Sys.IDisposable);Ecom.ModalDialog=function(a){this.width=10;this.height=10;this.backgroundColor="#fff";this.modalTopMargin="";this.fullScreen=false;this.offsetLeft=0;this.toBeShownId=a.id;this.toBeDisabledId="";this.toBeUsedForBackgroundBoundsId="";this.initialFocusId="";this.overlayPlaceHolderId="";this.overlayObject="";this.overlayId="";this.toCloseId="";Ecom.ModalDialog.initializeBase(this,[a]);this.OnClickDelegate=Function.createDelegate(this,this.OnClick);$addHandler(a,"click",this.OnClickDelegate)};Ecom.ModalDialog.prototype={initialize:function(){if(this.overlayId==""){this.overlayId="overlay"+this.toBeShownId}this.overlayContainerId=(this.overlayPlaceHolderId!="")?(this.overlayPlaceHolderId):(this.toBeDisabledId);jQuery(document).ready(Function.createDelegate(this,function(){this.overlayObject=new Ecom.UI.Overlay({id:this.overlayId,zIndex:600,container:jQuery("#"+this.overlayContainerId).parent()})}));var a=jQuery("#"+this.toBeShownId);if(a.length>0){a.css("position","absolute");a.css("z-index",900)}},OnClick:function(a){var c=this.toCloseId.split(",");var b=a.target;if(b!=null){for(i=0;i<c.length;i++){if(b.id==c[i]){this.Close()}}}},Show:function(){var a=jQuery("#"+this.toBeShownId);if(a.length>0){this.overlayObject.show();jQuery("#"+this.overlayId).css({"background-color":this.backgroundColor,opacity:"0.7",filter:"alpha(opacity=70)"});var c=(jQuery(window).height()-a.height())/2;var b=jQuery(window).width()/2-a.width()/2;if(c<0){c=40}a.css({top:c+"px",left:b+"px"}).show();this.scrollIntoView(a,true)}},scrollIntoView:function(b,a){var c=jQuery(b).offset().top||0;if(c<jQuery().scrollTop()){if(a){jQuery("html,body").stop().animate({scrollTop:c})}else{b.scrollIntoView(true)}}},Close:function(){var a=$get(this.toBeShownId);if(a!=null){a.style.display="none";jQuery(this.toBeDisabledId).show()}this.overlayObject.hide()}};Ecom.ModalDialog.registerClass("Ecom.ModalDialog",Sys.UI.Control);Ecom.UI.Calendar=function(a){this.control=null;this.onSelect=null;this.onShow=null;this._initialize(a)};Ecom.UI.Calendar.prototype={_initialize:function(b){var c=b.target;delete b.target;if(b.beforeShow){this.onShow=b.beforeShow}if(b.onSelect){this.onSelect=b.onSelect}this.control=Ecom.UI.Calendar.createDatepickerControl(c,jQuery.extend({},b,{onSelect:Function.createDelegate(this,this._onSelectProxy),beforeShow:Function.createDelegate(this,this._onShowProxy)}));this.setCurrentLanguage();var a=this._getOption("altField");jQuery(a).click(Function.createDelegate(this,function(){this.show()}))},_onSelectProxy:function(b,a){this._updateAltField();if(this.onSelect){this.onSelect(b,a)}},_onShowProxy:function(a,b){if(this.onShow){this.onShow(a,b)}this._fixCalendarPosition(a,b)},_updateAltField:function(){var a=this._getOption("altField");if(a){var c=this._getOption("altFormat")||"d-m-yy";var b=jQuery.datepicker.formatDate(c,this.getSelectedDate())||"";jQuery(a).text(b)}},_fixCalendarPosition:function(b,g){var e=jQuery(b).next("img.ui-datepicker-trigger"),h={left:0,top:e.height()};var d=this._getOption("altField");if(d){var c=jQuery(d),f=c.offset(),a=e.offset();h.left=f.left-a.left;h.top=f.top+c.outerHeight()-a.top+1}g.dpDiv.css({marginLeft:h.left+"px",marginTop:h.top+"px"})},_getOption:function(a){if(this.control){return this.control.datepicker("option",a)||""}return null},_setOption:function(a,b){if(this.control&&typeof b!=="undefined"){this.control.datepicker("option",a,b)}},show:function(){if(this.control){this.control.datepicker("show")}},getAttribute:function(a){return this.control.attr(a)||null},setLanguage:function(a){if(this.control){window.setTimeout(Function.createDelegate(this,function(){this.control.datepicker("option",jQuery.datepicker.regional[a||"nl"])}),300)}return null},setCurrentLanguage:function(){if(this.control){this.setLanguage(Ecom.Application.language||"nl")}return null},getSelectedDate:function(){if(this.control){return this.control.datepicker("getDate")||new Date()}return null},selectDate:function(b,a){if(this.control){this.control.datepicker("setDate",b||new Date())}if(a){this._updateAltField()}},setRanges:function(a,b){if(a){this._setOption("minDate",a)}if(b){this._setOption("maxDate",b)}},disable:function(){if(this.control){this.control.datepicker("disable")}}};Ecom.UI.Calendar.create=function(a){if(!a||!a.target){return null}return new Ecom.UI.Calendar(a)};Ecom.UI.Calendar.createDatepickerControl=function(c,b){var a=jQuery(c);if(a.length>0){a.datepicker("destroy");a.datepicker(jQuery.extend({dateFormat:"yymmdd",hideIfNoPrevNext:true,showOtherMonths:false,changeMonth:true,changeYear:true,duration:"fast",showAnim:"fadeIn",showOn:"both",buttonImage:"/App/Upload/Css/NVB/Images/calendar.gif",buttonImageOnly:true},b))}return a};Ecom.UI.Calendar.registerClass("Ecom.UI.Calendar");Ecom.DetailTabControl=function(a){Ecom.DetailTabControl.initializeBase(this,[a]);this.OnClickDelegate=Function.createDelegate(this,this.OnClick);$addHandler(a,"click",this.OnClickDelegate);this.NamingContainer=a.id;this.selectedElementId=a.id+"_thumb1";this.selectedClass="selected";this.unselectedClass="unselected";this.contentPrefix="prefix";this.hotKeysCreator=null;this.onFocusGainedActionsCreator=null;this.onFocusLostActionsCreator=null;this.RoomTypeInfoClickedDelegate=Function.createDelegate(this,this.RoomTypeInfoClicked);jQuery("[id^=roomtype_]").live("click",this.RoomTypeInfoClickedDelegate)};Ecom.DetailTabControl.prototype={initialize:function(){Ecom.DetailTabControl.callBaseMethod(this,"initialize");if(this.hotKeysCreator!=null){this.hotKeys=this.hotKeysCreator();if(this.hotKeys!=null){for(var a=0;a<this.hotKeys.length;a++){var b=$get(this.NamingContainer+"_"+this.hotKeys[a].buttonId);if(b==null){b=$get(this.hotKeys[a].buttonId)}if(b!=null){$addHandler(b,"click",this.OnClickDelegate)}}}}if(null!=this.onFocusGainedActionsCreator){this.onFocusGainedActions=this.onFocusGainedActionsCreator();if(null!=this.onFocusGainedActions){for(var a=0;a<this.onFocusGainedActions.length;a++){if(""==(this.onFocusGainedActions[a].tabId)){this.onFocusGainedActions[a].tabId=this.selectedElementId}}}}if(null!=this.onFocusLostActionsCreator){this.onFocusLostActions=this.onFocusLostActionsCreator();if(null!=this.onFocusLostActions){for(var a=0;a<this.onFocusLostActions.length;a++){if(""==(this.onFocusLostActions[a].tabId)){this.onFocusLostActions[a].tabId=this.selectedElementId}}}}},RoomTypeInfoClicked:function(a){this.SetTabFocus("OVERSTAY_TYPES")},OnClick:function(c){var e=c.target;if(e!=null){if(this.NamingContainer==e.id){return}if(this.hotKeys!=null){for(var d=0;d<this.hotKeys.length;d++){if(e.id.endsWith(this.hotKeys[d].buttonId)){var f=$get(this.NamingContainer+"_"+this.hotKeys[d].tabId);if(f==null){f=$get(this.hotKeys[d].tabId)}if(f!=null){e=f;break}}}}while((e!=null)&&(e.id!=null)&&(e.id!=this.selectedElementId)){if(e.id.startsWith(this.NamingContainer)){if((null!=this.onFocusLostActions)&&(null!=this.selectedElementId)){for(var d=0;d<this.onFocusLostActions.length;d++){if((this.onFocusLostActions[d].tabId==null)||this.selectedElementId.endsWith(this.onFocusLostActions[d].tabId)){this.onFocusLostActions[d].action(this.selectedElementId)}}}var a=e.id.substring(this.NamingContainer.length);var j=this.selectedElementId.substring(this.NamingContainer.length);var b=$get(this.contentPrefix+j);var h=$get(this.contentPrefix+a);if(b!=null){b.style.display="none"}if(h!=null){h.style.display="block"}var g=$get(this.selectedElementId);if(g!=null){g.className=this.unselectedClass}e.className=this.selectedClass;this.selectedElementId=e.id;if((null!=this.onFocusGainedActions)&&(null!=e)){for(var d=0;d<this.onFocusGainedActions.length;d++){if((this.onFocusGainedActions[d].tabId==null)||e.id.endsWith(this.onFocusGainedActions[d].tabId)){this.onFocusGainedActions[d].action(this.selectedElementId)}}}return}else{e=e.parentNode}}}},SetTabFocus:function(b){var e=jQuery("#tabstrip > li").attr("class",this.unselectedClass);var a=jQuery("#tabstrip_"+b).attr("class",this.selectedClass);this.selectedElementId="tabstrip_"+b;var d=jQuery("#firstColumn > div[id^='tabstripcontent_']").css("display","none");var c=jQuery("#tabstripcontent_"+b).css("display","block")},switchToEnvironmentTab:function(){this.SetTabFocus("ENVIRONMENT");switchToSmallPhotoModule()},switchToWeatherTab:function(){this.SetTabFocus("WEATHER");switchToSmallPhotoModule()}};Ecom.DetailTabControl.registerClass("Ecom.DetailTabControl",Sys.UI.Control);Ecom.PriceGridControl=function(a){Ecom.PriceGridControl.initializeBase(this,[a]);this.ShowTooltipOnEveryCell=true;this.TentativeTooltip=null;this.OnClickDelegate=Function.createDelegate(this,this.OnClick);this.OnFocusLostDelegate=Function.createDelegate(this,this.OnFocusLost);this.OnFocusGainedDelegate=Function.createDelegate(this,this.OnFocusGained);$addHandler(a,"click",this.OnClickDelegate)};Ecom.PriceGridControl.prototype={initialize:function(){Ecom.PriceGridControl.callBaseMethod(this,"initialize")},SetGridData:function(a){if(a!=null){this.GridData=a}},OnFocusLost:function(d){var a=d.replace("pricegridtabs","priceGridDetail");var c=$get(a);if(c!=null){this.LeftScrollPosition=c.style.left}var b=d.replace("pricegridtabs","priceGridHeaderText");hide(b)},OnFocusGained:function(b){var a=b.replace("pricegridtabs","priceGridDetail");var d=$get(a);if(d!=null){d.style.left=this.LeftScrollPosition}var c=b.replace("pricegridtabs","priceGridHeaderText");show(c)},getAttributeValue:function(a,b){var c=a.attributes[b];var d=null;if(c!=null){d=c.value}return d},UpdateTransportAvailabilityForSelectedCell:function(){var c=jQuery("#startemailbooking");var d=(c.hasClass("btAction")&&c.is(":visible"));var j=(jQuery("#shouldAllowTransportBooking").val()=="1");if(j&&!d){show("transportbookingpane")}else{hide("transportbookingpane")}var g=$get("main");if(g!=null){var h=this.getSelectedCell();if(h&&h.length>0){var l=h.attr("date")||"";var b=h.attr("duration")||"";var f=1;this.updateWeatherComponent(l);var a=b+"|"+l;var e=this.GridData.CellData[a];var k=this.GridData.CanOnlyBeBookedWithTransport;if(!k||e.HasTrainTransport||e.HasFlightTransport){show("tsTransportAvailable");hide("tsNoTransportAvailable");this.updateTransportSelection(h,e)}else{hide("tsTransportAvailable");show("tsNoTransportAvailable")}}else{Sys.Debug.trace("cell not found")}}},hideTransPortButtons:function(){hide("SearchWithoutTransport");hide("SearchTransportTrain");hide("SearchTransportFlight");show("SearchWithoutTransportInactive");show("SearchTransportTrainInactive");show("SearchTransportFlightInactive")},updateTransportSelection:function(b,a){this.hideTransPortButtons();if(!this.GridData.CanOnlyBeBookedWithTransport){hide("SearchWithoutTransportInactive");show("SearchWithoutTransport")}if(a!=null&&a.HasTrainTransport){hide("SearchTransportTrainInactive");show("SearchTransportTrain")}if(a!=null&&a.HasFlightTransport){hide("SearchTransportFlightInactive");show("SearchTransportFlight")}if(!this.GridData.CanOnlyBeBookedWithTransport){jQuery("#SearchWithoutTransport_input").attr("checked","checked")}else{if(a!=null&&a.HasTrainTransport){jQuery("#SearchTransportTrain_input").attr("checked","checked")}else{if(a!=null&&a.HasFlightTransport){jQuery("#SearchTransportFlight_input").attr("checked","checked")}}}},priceExampleTooltipInitialization:function(d){var b=document.body,e=jQuery("#priceExampleTooltip"),c=this;if(e.parent().get()!==b){e.appendTo(b)}if(!d.selectedColumn||!d.selectedRow){var a=jQuery("#main");d.selectedColumn=a.attr("selectedcelldate")||"";d.selectedRow=a.attr("selectedcellduration")||""}if(this.ShowTooltipOnEveryCell){jQuery("#clickpricegrid").find('div[id^="pricegridcontent"]').each(function(f){jQuery("div").each(function(){jQuery(this).mouseenter(function(j){var g=j.target;if(jQuery(g).hasClass("selectable")){var k=c.getPriceExampleTooltipInfo(g);if(k!=null){var h=jQuery.extend(k,{mouseX:j.pageX,mouseY:j.pageY});c.TentativeTooltip=h;setTimeout(function(l){if(c.TentativeTooltip==h){c.showPriceExampleTooltip(h)}},400)}}else{c.TentativeTooltip=null}});jQuery(this).mouseleave(function(g){c.hidePriceExampleTooltip()})})})}else{jQuery("#clickpricegrid").find('div[id^="pricegridcontent"]').each(function(g){var f=g+1;jQuery("#cell_"+f+"_"+d.selectedRow+"_"+d.selectedColumn).each(function(){c.bindPriceExampleTooltipToSelectedCell(this)})})}},bindPriceExampleTooltipToSelectedCell:function(b){var a=jQuery(b),c=this.getPriceExampleTooltipInfo(b);a.bind("mouseenter.price-example-tooltip",c,this.showPriceExampleTooltipOnMouseEnter).bind("mouseleave.price-example-tooltip",this.hidePriceExampleTooltip)},unbindPriceExampleTooltip:function(a){jQuery(a).unbind(".price-example-tooltip")},getPriceExampleTooltipInfo:function(h){var d=jQuery(h);var a=d.attr("duration");var k=d.attr("date");var f=d.attr("grid")-1;var g=this.GridData.RowData[a];var c=this.GridData.ColumnData[k];var b=a+"|"+k;var j=this.GridData.CellData[b];if(j==null){Sys.Debug.trace("GridData.CellData with key '"+b+"' not found.");return null}var e=j.Prices[f];var l=this.GridData.RoomData[f];return{priceGridComponent:this,source:h,date:c.TooltipDate||"",duration:g.TooltipDuration||"",priceAmount:e.TooltipPriceAmount||"",priceAmountRounded:e.TooltipRoundedPriceAmount||"",priceAmountDecimalPart:e.TooltipPriceAmountDecimalPart||"",referencePriceAmount:e.TooltipReferencePriceAmount||"",referencePriceAmountDecimalPart:e.TooltipReferencePriceAmountDecimalPart||"",priceType:l.TooltipPriceType||"",showReferencePrice:this.GridData.ShowReferencePriceInTooltip,showRoundedPrice:this.GridData.ShowRoundedPricesInTooltip,flightAvailability:j.FlightAvailability,roomAvailability:e.RoomAvailability,ccPromo:j.CcPromo,bookByContactCenter:j.ShouldBeBookedByContactCenter}},getTooltipTravelInfo:function(){var a=$find("clickmain");if(!a){return null}var c=this.getSelectedRoom(),d=jQuery("#pricegridcontent_"+c),b={selectedAirport:jQuery("#airportselect").find("option:selected").text()||"",adultsText:d.attr("adultstext")||"",childrenText:d.attr("childrentext")||"",numberOfAdults:d.attr("adultscount")||"",childrenCount:d.attr("childrencount")||"",boardType:jQuery("#boardtypeselect_"+c).find("option:selected").text()||"",roomIdentification:jQuery("#roomtypeselect_"+c).find("option:selected").text()||"",flightavailabilityText:d.attr("flightavailabilitytext")||"",roomavailabilityText:d.attr("roomavailabilitytext")||"",ccPromoText:d.attr("ccpromotext")||""};return b},showPriceExampleTooltip:function(p){if(!p){return}var r=jQuery("#priceExampleTooltip");var c=jQuery(p.source),j=c.offset();cellHeight=c.height();r.showAsPopup({alignMiddle:false,mouseX:j.left,mouseY:j.top,xOffset:-(r.width()+10),yOffset:-60+(cellHeight/2)});var n=this.getTooltipTravelInfo();if(n===null){return}var e=n.selectedAirport||"",q="",b=r.find("p.tooltip-grijs"),o=r.find(".tooltip-price-old"),k=r.find("#tooltip-content-no-price"),g=r.find("#tooltip-content-price"),f=r.find("#tooltip-content-cc"),a=r.find(".jqPriceExample"),m=r.find(".jqCCBookable"),l="<br/>",d="&euro; ";if(e){e=e+", "}if(n.childrenCount==="0"){b.hide()}else{q=", "+n.childrenCount+" "+n.childrenText;b.show()}var h="";if(p.flightAvailability){h+=l+p.flightAvailability+" "+n.flightavailabilityText}if(p.roomAvailability){h+=l+p.roomAvailability+" "+n.roomavailabilityText}if(p.ccPromo){h+=l+n.ccPromoText}r.find("p.tooltip-last-item").html(n.numberOfAdults+" "+n.adultsText+q+l+e+p.date+l+n.roomIdentification+l+p.duration+", "+n.boardType+h);if(p.priceAmount!=""&&!isNaN(p.priceAmount)){if(!p.showRoundedPrice){r.find("span.tooltip-price-large").html(d+p.priceAmount);r.find("span.tooltip-price-small").html(","+p.priceAmountDecimalPart)}else{r.find("span.tooltip-price-large").html(d+p.priceAmountRounded)}if(p.showReferencePrice&&p.referencePriceAmount){o.html(d+p.referencePriceAmount);o.show()}else{o.hide()}k.hide();g.show();k.find("p").removeClass("tooltip-content-no-price").addClass("tooltip-content-price")}else{o.hide();k.show();g.hide();k.find("p").removeClass("tooltip-content-price").addClass("tooltip-content-no-price")}if(p.bookByContactCenter){a.hide();m.show();k.hide();g.hide();o.hide();f.show()}else{a.show();m.hide();f.hide()}},showPriceExampleTooltipOnMouseEnter:function(a){var b=a.data.priceGridComponent||$find("clickpricegrid");b.showPriceExampleTooltip(jQuery.extend(a.data,{mouseX:a.pageX,mouseY:a.pageY}))},hidePriceExampleTooltip:function(a){jQuery("#priceExampleTooltip").hide()},updateWeatherComponent:function(b){try{var a=$find("weatherContainer");if((a!=null)||(b==null)){var c=new Date(b.substr(0,4),b.substr(4,2)-1,b.substr(6,2));a.update(new Date(c))}}catch(d){}},IsWithinRange:function(d,h,f){if(d==null){return false}var c=0;var b=null;for(b in d){c++}if(c<h*2){return false}var a=0;for(b in d){if(a==h){var g=b;if(f<g){return false}}if(a==c-h-1){var e=b;if(f>e){return false}}a++}return true},ShouldScrollToExistingCell:function(b,a){var d=parseInt(a);if(!this.IsWithinRange(this.GridData.RowData,0,d)){return false}if(!this.IsWithinRange(this.GridData.ColumnData,2,b)){return false}var e=a+"|"+b;var c=this.GridData.CellData[e];if(c==null){return false}return true},ScrollSelectedCellIntoView:function(){var d=$get("priceGridDetail_1");if(d!=null){var b=0;var h=this.getAttributeValue($get("main"),"selectedcelldate");for(var c in this.GridData.ColumnData){if(c==h){break}else{b++}}var e=35;var a=57;var g=182;var f=g/2;var j=e+b*a;d.style.left=(f-j)+"px"}},OnClick:function(f){var g=f.target;if(g!=null){var d=this.getAttributeValue(g,"duration");var c=this.getAttributeValue(g,"date");var b=g.className.indexOf("notselectable",0)>=0;var e=this.getAttributeValue(g,"grid");if((d==null)||(c==null)||(e==null)||(b==true)){return}var a=jQuery.event.fix(f);this.SelectCell(c,d,e,a);if(this.CellSelectionNotificationHandler!=null){this.CellSelectionNotificationHandler(c,d)}}},RegisterCellSelectionNotificationHandler:function(a){this.CellSelectionNotificationHandler=a},SelectCell:function(l,g,o,A){jQuery(".cp-warning").hide();this.updateWeatherComponent(l);var j=$get("main");if(j!=null){var u=this.getAttributeValue(j,"selectedcelldate");var m=this.getAttributeValue(j,"selectedcellduration");var r=null;var v=1;var a=$get("pricegridcontent_"+v);while(a!=null){var b=$get("cell_"+v+"_"+m+"_"+u);var C=$get("column_"+v+"_"+u);var x=$get("row_"+v+"_"+m);if((C!=null)&&(x!=null)&(b!=null)){b.parentNode.className="price";C.className="header";jQuery(x).removeClass("selectedDuration").addClass("duration");if(!this.ShowTooltipOnEveryCell){this.unbindPriceExampleTooltip(b)}}r=$get("cell_"+v+"_"+g+"_"+l);var h=$get("column_"+v+"_"+l);var d=$get("row_"+v+"_"+g);if(r!=null&&(h!=null)&&(d!=null)&(r!=null)){r.parentNode.className="selectedprice";h.className="selectedHeader";jQuery(d).removeClass("duration").addClass("selectedDuration");if(!this.ShowTooltipOnEveryCell){this.bindPriceExampleTooltipToSelectedCell(r)}var q=this.getPriceExampleTooltipInfo(r);if(A!=null){this.showPriceExampleTooltip(jQuery.extend(q,{mouseX:A.pageX,mouseY:A.pageY}))}}v=v+1;a=$get("pricegridcontent_"+v)}j.attributes.selectedcelldate.value=l;j.attributes.selectedcellduration.value=g;j.attributes.selectedcellroom.value=o;var p=g+"|"+l;var n=this.GridData.CellData[p];var e=$find("clickmain");if(e){e.HandlePriceTicketsCollapsing()}var c=$get("transportChoice_"+u+"_"+m);if(c!=null){c.style.display="none"}var k=this.GridData.CanOnlyBeBookedWithTransport;if(!k||n.HasTrainTransport||n.HasFlightTransport){show("tsTransportAvailable");hide("tsNoTransportAvailable");if(r!=null){this.updateTransportSelection(r,n)}}else{hide("tsTransportAvailable");show("tsNoTransportAvailable")}var f=$get("transportChoice_"+l+"_"+g);var z=false;if(f!=null){f.style.display="";z=true}var t=!n.CanQuote;var y=(jQuery("#priceticket div.buttonBook").length===0&&!t);var e=$find("clickmain");if(e!=null){e.toggleBlocksVisibility(false,false)}jQuery("#foCalculatePrice").closest(".fo-controls").show();var B=$get("startemailbooking");if(B!=null){B.className="btAction";B.setAttribute("disableClick",false)}var w=$get("promocontactcenter");if(w!=null){if(n.CcPromo){w.style.display=""}else{w.style.display="none"}}}},hasRoom:function(a){var b=jQuery("#pricedgrid_tabstrip div[id='pricegridtabs_"+a+"']")[0];return b!==undefined},selectRoom:function(a){if(a<1){return}this.OnFocusLostDelegate("pricegridtabs_"+this.getSelectedRoom());jQuery("#pricedgrid_tabstrip div[id^='pricegridtabs']").each(function(b){var c=b+1;if(c===a){jQuery(this).removeClass("unselected").addClass("selected")}else{jQuery(this).removeClass("selected").addClass("unselected")}});jQuery("#pricegrid div.pricegrid-content-container div.pricegrid-details-container").each(function(b){var c=b+1;if(c===a){jQuery(this).show()}else{jQuery(this).hide()}});this.OnFocusGainedDelegate("pricegridtabs_"+a);this.updateTabControl()},getSelectedRoom:function(){var b=jQuery('#pricedgrid_tabstrip div[id^="pricegridtabs"].selected');if(b.length>0){var a=b.attr("id").replace("pricegridtabs_","");return parseInt(a,10)||1}return 1},getSelectedCell:function(){return jQuery('#clickpricegrid td.selectedprice div[id^="cell_"]')},updateTabControl:function(){var a=$find("pricegrid");if(a!=null){var b=this.getSelectedRoom();a.selectedElementId="pricegridtabs_"+b}}};Ecom.PriceGridControl.registerClass("Ecom.PriceGridControl",Sys.UI.Control);function MM_findObj(f,e){var c,b,a;if(!e){e=document}if((c=f.indexOf("?"))>0&&parent.frames.length){e=parent.frames[f.substring(c+1)].document;f=f.substring(0,c)}if(!(a=e[f])&&e.all){a=e.all[f]}for(b=0;!a&&b<e.forms.length;b++){a=e.forms[b][f]}for(b=0;!a&&e.layers&&b<e.layers.length;b++){a=MM_findObj(f,e.layers[b].document)}if(!a&&e.getElementById){a=e.getElementById(f)}return a}function P7_HScroller(el,dr,tx,ox,spd){var g,gg,fr,sp,pa="",slw=true,m=false,w,ww,lx,rx;tx=parseInt(tx);if((g=MM_findObj(el))!=null){gg=(document.layers)?g:g.style}else{return}if(dr=="Stop"){if(g.toMove){clearTimeout(g.p7Magic)}g.toMove=false}if((parseInt(navigator.appVersion)>4||navigator.userAgent.indexOf("MSIE")>-1)&&!window.opera){pa="px"}if(navigator.userAgent.indexOf("NT")>-1||navigator.userAgent.indexOf("Windows 2000")>-1){slw=false}if(spd=="Slow"){sp=(slw)?2:1;fr=(slw)?40:30}else{if(spd=="Medium"){sp=(slw)?4:1;fr=(slw)?40:10}else{sp=(slw)?8:4;fr=(slw)?40:10}}if(spd=="Warp"){sp=5000}var xx=parseInt(gg.left);if(isNaN(xx)){if(g.currentStyle){xx=parseInt(g.currentStyle.left)}else{if(document.defaultView&&document.defaultView.getComputedStyle){xx=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("left"))}else{xx=0}}}if(document.all||document.getElementById){w=parseInt(g.offsetWidth);if(!w){w=parseInt(g.style.pixelWidth)}if(g.hasChildNodes){for(wx=0;wx<g.childNodes.length;wx++){ww=parseInt(g.childNodes[wx].offsetWidth);if(ww>w){w=ww}}}}else{if(document.layers){w=parseInt(g.clip.width)}}lx=tx-w+parseInt(ox);rx=tx;if(dr=="Right"){if(xx>lx){m=true;xx-=sp;if(xx<lx){xx=lx}}}if(dr=="Left"){if(xx<rx){m=true;xx+=sp;if(xx>rx){xx=rx}}}if(dr=="Reset"){gg.left=tx+pa;if(g.toMove){clearTimeout(g.p7Magic)}g.toMove=false}if(m){gg.left=xx+pa;if(g.toMove){clearTimeout(g.p7Magic)}g.toMove=true;var evalstring="g.p7Magic=setTimeout(\"P7_HScroller('"+el+"','"+dr+"',"+tx+","+ox+",'"+spd+"')\","+fr+")";eval(evalstring)}else{g.toMove=false}}function scrollDownCallBack(b){var a=$find(b);Sys.Debug.trace("Component: "+b);if(a){Sys.Debug.trace("Component found!");a.scrollDown()}else{Sys.Debug.trace("Component not found!")}}function scrollUpCallBack(b){var a=$find(b);Sys.Debug.trace("Component: "+b);if(a){Sys.Debug.trace("Component found!");a.scrollUp()}else{Sys.Debug.trace("Component found!")}}Ecom.VerticalScroll=function(a){this.scrollCursor=0;this.speed=5;this.timeoutID=0;this.div_obj=null;this.scrollPanes=null;this.element=a;this.scrollPaneCreator=null;this.scrollPanes=new Array();Ecom.VerticalScroll.initializeBase(this,[a]);this.OnMouseOverDelegate=Function.createDelegate(this,this.OnMouseOver);this.OnMouseOutDelegate=Function.createDelegate(this,this.OnMouseOut);$addHandler(a,"mouseover",this.OnMouseOverDelegate);$addHandler(a,"mouseout",this.OnMouseOutDelegate)};Ecom.VerticalScroll.prototype={initialize:function(){if(this.scrollPaneCreator){for(i=0;i<this.scrollPaneCreator().length;i++){this.scrollPanes[i]=new Object();this.scrollPanes[i].scrollPanel=this.scrollPaneCreator()[i].divName;Sys.Debug.trace(this.scrollPaneCreator()[i].divName);this.scrollPanes[i].scrollUp=this.scrollPaneCreator()[i].up;Sys.Debug.trace(this.scrollPaneCreator()[i].up);this.scrollPanes[i].scrollDown=this.scrollPaneCreator()[i].down;Sys.Debug.trace(this.scrollPaneCreator()[i].down);div_obj=$get(this.scrollPaneCreator()[i].divName);if(div_obj){this.div_obj=div_obj;this.div_obj.style.overflow="hidden"}}}},stopScroll:function(){clearTimeout(this.timeoutID)},scrollUp:function(){if(this.div_obj){this.scrollCursor=(this.scrollCursor-this.speed)<0?0:this.scrollCursor-this.speed;this.div_obj.scrollTop=this.scrollCursor;var a=this.element.id;Sys.Debug.trace("scrollUpCallBack('"+a+"')");this.timeoutID=setTimeout("scrollUpCallBack('"+a+"')",60)}},scrollDown:function(){if(this.div_obj){this.scrollCursor+=this.speed;this.div_obj.scrollTop=this.scrollCursor;if(this.div_obj.scrollTop==this.scrollCursor){var a=this.element.id;Sys.Debug.trace("scrollDownCallBack('"+a+"')");this.timeoutID=setTimeout("scrollDownCallBack('"+a+"')",60)}else{this.scrollCursor=this.div_obj.scrollTop}}},resetScroll:function(){if(this.div_obj){this.div_obj.scrollTop=0;this.scrollCursor=0}},OnMouseOver:function(a){Sys.Debug.trace("OnMouseOver: "+a.target.id);for(i=0;i<this.scrollPanes.length;i++){Sys.Debug.trace("OnMouseOver: "+this.scrollPanes[i].scrollUp);if(a.target.id==this.scrollPanes[i].scrollUp){Sys.Debug.trace("OnMouseOver found: "+this.scrollPanes[i].scrollUp);this.div_obj=$get(this.scrollPanes[i].scrollPanel);Sys.Debug.trace("OnMouseOverOver found scrollPane: "+this.scrollPanes[i].scrollPanel);if(div_obj){Sys.Debug.trace("Panel found")}else{Sys.Debug.trace("Panel not found")}this.scrollUp()}}for(i=0;i<this.scrollPanes.length;i++){Sys.Debug.trace("OnMouseOverDown: "+this.scrollPanes[i].scrollDown);if(a.target.id==this.scrollPanes[i].scrollDown){Sys.Debug.trace("OnMouseOverDown found: "+this.scrollPanes[i].scrollDown);this.div_obj=$get(this.scrollPanes[i].scrollPanel);Sys.Debug.trace("OnMouseOverDown found scrollPane: "+this.scrollPanes[i].scrollPanel);if(this.div_obj){Sys.Debug.trace("Panel found")}else{Sys.Debug.trace("Panel not found")}this.scrollDown()}}},OnMouseOut:function(a){Sys.Debug.trace("OnMouseOut: "+a.target.id);for(i=0;i<this.scrollPanes.length;i++){if((a.target.id==this.scrollPanes[i].scrollUp)||(a.target.id==this.scrollPanes[i].scrollDown)){this.div_obj=$get(this.scrollPanes[i].scrollPanel);this.stopScroll()}}}};Ecom.VerticalScroll.registerClass("Ecom.VerticalScroll",Sys.UI.Control);Ecom.ControlBase=function(a){this.viewMarker="";Ecom.ControlBase.initializeBase(this,[a]);this.OnChangeDelegate=Function.createDelegate(this,this.OnChange);this.OnClickDelegate=Function.createDelegate(this,this.OnClick);this.OnMouseOverDelegate=Function.createDelegate(this,this.OnMouseOver);this.OnMouseOutDelegate=Function.createDelegate(this,this.OnMouseOut);this.OnKeyPressDelegate=Function.createDelegate(this,this.OnKeyPress);this.MethodTimeoutDelegate=Function.createDelegate(this,this.MethodTimeout);this.OnFocusOutDelegate=Function.createDelegate(this,this.OnFocusOut);this.OnBlurDelegate=Function.createDelegate(this,this.OnBlur);this.GetClickedIndexDelegate=Function.createDelegate(this,this.GetClickedIndex);this.HandleLiveEventDelegate=Function.createDelegate(this,this.HandleLiveEvent)};Ecom.ControlBase.prototype={RegisterEventHandler:function(g,b,k,h,c,f,l,d){if(this.WaitSpecifications==null){this.WaitSpecifications=new Array()}var e=this.WaitSpecifications[g];if(e==null){e=new Object();this.WaitSpecifications[g]=e}var j=e.events;if(j==null){j=new Array();e.events=j}var a=new Object();a.methodtocall=h;a.delegateforresult=c;a.stateretriever=f;a.showwaitmethod=l;a.hidewaitmethod=d;a.cancelevent=k;j[b]=a},HandleLiveEvent:function(a){var g=jQuery(a.target);var e=a.data;var b=a.type;var f={wait:{showwaitmethod:e.showWaitMethod,hidewaitmethod:e.hideWaitMethod}};var d=false;var c=g.attr("disableClick");if(c!=null){d=Boolean.parse(c)}if(!d){var j=null;if(e.stateRetriever!=null){j=e.stateRetriever(a,b)}this.Wait(f,true);if(e.methodToCall!=null){e.methodToCall(g.attr("id"),b,j,e.delegateForResult,this.MethodTimeoutDelegate,f)}var h=e.cancelEvent;if(h){a.preventDefault()}return true}return true},ScrollElementIntoView:function(a){var b=$get(a);if(b!=null){b.scrollIntoView(true)}},ScrollIntoView:function(){this.ScrollElementIntoView(this.viewMarker)},ScrollComponentIntoView:function(a){var b=$find(a);if((b!=null)&&(b.ScrollIntoView!=null)){Sys.Debug.trace("Called ScrollComponentIntoView for componentid: "+a);b.ScrollIntoView()}},Wait:function(f,e){if(f!=null){var a=null;var h=null;var d=e?"block":"none";var g=e?"none":"block";var c=0;var b=f.wait;if(e){this.CurrentWaitSpecification=b}else{if(b==null){b=this.CurrentWaitSpecification}}if(b!=null){if(e){if(b.showwaitmethod!=null){b.showwaitmethod()}}else{if(b.hidewaitmethod!=null){b.hidewaitmethod()}}if(b.relativeShowPanels!=null){for(c=0;c<b.relativeShowPanels.length;c++){a=b.relativeShowPanels[c]+f.relativePostfix;h=$get(a);if(h!=null){h.style.display=d}}}if(b.absoluteShowPanels!=null){for(c=0;c<b.absoluteShowPanels.length;c++){a=b.absoluteShowPanels[c];h=$get(a);if(h!=null){h.style.display=d}}}if(b.relativeHidePanels!=null){for(c=0;c<b.relativeHidePanels.length;c++){a=b.relativeHidePanels[c]+f.relativePostfix;h=$get(a);if(h!=null){h.style.display=g}}}if(b.absoluteHidePanels!=null){for(c=0;c<b.absoluteHidePanels.length;c++){a=b.absoluteHidePanels[c];h=$get(a);if(h!=null){h.style.display=g}}}}}},GetClickedIndex:function(d){var c=null;if(d==null){return null}var b=d.target;if(b==null){return null}var e=b.id;if(e==null){return null}var a=e.lastIndexOf("_");if(a>=0){return e.substring(a+1)}return null},populateDropdown:function(c){if(!c||!c.select){return false}c=jQuery.extend({priceTicketModusDependent:true},c);var h=$get(c.select);if(h===null){return false}jSelectElement=jQuery(h);try{if(c.data&&c.data.Options&&c.data.SelectedValue){jSelectElement.show();jSelectElement.empty();h.selectedIndex=-1;h.value=null;var n=c.data.Options,j=n.length,k=c.data.SelectedValue;for(var f=0;f<j;f++){var l=n[f],g=jQuery("<option/>").val(l.Value).text(l.Description);if(l.Value==k){g.attr("selected","selected")}g.appendTo(h)}}var o=h.options,b=(o&&o.length>0);if(c.label&&b){var m=$get(c.label);if(m===null){return}var e=(o.length==1),d=o[0];if(e){jQuery(m).text(d.text).show();jSelectElement.hide()}else{jSelectElement.show();jQuery(m).hide()}}return b}catch(a){Sys.Debug.trace(a.description)}},ChangeSelectToMode:function(b,a,c){if(b!=null&&a!=null&&b.mode!=c){b.setAttribute("mode",c);b.style.display=(c=="readonly")?"none":"";a.style.display=(c=="readonly")?"":"none"}},FindRadioButtonValue:function(a){try{var d=a.childNodes;if(d!=null){for(var b=0;b<d.length;b++){var e=d[b];if(e.tagName=="INPUT"){if(e.type=="radio"){if(e.checked==true){return e.value}}}else{result=this.FindRadioButtonValue(e);if(result!=null){return result}}}}}catch(c){alert("FindRadioButtonValue error")}return null},GetSelectedValue:function(c){var b=$get(c);var a=b.selectedIndex;return b.options.children[a].value},UnhookChildSelects:function(a){if(a.getAttribute!=null){var e=a.getAttribute("noselects");if(e!=null){return}}if(a!=null){var d=a.getElementsByTagName("SELECT");if(d!=null){for(var c=0;c<d.length;c++){var f=d[c];try{$removeHandler(f,"change",this.OnChangeDelegate)}catch(b){}}}}},HookChildSelects:function(a){if(a.getAttribute!=null){var d=a.getAttribute("noselects");if(d!=null){return}}if(a!=null){var c=a.getElementsByTagName("SELECT");if(c!=null){for(var b=0;b<c.length;b++){var e=c[b];if(e!=null){$addHandler(e,"change",this.OnChangeDelegate)}}}}},OnPrepareContentUpdate:function(){var a=this.get_element();if(a!=null){this.UnhookChildSelects(a)}},OnContentUpdated:function(){var a=this.get_element();if(a!=null){this.HookChildSelects(a)}},DoPartialUpdate:function(o){if(o!=null){for(var l=0;l<o.length;l++){var q=o[l];var n=null;if(q.DivId!=null){n=$get(q.DivId);if(n==null){Sys.Debug.trace("Partial update div not found: "+q.DivId)}}if(n!=null){var d=q.DivOperation;if(d==0){this.UnhookChildSelects(n);var p=n.parentNode;var t=p.childNodes;for(var h=0;h<t.length;h++){var b=t[h];if(b.id==q.DivId){var u=document.createElement("div");u.innerHTML=q.DivHtml.trim();var a=u.childNodes[0];p.replaceChild(a,b);break}}n=$get(q.DivId);if(n!=null){this.HookChildSelects(n)}}else{if(d==1){this.UnhookChildSelects(n);n.innerHTML=q.DivHtml;this.HookChildSelects(n)}else{if(d==2){var u=document.createElement("div");u.innerHTML=q.DivHtml;n.appendChild(u);this.HookChildSelects(u)}}}this.notifyTeaLeafOnDomChanges(n)}var c=q.PostOperations;if(c!=null){var g=0;for(g=0;g<c.length;g++){var f=c[g];var r=this[f];if(r!=null){try{r()}catch(m){}}}}}}},notifyTeaLeafOnDomChanges:function(a){if(a!==null){if(typeof TeaLeaf!=="undefined"&&TeaLeaf!==null){if(typeof TeaLeaf.Client!=="undefined"&&TeaLeaf.Client!==null){if(typeof TeaLeaf.Client.tlProcessNode==="function"){TeaLeaf.Client.tlProcessNode(document.body)}}}}},MethodTimeout:function(b,a){this.Wait(b,false);if(b.get_timedOut()){alert("Timeout error, please try again.")}else{if(b.get_statusCode()==0){return}else{if(b.get_statusCode()>0){if(b.get_message()!=""){this.CreateRefreshPagePopup();if(!this.ShowRefreshPagePopup()){alert(b.get_message())}}}else{alert("Unexpected error occured. (status code: "+b.get_statusCode()+")")}}}},ShowRefreshPagePopup:function(){Ecom.Application.hideWaiterBox();if(this.refreshPagePopup==null){return false}this.refreshPagePopup.show();return true},RefreshPagePopup:function(){window.location.reload()},CreateRefreshPagePopup:function(){var a={dialogClass:"option",width:350,minHeight:80};this.refreshPagePopup=new Ecom.UI.ModalBox("#refreshPagePopup",a);var b=this;jQuery("#refreshPagePopupBtn").click(function(){b.RefreshPagePopup()})},HandleEvent:function(a,b){var g=a.target;var f=this.FindWaitSpecificationInstance(g,b);if(f!=null){var e=f.wait;if(e!=null){var d=false;var c=g.attributes.disableClick;if(c!=null){d=Boolean.parse(c.value)}if(!d){var h=null;if(e.stateretriever!=null){h=e.stateretriever(a,b)}this.Wait(f,true);if(e.methodtocall!=null){e.methodtocall(g.id,b,h,e.delegateforresult,this.MethodTimeoutDelegate,f)}var j=e.cancelevent;if(j){a.preventDefault()}return true}}}return true},FindWaitSpecificationInstance:function(g,a){if(g==null||g.id==""){return null}var d=g.id.indexOf("_");var h="";if(d>=0){h=g.id.substring(0,d)}else{h=g.id}var f=null;if(this.WaitSpecifications==null){return null}var e=this.WaitSpecifications[h];if(e!=null){for(var b in e.events){if(b==a){f=new Object();f.wait=e.events[b];if(d>=0){var j=g.id.substring(d+1);var c=j.indexOf("_");if(c>=0){j=j.substring(0,c)}f.relativePostfix=j}break}}}return f},OnChange:function(a){return this.HandleEvent(a,"change")},OnClick:function(a){return this.HandleEvent(a,"click")},OnMouseOver:function(a){return this.HandleEvent(a,"mouseover")},OnMouseOut:function(a){return this.HandleEvent(a,"mouseout")},OnKeyPress:function(a){return this.HandleEvent(a,"keypress")},OnFocusOut:function(a){return this.HandleEvent(a,"focusout")},OnBlur:function(a){return this.HandleEvent(a,"blur")},UpdateMandatoryFieldIndicator:function(b,a){if(b!=null){if(b.value==""){Sys.UI.DomElement.addCssClass(b,a);return false}Sys.UI.DomElement.removeCssClass(b,a);return true}return false},ClearMandatoryFieldIndicator:function(b,a){if(b!=null){Sys.UI.DomElement.removeCssClass(b,a)}},UpdateMandatoryWaterMarkFieldIndicator:function(b,a){if(b!=null){if(b.value==b.name){Sys.UI.DomElement.addCssClass(b,a);return false}Sys.UI.DomElement.removeCssClass(b,a);return true}return false},UpdateInvalidValueIndicator:function(c,a,b){if(null!=c){if(a){Sys.UI.DomElement.addCssClass(c,b)}else{Sys.UI.DomElement.removeCssClass(c,b)}}},Show:function(){show(this.get_element().id)},ShowParentComponent:function(a){while(a!=null){if(a.getAttribute("name")=="Component"){a.style.display="";return}a=a.parentNode}},HideParentComponent:function(a){while(a!=null){if(a.getAttribute("name")=="Component"){a.style.display="none";return}a=a.parentNode}},Hide:function(){hide(this.get_element().id)},UpdateValidFieldIndicator:function(c,b,a){if(c!=null){if(a){Sys.UI.DomElement.removeCssClass(c,b)}else{Sys.UI.DomElement.addCssClass(c,b)}}}};Ecom.ControlBase.registerClass("Ecom.ControlBase",Sys.UI.Control);var omnitureVar_TabName="";var omnitureVar_PageType="";var omnitureVar_ChannelName="";var omnitureVar_Sccid="";var omnitureVar_Sccl="";var omnitureVar_Scip="";var omnitureVar_Sipm="";var omnitureVar_fhFacets="";var IsOmnitureMonitoring=false;var initialOmnitureData=null;var isOmnitureInitialisationTriggered=false;var omniture_RetrieverType="";function appendStrings(a,b){if(a!=""&&b!=""){a+=":"}return a+b}function appendAllOmnitureFacets(){var a="";a=appendStrings(a,omnitureVar_PageType);a=appendStrings(a,omnitureVar_ChannelName);a=appendStrings(a,omnitureVar_fhFacets);return a}function AddCoBrandedUrl(a){if(a.CoBrandedHostUrl!=null){s.channel=a.CoBrandedHostUrl}}function AddLoggedInState(a){s.prop28=a.Prop[28]}function AddDetailPageSpecific(a){s.prop37=a.Prop[37]}function AddAccount(b){var a=b.OmnitureAccount;if(a!=""){s.sa(a)}}function AddDebugSection(a){if(a.IsOmnitureMonitoring){if(TraceOmnitureLogging!=null){TraceOmnitureLogging()}}}function MakeOmnitureCall(){var a=window.s.t();if(a){document.write(a)}}function LaunchOmnitureLogging(a,b){if(b!=null){initialOmnitureData=b}if(initialOmnitureData.Server){s.server=initialOmnitureData.Server}if(initialOmnitureData.IsPaymentConfirmation){s.pageName=initialOmnitureData.PageName;s.channel=initialOmnitureData.SChannelName;s.eVar12=initialOmnitureData.EVar[12];s.prop19=initialOmnitureData.Prop[19];s.purchaseID=initialOmnitureData.PurchaseId;s.prop1=initialOmnitureData.Prop[1];s.prop2=initialOmnitureData.Prop[2];s.prop3=initialOmnitureData.Prop[3];s.eVar7=initialOmnitureData.EVar[7];s.eVar35=initialOmnitureData.EVar[35];s.eVar55=initialOmnitureData.EVar[55];s.events=initialOmnitureData.Events;s.products=initialOmnitureData.Products;AddCoBrandedUrl(initialOmnitureData);s.eVar11=initialOmnitureData.EVar[11];AddLoggedInState(initialOmnitureData);AddAccount(initialOmnitureData);AddDebugSection(initialOmnitureData);MakeOmnitureCall();return}s.eVar11=initialOmnitureData.EVar[11];s.prop2=initialOmnitureData.Prop[2];if(initialOmnitureData.HasChannelName){s.channel=initialOmnitureData.SChannelName;s.eVar12=initialOmnitureData.EVar[12];s.prop19=initialOmnitureData.Prop[19]}if(initialOmnitureData.Is404Page){s.pageType=initialOmnitureData.PageType}else{if(initialOmnitureData.IsSeoClusterPage){s.pageName="cluster:"+initialOmnitureData.ClusterUrl;s.pageName=unescape(s.pageName)}else{if(initialOmnitureData.IsStaticCmsPage){s.pageName=initialOmnitureData.PageName}else{s.pageName=appendAllOmnitureFacets();s.pageName=appendStrings(s.pageName,omnitureVar_TabName)}}}if(initialOmnitureData.IsFreeTextSearch){if(initialOmnitureData.IsEmptySearchResult){s.eVar14=initialOmnitureData.EVar[14]}else{s.eVar13=initialOmnitureData.EVar[13]}}s.eVar22=omnitureVar_ChannelName;s.campaign=omnitureVar_Sccid;s.eVar19=omnitureVar_Sccl;s.eVar20=omnitureVar_Scip;omnitureVar_Sccl="";omnitureVar_Scip="";omnitureVar_Sccid="";AddCoBrandedUrl(initialOmnitureData);if(initialOmnitureData.RequiresProductView){if((a==null)||!a){s.events="prodView";if(initialOmnitureData.Products!=null&&initialOmnitureData.Products!=""){s.products=initialOmnitureData.Products}}}AddLoggedInState(initialOmnitureData);AddAccount(initialOmnitureData);AddDebugSection(initialOmnitureData);MakeOmnitureCall();s.eVar19="";s.eVar20="";s.campaign="";s.events="";s.prop27="";s.prop30="";s.prop32="";s.prop37="";s.eVar51=""}Ecom.Omniture=function(a){this.InitializeOmnitureDataDelegate=Function.createDelegate(this,this.InitializeOmnitureData);if(!isOmnitureInitialisationTriggered){isOmnitureInitialisationTriggered=true;Sys.Application.add_load(this.InitializeOmnitureDataDelegate)}Ecom.Omniture.initializeBase(this,[a])};Ecom.Omniture.prototype={initialize:function(){Ecom.Omniture.callBaseMethod(this,"initialize")},dispose:function(){Ecom.Omniture.callBaseMethod(this,"dispose")},DoPartialUpdate:function(a){alert("unexpected error")},DoPartialUpdateWithOmnitureLogging:function(a){if(a!=null){Ecom.Omniture.callBaseMethod(this,"DoPartialUpdate",[a.divUpdates]);var b=a.OmnitureLogging;s.eVar52="";s.eVar53="";s.eVar54="";if(b!=null){this.DoOmnitureCall(b)}}},DoOmnitureCall:function(a){if(a.TabName!=null){omnitureVar_TabName=a.TabName}if(a.FhFacets!=null){omnitureVar_fhFacets=a.FhFacets}if(a.Products!=null){s.products=a.Products}if(a.Events!=null){s.events=a.Events}this.PopulateOmnitureGroup(a,"EVar",100,s);this.PopulateOmnitureGroup(a,"Prop",100,s);LaunchOmnitureLogging(true)},PopulateOmnitureGroup:function(g,f,c,b){var a=f.substr(0,1).toLowerCase()+f.substr(1,f.length);for(i=1;i<c+1;i++){var e=g[f][i];if(e!=null){var d=a+i;b[d]=e}}},InitializeOmnitureData:function(){var omnitureLoggingData=eval("("+jQuery("#initialOmnitureLoggingData").val()+")");omnitureVar_PageType=omnitureLoggingData.PageType;omnitureVar_ChannelName=omnitureLoggingData.ChannelName;omnitureVar_Sccid=omnitureLoggingData.Sccid;omnitureVar_Sccl=omnitureLoggingData.Sccl;omnitureVar_Scip=omnitureLoggingData.Scip;omnitureVar_fhFacets=omnitureLoggingData.FhFacetString;omniture_RetrieverType=omnitureLoggingData.OmnitureRetrieverType;for(i=1;i<60;i++){var value=omnitureLoggingData.EVar[i];if(value!=null){s["eVar"+i]=omnitureLoggingData.EVar[i]}}for(i=1;i<60;i++){var value=omnitureLoggingData.Prop[i];if(value!=null){s["prop"+i]=omnitureLoggingData.Prop[i]}}GetOmnitureEventSuite().AddEvents();LaunchOmnitureLogging(false,omnitureLoggingData)}};Ecom.Omniture.registerClass("Ecom.Omniture",Ecom.ControlBase);var container=$get("initialOmnitureLoggingData");if(container!=null){$create(Ecom.Omniture,null,null,null,container)}Ecom.OmnitureMonitor=function(a){Ecom.OmnitureMonitor.initializeBase(this,[a])};Ecom.OmnitureMonitor.prototype={initialize:function(){},AddTraceLine:function(b,a,c){if((c!=undefined)&&(c!=null)&&(c!="")){b+=a+" = "+c+"\n"}return b},TraceOmnitureLogging:function(){var a="";a=this.AddTraceLine(a,"s.server",s.server);a=this.AddTraceLine(a,"s.pageName",s.pageName);a=this.AddTraceLine(a,"s.channel",s.channel);a=this.AddTraceLine(a,"s.products",s.products);a=this.AddTraceLine(a,"s.events",s.events);a=this.AddTraceLine(a,"s.campaign",s.campaign);a=this.BuildOmnitureTraceGroup(a,"prop",100,s);a=this.BuildOmnitureTraceGroup(a,"eVar",100,s);alert(a)},BuildOmnitureTraceGroup:function(c,e,a,b){for(i=1;i<a+1;i++){var d=e+i;c=this.AddTraceLine(c,"s."+d,b[d])}return c}};Ecom.OmnitureMonitor.registerClass("Ecom.OmnitureMonitor");function TraceOmnitureLogging(){var a=new Ecom.OmnitureMonitor();a.TraceOmnitureLogging()}Ecom.OmnitureEventSuite=function(a){Ecom.OmnitureEventSuite.initializeBase(this,[a]);this.bookingTravellersEvents={};this.bookingTravellersEvents.omnitureEvent_BookingImportantTravelInfo=this.Booking_ImportantTravelInfo_OnClick;this.bookingTravellersEvents.omnitureEvent_BookingRoomOccupationError=this.Booking_RoomOccupationError_OnClick;this.bookingOptionsAndExtrasEvents={};this.bookingOptionsAndExtrasEvents.omnitureEvent_BookingTermAndConditions=this.Booking_InsurancesTermsAndConditionsUrl_OnClick;this.bookingPaymentEvents={};this.bookingPaymentEvents.omnitureEvent_BookingTravelConditions=this.Booking_TravelConditionsUrl_OnClick;this.bookingPaymentEvents.omnitureEvent_BookingPrivacy=this.Booking_PrivacyUrl_OnClick;this.bookingPaymentEvents.omnitureEvent_BookingUseVoucher=this.Booking_UseVoucher_OnClick;this.bookingPaymentEvents.omnitureEvent_BookingPaymentAgreed=this.Booking_PaymentAgreed_OnClick;this.detailPageBestPriceFinderEvents={};this.detailPageBestPriceFinderEvents.omnitureEvent_BestPriceFinderShow=this.BestPriceFinderShow_OnClick;this.detailPageBestPriceFinderEvents.omnitureEvent_BestPriceFinderClose=this.BestPriceFinderClose_OnClick;this.detailPageBestPriceFinderEvents.omnitureEvent_BestPriceFinderResultSelected=this.BestPriceFinderResultSelected_OnClick;this.listerPageEvents={};this.listerPageEvents.omnitureEvent_MapTabClick=this.ListerPageMapTab_OnClick;this.listerPageEvents.omnitureEvent_GmapToDetail_OnClick=this.GmapToDetail_OnClick;this.detailPageEvents={};this.detailPageEvents.omnitureEvent_SendDetailPageByEmailClick=this.SendDetailPageByEmail_OnClick;this.detailPageEvents.omnitureEvent_SendDetailPageByEmailSent=this.SendDetailPageByEmail_EmailSent;this.detailPageEvents.omnitureEvent_PrintFriendlyDetailPageClick=this.PrintFriendlyDetailPage_OnClick;this.communityBarEvents={};this.communityBarEvents.omnitureEvent_CommunityBarLinkClick=this.CommunityBarLink_OnClick};Ecom.OmnitureEventSuite.prototype={initialize:function(){},AddEvents:function(){this.AddEventArray(this.bookingTravellersEvents);this.AddEventArray(this.bookingOptionsAndExtrasEvents);this.AddEventArray(this.bookingPaymentEvents);this.AddEventArray(this.detailPageBestPriceFinderEvents);this.AddEventArray(this.listerPageEvents);this.AddEventArray(this.detailPageEvents);this.AddEventArray(this.communityBarEvents)},AddEventArray:function(a){for(current in a){if(a.hasOwnProperty(current)){jQuery("."+current).live("click",a[current])}}},Booking_ImportantTravelInfo_OnClick:function(){s.prop3="Boeking:Reizigers:BelangrijkeReisinformatie";LaunchOmnitureLogging(true)},Booking_RoomOccupationError_OnClick:function(){s.prop3="Boeking:Reizigers:LeeftijdEnGeboortedatum";LaunchOmnitureLogging(true)},Booking_InsurancesTermsAndConditionsUrl_OnClick:function(){s.prop3="Boeking:OptiesEnExtras:Verzekeringsvoorwaarden";LaunchOmnitureLogging(true)},Booking_TravelConditionsUrl_OnClick:function(){s.prop3="Boeking:Betaling:Reisvoorwaarden";LaunchOmnitureLogging(true)},Booking_PrivacyUrl_OnClick:function(){s.prop3="Boeking:Betaling:Privacy";LaunchOmnitureLogging(true)},Booking_UseVoucher_OnClick:function(){s.prop3="Boeking:Betaling:CheckVoucher";LaunchOmnitureLogging(true)},Booking_PaymentAgreed_OnClick:function(){s.prop3="Boeking:Betaling:ReisvoorwaardenVoorAkkoord";LaunchOmnitureLogging(true)},Booking_TravellersSubmit_InvalidData:function(){s.prop3="Boeking:Reizigers:OngeldigeGegevens";LaunchOmnitureLogging(true)},Booking_AddressInfoSubmit_InvalidData:function(){s.prop3="Boeking:Personalia:OngeldigeGegevens";LaunchOmnitureLogging(true)},BestPriceFinderShow_OnClick:function(){s.prop3="Detail:BestePrijsZoeker:Openen";LaunchOmnitureLogging(true)},BestPriceFinderClose_OnClick:function(){s.prop3="Detail:BestePrijsZoeker:Sluiten";LaunchOmnitureLogging(true)},BestPriceFinderResultSelected_OnClick:function(){s.prop3="Detail:BestePrijsZoeker:Selecteren";LaunchOmnitureLogging(true)},ListerPageMapTab_OnClick:function(){s.prop32="kaart";LaunchOmnitureLogging(true)},GmapToDetail_OnClick:function(){s.events="event62";LaunchOmnitureLogging(true)},SendDetailPageByEmail_OnClick:function(){s.prop3="Detail:SendDetailPageByEmail:MailDoor";LaunchOmnitureLogging(true)},SendDetailPageByEmail_EmailSent:function(){s.prop3="Detail:SendDetailPageByEmail:EmailVerstuurd";s.events="event65";LaunchOmnitureLogging(true)},PrintFriendlyDetailPage_OnClick:function(){s.events="event64";LaunchOmnitureLogging(true)},ZooverRating_OnClick:function(a){s.prop30=a;s.events="event19";LaunchOmnitureLogging(true)},StaticGoogleMaps_OnClick:function(){s.events="event61";LaunchOmnitureLogging(true)},CommunityBarLink_OnClick:function(a){var b=jQuery(a.currentTarget).attr("data-omniture-tag");s.prop15=b;LaunchOmnitureLogging(true)},ListerDetailClicked:function(a,b){s.prop35=a;s.prop36=b;s.eVar55=a;s.eVar56=b;s.events="event69";AddDetailPageSpecific(initialOmnitureData);LaunchOmnitureLogging(true)},FillInOmnitureForListerDetailClicked:function(listeritem){var AccosJsonText=jQuery("#ProductIdsWithIndex").val();if(AccosJsonText){var accos=eval("("+AccosJsonText+")");var divId=listeritem.find("div.price-detail-lister")[0].id;var prodId=divId.substring(divId.indexOf("_")+1,divId.length);var index=accos[prodId];prodId=prodId.substring(0,prodId.lastIndexOf("_"));prodId=prodId.substring(prodId.lastIndexOf("_")+1).toLowerCase();this.ListerDetailClicked(prodId,index)}}};Ecom.OmnitureEventSuite.registerClass("Ecom.OmnitureEventSuite");var omnitureEventSuite=null;function GetOmnitureEventSuite(){if(omnitureEventSuite===null){omnitureEventSuite=new Ecom.OmnitureEventSuite()}return omnitureEventSuite}Ecom.UpdaterWithWaitHeader=function(a){this.ShowHeaderWaitPanelDelegate=Function.createDelegate(this,this.ShowHeaderWaitPanel);this.HideHeaderWaitPanelDelegate=Function.createDelegate(this,this.HideHeaderWaitPanel);Ecom.UpdaterWithWaitHeader.initializeBase(this,[a])};Ecom.UpdaterWithWaitHeader.prototype={initialize:function(){Ecom.UpdaterWithWaitHeader.callBaseMethod(this,"initialize")},ShowHeaderWaitPanel:function(){Ecom.Application.showWaiterBox()},HideHeaderWaitPanel:function(){Ecom.Application.hideWaiterBox()}};Ecom.UpdaterWithWaitHeader.registerClass("Ecom.UpdaterWithWaitHeader",Ecom.ControlBase);Ecom.SimplePromotionComponent=function(a){Ecom.SimplePromotionComponent.initializeBase(this,[a]);this.NamingContainer="";this.OnPromoClickDelegate=Function.createDelegate(this,this.OnPromoClick);this.RegisterEventHandler("promoClick","click",false,this.OnPromoClickDelegate,null,null,null,null);$addHandler(a,"click",this.OnClickDelegate)};Ecom.SimplePromotionComponent.prototype={initialize:function(){},OnPromoClick:function(c){var b=$get(c);if(b!=null){do{var a=b.getAttribute("url");if(a!=null&&a.length>0){document.location.href=a;return true}b=b.parentNode}while(b!=null)}return true}};Ecom.SimplePromotionComponent.registerClass("Ecom.SimplePromotionComponent",Ecom.ControlBase);Ecom.DateControl=function(a){this.namingContainer=a.id+"_";Ecom.DateControl.initializeBase(this,[a]);this.OnYearChangeDelegate=Function.createDelegate(this,this.OnYearChange);this.OnMonthChangeDelegate=Function.createDelegate(this,this.OnMonthChange);this.OnDaysBlurDelegate=Function.createDelegate(this,this.ValidateDaySelection);this.OnMonthsBlurDelegate=Function.createDelegate(this,this.ValidateMonthSelection);this.OnYearsBlurDelegate=Function.createDelegate(this,this.ValidateYearSelection);this.days=$get(this.namingContainer+"days");$addHandler(this.days,"blur",this.OnDaysBlurDelegate);this.months=$get(this.namingContainer+"months");$addHandler(this.months,"change",this.OnMonthChangeDelegate);$addHandler(this.months,"blur",this.OnMonthsBlurDelegate);this.years=$get(this.namingContainer+"years");$addHandler(this.years,"change",this.OnYearChangeDelegate);$addHandler(this.years,"blur",this.OnYearsBlurDelegate);this.hasBlankDefault=false;this.supportsSingleFieldValidation=false;this.minAge=0;this.maxAge=100};Ecom.DateControl.prototype={initialize:function(){var a=new Date().getFullYear();a-=this.minAge;this.FillYears(a);this.FillMonths();this.FillDays()},AddDefault:function(e,b){if(null!=e){var a=e.length;for(index=e.length;index>0;index--){var c=index-1;var f=e[c].text;var d=e[c].value;e[index]=new Option(f,d)}if(null==b){e[0]=new Option("","")}else{e[0]=b}e.value=0}},FillBlankDefaults:function(){if(this.hasBlankDefault){this.AddDefault(this.years);this.AddDefault(this.months);this.AddDefault(this.days)}},GetBaseCounterValue:function(){if(this.hasBlankDefault){return 1}return 0},FillYears:function(b){var c;var a=this.GetBaseCounterValue();for(c=b;c>b-this.maxAge;c--){var d=new Option(c,c);this.years.options[a]=d;a++}},FillMonths:function(){var b;var a=this.GetBaseCounterValue();for(b=1;b<=12;b++){var c=new Option(b,b);this.months.options[a]=c;a++}},FillDays:function(){var b;var a=this.GetBaseCounterValue();for(b=1;b<=31;b++){var c=new Option(b,b);this.days.options[a]=c;a++}},RemoveBlankDefault:function(a){if(this.hasBlankDefault&&(null!=a)){a.remove(0)}},IsValidDate:function(){if(this.hasBlankDefault){return this.IsDaySelected()&&this.IsMonthSelected()&&this.IsYearSelected()}return true},IsDaySelected:function(){return((null!=this.days)&&(null!=this.days.value)&&(""!=this.days.value)&&("0"!=this.days.value))},IsMonthSelected:function(){return((null!=this.months)&&(null!=this.months.value)&&(""!=this.months.value)&&("0"!=this.months.value))},IsYearSelected:function(){return((null!=this.years)&&(null!=this.years.value)&&(""!=this.years.value)&&("0"!=this.years.value))},Validate:function(){this.UpdateMandatoryFieldIndicator(this.days,"invalid");this.UpdateMandatoryFieldIndicator(this.months,"invalid");this.UpdateMandatoryFieldIndicator(this.years,"invalid")},ClearValidation:function(){this.ClearMandatoryFieldIndicator(this.days,"invalid");this.ClearMandatoryFieldIndicator(this.months,"invalid");this.ClearMandatoryFieldIndicator(this.years,"invalid")},ValidateDaySelection:function(){if(this.supportsSingleFieldValidation){this.UpdateMandatoryFieldIndicator(this.days,"invalid")}},ValidateMonthSelection:function(){if(this.supportsSingleFieldValidation){this.UpdateMandatoryFieldIndicator(this.months,"invalid")}},ValidateYearSelection:function(){if(this.supportsSingleFieldValidation){this.UpdateMandatoryFieldIndicator(this.years,"invalid")}},ToString:function(){return this.days.value+"/"+this.months.value+"/"+this.years.value},AdaptDays:function(){var a=this.days.value;this.RemoveBlankDefault(this.days);var e=31;var c=this.years.value;var d=this.months.value;if(d==2){if(this.IsLeapYear(c)){e=29}else{e=28}}if((d==4)||(d==6)||(d==9)||(d==11)){e=30}if(a>e){a=e}var b;var f=this.days.options.length;if(f>e){this.days.options.length=e}if(f<e){for(b=f+1;b<=e;b++){this.days.options[b-1]=new Option(b,b)}}this.AddDefault(this.days);this.days.value=a},OnYearChange:function(){this.AdaptDays()},OnMonthChange:function(){this.AdaptDays()},IsLeapYear:function(a){if(((a%4==0)&&(a%100!=0))||(a%400==0)){return true}else{return false}},SetDate:function(b,c,a){this.years.value=b;this.OnYearChange();this.months.value=c;this.OnMonthChange();this.days.value=a},SetFromCanonicalString:function(a){var c=new Number(a.substring(0,4));var d=new Number(a.substring(4,6));var b=new Number(a.substring(6,8));this.SetDate(c,d,b)},GetCanonicalStringValue:function(){return new Date(this.years.value,new Number(this.months.value)-1,this.days.value).format("yyyyMMdd")}};Ecom.DateControl.registerClass("Ecom.DateControl",Ecom.ControlBase);Ecom.SuggestedSearchControl=function Ecom$SuggestedSearchControl(a){this._jComponent=null;this._jSuggestedInput=null;this._jSuggestedButton=null;this._jControlPlaceholder=null;this._jSuggestResultPlaceholder=null;this._jComponentDialog=null;this._pageKey=null;this._componentId=null;this._baseUrl=null;this._cultureInfoName=null;this._suggestedSearchIntervalId=null;this._timeOfLastKeyPress=new Date();this._lastSearchTerm=null;this._suggestedSearchEnabled=null;this._keyPressDelayInterval=350;this.SearchInputKeyUpDelegate=Function.createDelegate(this,this.SearchInputKeyUp);this.SuggestedSearchResultDelegate=Function.createDelegate(this,this.SuggestedSearchResult);this.PerformSuggestedSearchDelegate=Function.createDelegate(this,this.PerformSuggestedSearch);this.WindowResizedDelegate=Function.createDelegate(this,this.WindowResized);this.PerformRegularSearchDelegate=Function.createDelegate(this,this.PerformRegularSearch);this.SetRequestHeaderDelegate=Function.createDelegate(this,this.SetRequestHeader);this.ClickToCloseDelegate=Function.createDelegate(this,this.ClickClose);this.SuggestedSearchErrorDelegate=Function.createDelegate(this,this.SuggestedSearchError);this.CloseSuggestedDelegate=Function.createDelegate(this,this.CloseSuggested);Ecom.SuggestedSearchControl.initializeBase(this,[a])};Ecom.SuggestedSearchControl.prototype={initialize:function(){Ecom.SuggestedSearchControl.callBaseMethod(this,"initialize");this._jComponent=jQuery(this.get_element());if(jQuery("#suggestedsearch-inlineplaceholder").length>0){this._jComponentPlaceholder=jQuery("#suggestedsearch-inlineplaceholder");Sys.Debug.trace("Registering 'suggestedsearch-inlineplaceholder' for use in header.")}else{this._jComponentPlaceholder=jQuery("#suggestedsearch-placeholder");Sys.Debug.trace("Registering 'suggestedsearch-placeholder' for use in header.")}this._jSuggestedInput=this._jComponent.find("[name=suggestedSearchInput]");this._jSuggestResultPlaceholder=this._jComponent.find(".search-results-selector");this._jSuggestedButton=this._jComponent.find(".search-button-selector");this._pageKey=this._jComponent.attr("data-pagekey");this._componentId=this._jComponent.attr("data-componentId");this._baseUrl=this._jComponent.attr("data-listerurl");this._keyPressDelayInterval=this._jComponent.attr("data-keyPressDelayInterval");this._cultureInfoName=jQuery("form:first").attr("cultureinfoname");this._suggestedSearchEnabled=(this._jSuggestResultPlaceholder.length>0);this._jSuggestedInput.attr("value",this._jSuggestedInput.attr("defaultValue"));this._jSuggestedInput.enableClearAndRestoreField();var a=this._jComponent.width();this._jComponentDialog=this._jComponent.dialog({closeOnEscape:false,draggable:false,resizable:false,minHeight:0,closeText:"",position:[0,0],width:a,dialogClass:"suggested-search-control",autoOpen:false,zIndex:1500});this._jComponent.prev(".ui-dialog-titlebar").remove();this.PositionPopUp();this._jComponentDialog.dialog("open");this.PositionPopUp();this._jSuggestedInput.blur();this._jSuggestedInput.live("keyup",this.SearchInputKeyUpDelegate);this._jSuggestedButton.live("click",this.PerformRegularSearchDelegate);jQuery(window).resize(this.WindowResizedDelegate)},SearchInputKeyUp:function(a){a.stopPropagation();if(a.keyCode=="13"){this.PerformRegularSearch()}else{if(a.keyCode=="27"){this.CloseSuggested()}else{if(this._suggestedSearchEnabled){if(this._suggestedSearchIntervalId!=null){clearTimeout(this._suggestedSearchIntervalId)}this._suggestedSearchIntervalId=setTimeout(this.PerformSuggestedSearchDelegate,this._keyPressDelayInterval)}}}},ClickClose:function(a){this.CloseSuggested()},PerformSuggestedSearch:function(){var a=this._jSuggestedInput.val();if(a!=null&&a.length>2){this._lastSearchTerm=a;Sys.Debug.trace("Performing suggested search for : "+a+" at "+Date());jQuery.ajax({beforeSend:this.SetRequestHeaderDelegate,type:"POST",dataType:"json",contentType:"application/json",url:"/SearchBrowse.asmx/PerformSuggestedSearch",data:"{ searchTerm: '"+a+"', pageKey: '"+this._pageKey+"', componentId: '"+this._componentId+"'}",success:this.SuggestedSearchResultDelegate,timeout:10000,error:this.SuggestedSearchErrorDelegate})}else{this.RemoveModal()}},PerformRegularSearch:function(){if(this._baseUrl==null){return}var f=new Sys.StringBuilder();f.append(this._baseUrl);var b=this._jSuggestedInput;if(b){var d=b.val();var a=b.attr("defaultValue");if(d){d=d.trim()}if(a&&a==d){return}if(d&&d.length>0){f.append("?filter=search(");f.append(encodeURIComponent(d));f.append(")")}}var c=f.toString();this.RemoveModal();jQuery(".ui-dialog, .suggested-search-control").css("z-index",5);var e=$find("mainclick");if(e!=null){e.ShowWaitPanel()}open(c,"_self")},SuggestedSearchError:function(a){if(a!=null&&a.statusText=="timeout"){Sys.Debug.trace("Timeout exception occurred")}this.RemoveModal()},SuggestedSearchResult:function(b){if(b.d!=null){var a=b.d;if(a.SearchTerm==this._lastSearchTerm){Sys.Debug.trace("Recieved and showing html for "+a.SearchTerm);this.AddModal();this._jSuggestResultPlaceholder.html(a.Html);this._jSuggestResultPlaceholder.show()}else{this.RemoveModal();Sys.Debug.trace("Ignoring recieved html for "+a.SearchTerm+" because "+this._lastSearchTerm+" was the latest search request")}}else{this.RemoveModal()}},PositionPopUp:function(){this._jComponentDialog.position({my:"left top",at:"left top",of:this._jComponentPlaceholder})},CloseSuggested:function(){this.RemoveModal();this._jSuggestedInput.text("");this._jSuggestedInput.attr("value",this._jSuggestedInput.attr("defaultValue"));this._jSuggestedInput.addClass("default");this._jSuggestedInput.blur()},RemoveModal:function(){var a=this.GetCursorPosition(this._jSuggestedInput);this._jComponentDialog.dialog("close");this._jComponentDialog.dialog("option","modal",false);this._jComponentDialog.dialog("open");this.SetCursorToPosition(this._jSuggestedInput,a);this._jSuggestResultPlaceholder.empty();this._jSuggestResultPlaceholder.hide();jQuery(".ui-widget-overlay").unbind("click");this.PositionPopUp()},AddModal:function(){var a=this.GetCursorPosition(this._jSuggestedInput);this._jComponentDialog.dialog("close");this._jComponentDialog.dialog("option","modal",true);this._jComponentDialog.dialog("open");this.SetCursorToPosition(this._jSuggestedInput,a);jQuery(".ui-widget-overlay").live("click",this.CloseSuggestedDelegate);this.PositionPopUp()},WindowResized:function(){this.PositionPopUp()},SetRequestHeader:function(a){a.setRequestHeader("CultureInfoName",this._cultureInfoName)},SetCursorToPosition:function(c,a){var d=c.get(0);var e=a;if(d.setSelectionRange){d.focus();d.setSelectionRange(e,e)}else{if(d.createTextRange){var b=d.createTextRange();b.collapse(true);b.moveEnd("character",e);b.moveStart("character",e);b.select()}}},GetCursorPosition:function(b){var d=b.get(0);var a=0;if(document.selection){d.focus();var c=document.selection.createRange();c.moveStart("character",-d.value.length);a=c.text.length}else{if(d.selectionStart||d.selectionStart=="0"){a=d.selectionStart}}return(a)}};Ecom.SuggestedSearchControl.registerClass("Ecom.SuggestedSearchControl",Sys.UI.Control);jQuery(document).ready(function(){try{jQuery(".suggested-search-selector").each(function(){$create(Ecom.SuggestedSearchControl,null,null,null,this)})}catch(a){Sys.Debug.trace("Unhandled exception initializing SuggestedSearchControl. "+a)}});Ecom.Selligent=function(a){Ecom.Selligent.initializeBase(this,[a]);this._jsonData="";this._initialLoggingData=""};Ecom.Selligent.prototype.initialize=function(){Ecom.Selligent.callBaseMethod(this,"initialize");var jsonData="("+this._jsonData+")";this._initialLoggingData=eval(jsonData);this.logPageVisit()};Ecom.Selligent.prototype.logPageVisit=function(){ma_track(this._initialLoggingData.HashCode,this._initialLoggingData.Source,this._initialLoggingData.PageName,this._initialLoggingData.ChannelCode)};Ecom.Selligent.registerClass("Ecom.Selligent",Sys.UI.Control);jQuery(document).ready(function(){try{var a=jQuery("#initialSelligentLoggingData").val();if(a!=null){ma_mode="A";$create(Ecom.Selligent,{_jsonData:a},null,null,this)}}catch(b){Sys.Debug.trace("unhandled exception initializing selligent tagging control")}});Type.registerNamespace("Ecom.Personalization");Ecom.PersonalizationMenu=function(a){Ecom.PersonalizationMenu.initializeBase(this,[a]);this.GetProductPackageParametersForSelectedCountryDelegate=Function.createDelegate(this,this.GetProductPackageParametersForSelectedCountry);this.PrepareDataDelegate=Function.createDelegate(this,this.PrepareData);this.ShowPersonalDataPanelDelegate=Function.createDelegate(this,this.ShowPersonalDataPanel);this.ShowPasswordPanelDelegate=Function.createDelegate(this,this.ShowPasswordPanel);this.ShowNewsletterPanelDelegate=Function.createDelegate(this,this.ShowNewsletterPanel);this.LogoutDelegate=Function.createDelegate(this,this.Logout);this.MappingCreator=null;this.Mode="Watched";this.SelectedCountry=null;this.LoginName=null;this.OnPartialUpdateCompletedDelegate=Function.createDelegate(this,this.OnPartialUpdateCompleted);this.RegisterEventHandler("countries","click",true,ThomasCook.Ecom.Web.Personalization.ShowStoredLister,this.OnPartialUpdateCompletedDelegate,this.PrepareDataDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);this.RegisterEventHandler("watched","click",true,ThomasCook.Ecom.Web.Personalization.ShowStoredLister,this.OnPartialUpdateCompletedDelegate,this.PrepareDataDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);this.RegisterEventHandler("accountChangepersonaldata","click",true,this.ShowPersonalDataPanelDelegate,this.OnPartialUpdateCompletedDelegate,this.PrepareDataDelegate,null,null);this.RegisterEventHandler("accountChangepassword","click",true,this.ShowPasswordPanelDelegate,this.OnPartialUpdateCompletedDelegate,this.PrepareDataDelegate,null,null);this.RegisterEventHandler("accountLogout","click",true,this.LogoutDelegate,null,null,null,null);this.RegisterEventHandler("showNewsletter","click",true,this.ShowNewsletterPanelDelegate,this.OnPartialUpdateCompletedDelegate,this.PrepareDataDelegate,null,null);$addHandler(a,"click",this.OnClickDelegate)};Ecom.PersonalizationMenu.prototype={initialize:function(){if(this.MappingCreator!=null){this.Mapping=this.MappingCreator()}var a=$get("watched");if(a!=null){this.ToggleSelectedMenuItem(a)}},Refresh:function(){var a=this.PrepareData();ThomasCook.Ecom.Web.Personalization.ShowPersonalizationMenu(null,null,a,this.OnPartialUpdateCompletedDelegate,this.MethodTimeoutDelegate,null)},OnComponentClick:function(){},Logout:function(){var a=$find("header");if(a!=null){a.DoLogout()}},SyncNewsLetterUrl:function(){var f=$get("loginheaderSendEmail");if(f!=null){var a=$get("subscribeForNewsletterUrl").getAttribute("value");if(a!=null){var e=$get("loginreg_email");if(e!=null){var b=decodeURIComponent(a)+e.value;var c=$get("newsletteriframe");if(c!=null){var d=c.getAttribute("src");if(d!=b){c.setAttribute("src",b)}}}}}},SwitchRegistrationMode:function(f,h,j,k,b,m,g){var a=$get(h);if(a!=null){var d=a.getAttribute("loginrequired");if(d!=null&&d=="True"){var e=$find("loginpopupcomponentmodaldialog");if(e!=null){var c=$get("loginname");c.value=this.LoginName;e.Show();jQuery("#"+e.get_id()+" input:first").focus()}}else{var l=$find("loginregistrationcomponentpanel");if(l!=null){l.SwitchRegistrationMode(f)}this.ToggleSelectedMenuItem(a);this.Mode=a.getAttribute("mode");ThomasCook.Ecom.Web.Personalization.ShowStoredLister(h,j,k,b,m,g);this.SyncNewsLetterUrl()}}},ShowPersonalDataPanel:function(f,e,b,c,a,d){this.SwitchRegistrationMode("updateMode",f,e,b,c,a,d)},ShowPasswordPanel:function(f,e,b,c,a,d){this.SwitchRegistrationMode("passwordChangeMode",f,e,b,c,a,d)},ShowNewsletterPanel:function(f,e,b,c,a,d){this.SwitchRegistrationMode("newsletterChangeMode",f,e,b,c,a,d)},PrepareData:function(c){hide("loginregistrationcomponentpanel");var a=new ThomasCook.Ecom.Core.PageComponents.ContextObject.Personalization.PassportPageInput();if(c!=null&&c.target.id!=null){var d=$get(c.target.id)}var b=d;while(b!=null){if(b.getAttribute("mode")!=null){break}b=b.parentNode}if(b!=null){this.SelectedCountry=b.getAttribute("country");a.SelectedCountry=this.SelectedCountry;this.Mode=b.getAttribute("mode");a.SelectedMode=this.Mode;this.ToggleSelectedMenuItem(b);if(this.Mode=="Stored"){a.PackagesToShow=this.GetProductPackageParametersForSelectedCountry()}}return a},ToggleSelectedMenuItem:function(h){var g=["sectionWatched","sectionStored","sectionNewsletter","sectionAccount"];for(var e=0;e<g.length;e++){var d=$get(g[e]);if(d!=null&&d.childNodes!=null){var c=d.childNodes;for(var b=0;b<c.length;b++){var f=c[b];try{Sys.UI.DomElement.removeCssClass(f,"selected")}catch(a){}}}}Sys.UI.DomElement.addCssClass(h,"selected")},GetProductPackageParametersForSelectedCountry:function(){for(key in this.Mapping){if(key==this.SelectedCountry){return this.Mapping[key]}}return null},OnPartialUpdateCompleted:function(d,c,a){this.DoPartialUpdate(d.divUpdates);this.Wait(c,false);var e=$find("storedListerComponentMain");var b=$get("storedListerComponentMain");e.HookChildSelects(b);if(d.countryMapping!=null){this.Mapping=d.countryMapping;this.Mode=d.Mode;this.SelectedCountry=d.country}}};Ecom.PersonalizationMenu.registerClass("Ecom.PersonalizationMenu",Ecom.UpdaterWithWaitHeader);jQuery(document).ready(function(){try{jQuery("#personalizationMenuComponentMain").each(function(){var c=jQuery("#personalizationMenuComponentMain");var b=c.find('input[name="name-data-selector"]').first();$create(Ecom.PersonalizationMenu,{MappingCreator:function(){var d=c.find('input[name="countries-data-selector"]').first();var e=Sys.Serialization.JavaScriptSerializer.deserialize(d.val());return e},LoginName:b.val()},null,null,$get("personalizationMenuComponentMain"))})}catch(a){Sys.Debug.trace("unhandled exception initializing personalisation menu control")}});Ecom.StoredLister=function(a){Ecom.StoredLister.initializeBase(this,[a]);this.OnComponentClickDelegate=Function.createDelegate(this,this.OnComponentClick);this.OnPartialUpdateCompletedDelegate=Function.createDelegate(this,this.OnPartialUpdateCompleted);this.OnRemovingStoredItemDelegate=Function.createDelegate(this,this.OnRemovingStoredItem);this.GetStoredItemInfoDelegate=Function.createDelegate(this,this.GetStoredItemInfo);this.GoToDetailPageDelegate=Function.createDelegate(this,this.GoToDetailPage);this.OnStorePackageInProfileDelegate=Function.createDelegate(this,this.OnStorePackageInProfile);this.RememberSelectedItemDelegate=Function.createDelegate(this,this.RememberSelectedItem);this.LoginAndStorePackageDelegate=Function.createDelegate(this,this.LoginAndStorePackage);this.OnSelectionsComparedDelegate=Function.createDelegate(this,this.OnSelectionsCompared);this.GetSelectedItemsDelegate=Function.createDelegate(this,this.GetSelectedItems);this.GetRecentItemsInfoDelegate=Function.createDelegate(this,this.GetRecentItemsInfo);this.CompareDelegate=Function.createDelegate(this,this.Compare);this.InitializeJavaScriptElementsDelegate=Function.createDelegate(this,this.InitializeJavaScriptElements);this.RegisterEventHandler("removeStoredPackage","click",true,this.OnRemovingStoredItemDelegate,this.OnPartialUpdateCompletedDelegate,this.GetStoredItemInfoDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);this.RegisterEventHandler("storedListerItem","click",true,this.GoToDetailPageDelegate,null,null,null,null);this.RegisterEventHandler("storedListerSortBy","change",false,ThomasCook.Ecom.Web.Personalization.ShowStoredLister,this.OnPartialUpdateCompletedDelegate,this.GetStoredItemInfoDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);this.RegisterEventHandler("pagerSort","change",false,ThomasCook.Ecom.Web.Personalization.ShowRecentItems,this.OnPartialUpdateCompletedDelegate,this.GetRecentItemsInfoDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);this.RegisterEventHandler("pagerSize","change",false,ThomasCook.Ecom.Web.Personalization.ShowRecentItems,this.OnPartialUpdateCompletedDelegate,this.GetRecentItemsInfoDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);this.RegisterEventHandler("pagerNext","click",false,ThomasCook.Ecom.Web.Personalization.ShowRecentItems,this.OnPartialUpdateCompletedDelegate,this.GetRecentItemsInfoDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);this.RegisterEventHandler("pagerPrevious","click",false,ThomasCook.Ecom.Web.Personalization.ShowRecentItems,this.OnPartialUpdateCompletedDelegate,this.GetRecentItemsInfoDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);this.RegisterEventHandler("pagerDirectLink","click",false,ThomasCook.Ecom.Web.Personalization.ShowRecentItems,this.OnPartialUpdateCompletedDelegate,this.GetRecentItemsInfoDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);this.RegisterEventHandler("addStoredPackage","click",true,this.LoginAndStorePackageDelegate,this.OnStorePackageInProfileDelegate,this.RememberSelectedItemDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);this.RegisterEventHandler("compareitem","click",true,this.CompareDelegate,this.OnSelectionsComparedDelegate,this.GetSelectedItemsDelegate,this.ShowHeaderWaitPanelDelegate,this.HideHeaderWaitPanelDelegate);$addHandler(a,"click",this.OnClickDelegate);$addHandler(a,"mouseover",this.OnMouseOverDelegate);$addHandler(a,"mouseout",this.OnMouseOutDelegate);Sys.Application.add_load(this.InitializeJavaScriptElements);this.HookChildSelects(a)};Ecom.StoredLister.prototype={initialize:function(){Ecom.StoredLister.callBaseMethod(this,"initialize")},Compare:function(h,f,e,c,a,d){var b=null;if((e==null)||(e.length<2)){b="CompareEmptySelection"}if(e.length>3){b="CompareMaximumExceeded"}if(b!=null){var g=$find("header");if(g!=null){g.ShowError(b)}this.Wait(d,false);return}else{ThomasCook.Ecom.Web.Personalization.ShowComparison(h,f,e,c,a,d)}},InitializeJavaScriptElements:function(){jQuery("#storedListerComponentMain .lister-item span[id^='ComparerHelp_']").bubble("#compareToolHelp",false,false);jQuery(".price-example-tooltip").each(function(){var item=jQuery(this);var listerItem=item.closest(".lister-item");item.tooltip({tip:"#priceExampleTooltip",position:"bottom left",offset:[-69,-2],onBeforeShow:function(){var departureDate=jQuery(listerItem).find(".included-in-price .departure-date").text(),airport=jQuery(listerItem).find(".included-in-price .airport .location").text(),durationAndboardType=jQuery(listerItem).find(".included-in-price .duration-and-boardtype").text(),roomType=jQuery(listerItem).find(".price-details .additional-info .room-type").text(),tooltipInfo=eval("("+jQuery(listerItem).find(".jqPriceExampleTooltipInfo").val()+")"),combinedInfo="";if(tooltipInfo!=null){if(tooltipInfo.ShowReferencePrice){this.getTip().removeClass("no-reference-price").find(".tooltip-price-old").show().text(tooltipInfo.OldPrice)}else{this.getTip().addClass("no-reference-price").find(".tooltip-price-old").hide()}this.getTip().find("#tooltip-content-price").show().parent().find("#tooltip-content-no-price").hide();if(tooltipInfo.ShowRoundedPrice){this.getTip().find(".tooltip-price-large").text(tooltipInfo.RoundedPrice)}else{if(tooltipInfo.ExactPrice!=""){this.getTip().find(".tooltip-price-large").text(tooltipInfo.ExactPrice).parent().find(".tooltip-price-small").text(tooltipInfo.DecimalPart)}else{this.getTip().find("#tooltip-content-no-price").show().parent().find("#tooltip-content-price").hide()}}if(departureDate!=""){combinedInfo+=departureDate+"<br />"}if(airport!=""){combinedInfo+=airport+"<br />"}if(roomType!=""){combinedInfo+=roomType+"<br />"}if(durationAndboardType!=""){combinedInfo+='<span class="duration-and-boardtype">'+durationAndboardType+"</span>"}this.getTip().find(".tooltip-last-item").show().html(combinedInfo)}}})})},GetSelectedItems:function(h){var a=document.getElementsByTagName("input");var e=new Array();var d=0;var g="compareitemcheckbox_";var f=g.length;for(i=0;i<a.length;i++){var c=a[i];if(c.type=="checkbox"){if(c.checked){if(c.id.startsWith(g)){var b=c.id.substring(f);e[d]=parseInt(b,10);d++}}}}return e},OnSelectionsCompared:function(d,c,b){this.DoPartialUpdate(d.divUpdates);this.Wait(c,false);var a=$find("comparepopupmodaldialog");if(a!=null){a.Show()}},RememberSelectedItem:function(d){if(d==null){return null}var c=d.target;if(c==null){return null}var e=c.id;if(e==null){return null}var b=e.indexOf("_");if(b>=0){var a=e.substring(b+1);this.LastSelectedItem=a}return null},LoginAndStorePackage:function(a,h,c,b,j,g){var d=$find("header");if(d!=null){if(!d.IsLoggedIn()){var f=$find("loginpopupcomponentmain");if(f!=null){f.RememberProductToStore(a,h,c,b,j,g)}var e=$find("loginpopupcomponentmodaldialog");if(e!=null){if((g!=null)&&(g.wait!=null)&&(g.wait.hidewaitmethod!=null)){g.wait.hidewaitmethod()}e.Show()}}else{ThomasCook.Ecom.Web.Personalization.StorePackageInProfile(a,h,c,b,j,g)}}},OnStorePackageInProfile:function(a,c,b){this.Wait(c,false);if(a=="Succeeded"){show("storedPackage_"+this.LastSelectedItem);hide("addStoredPackage_"+this.LastSelectedItem);var e=$find("personalizationMenuComponentMain");if(e!=null){e.Refresh("personalizationMenuComponentMain")}}else{var d=$find("header");if(d!=null){d.ShowError(a)}}},OnComponentClick:function(){},OnRemovingStoredItem:function(f,e,b,c,a,d){ThomasCook.Ecom.Web.Personalization.RemovePackageFromProfile(f,e,b,c,a,d)},OnPartialUpdateCompleted:function(c,b,a){this.DoPartialUpdate(c.divUpdates);this.Wait(b,false);if(c.countryMapping!=null){var d=$find("personalizationMenuComponentMain");if(d!=null){d.Mapping=c.countryMapping;d.Mode=c.mode;d.SelectedCountry=c.country}}this.InitializeJavaScriptElements()},UpdatePageNumberFromId:function(c,a){if(c.startsWith("pagerDirectLink")){var b=c.split("_");if((b!=null)&&(b.length>=2)){a.PageNumber=parseInt(b[1],10)}}},GetRecentItemsInfo:function(h){var b=new ThomasCook.Ecom.Core.PageComponents.ContextObject.Personalization.PassportPageInput();b.SelectedMode="Watched";b.SelectedCountry=null;b.PageNumber=1;var g=document.getElementsByTagName("select");if(g!=null){var d=0;for(d=0;d<g.length;d++){var f=g[d];if(f!=null){if(f.id.startsWith("pagerSort")){b.SortDirection=f.value}if(f.id.startsWith("pagerSize")){b.ViewSize=f.value}}}}var c=document.getElementsByTagName("span");if(c!=null){for(d=0;d<c.length;d++){var e=c[d];if(e!=null){if(e.className.indexOf("selected-page")>=0){this.UpdatePageNumberFromId(e.id,b)}}}}var a=h.target.id;this.UpdatePageNumberFromId(a,b);if(a.indexOf("pagerPrevious")>=0){b.PageNumber-=1}if(a.indexOf("pagerNext")>=0){b.PageNumber+=1}if(a.indexOf("pagerSize")>=0){b.ViewSize=h.target.value}if(a.indexOf("pagerSort")>=0){b.SortDirection=h.target.value}return b},GetStoredItemInfo:function(){var a=new ThomasCook.Ecom.Core.PageComponents.ContextObject.Personalization.PassportPageInput();var c=$find("personalizationMenuComponentMain");if(c!=null){a.SelectedMode=c.Mode;a.SelectedCountry=c.SelectedCountry}var b=$get("storedListerSortBy");if(b!=null){a.SortDirection=b.value}if(a.SelectedMode=="Stored"){a.PackagesToShow=c.GetProductPackageParametersForSelectedCountry()}return a},GoToDetailPage:function(e){var d=e.split("_");if(d.length>1){var a="storedListerItemSelect_"+d[1];var c=$get(a);if(c!=null){var b=c.getAttribute("href");if(b!=null&&b!=""){document.location.href=b}}}}};Ecom.StoredLister.registerClass("Ecom.StoredLister",Ecom.UpdaterWithWaitHeader);jQuery(document).ready(function(){try{jQuery("#storedListerComponentMain").each(function(){var c=$get("storedListerComponentMain");if(c!=null){$create(Ecom.StoredLister,null,null,null,c)}var d=$get("comparecomponentmain");if(d!=null){$create(Ecom.Personalization.PackageComparer,null,null,null,d)}var b=$get("comparepopupmodaldialog");if(b!=null){$create(Ecom.ModalDialog,{toBeDisabledId:"VisibleContentHolder",toCloseId:"toCloseCompare",width:800,height:600},null,null,b)}})}catch(a){Sys.Debug.trace("unhandled exception initializing stored lister control")}});Ecom.Personalization.LoginHeader=function(a){this.isLoggedIn=false;this.unexpectedErrorPopup=null;this.maxLimitReachedErrorPopup=null;this.compareMaximumExceededErrorPopup=null;this.compareEmptySelectionErrorPopup=null;this.languageSwitcherBaseUrl=new Object();Ecom.Personalization.LoginHeader.initializeBase(this,[a]);this.DoLoginDelegate=Function.createDelegate(this,this.DoLogin);this.RegisterEventHandler("login","click",true,this.DoLoginDelegate,null,null,null,null);this.DoLogoutDelegate=Function.createDelegate(this,this.DoLogout);this.RegisterEventHandler("logout","click",true,this.DoLogoutDelegate,null,null,null,null);this.SubmitEmailAddressDelegate=Function.createDelegate(this,this.SubmitEmailAddress);this.RegisterEventHandler("loginheaderSendEmail","click",true,this.SubmitEmailAddressDelegate,null,null,null,null);this.OnSwitchLanguageDelegate=Function.createDelegate(this,this.OnSwitchLanguage);this.RegisterEventHandler("langswitcher","click",true,this.OnSwitchLanguageDelegate,null,null,null,null);this.OnEnterEmailDelegate=Function.createDelegate(this,this.OnEnterEmail);this.LoginCompletedCallbackDelegate=Function.createDelegate(this,this.LoginCompletedCallback);this.LogoutCompletedCallbackDelegate=Function.createDelegate(this,this.LogoutCompletedCallback);this.OnloadDelegate=Function.createDelegate(this,this.Onload);this.OnShowLoginStatusCompletedDelegate=Function.createDelegate(this,this.OnShowLoginStatusCompleted);$addHandler(a,"click",this.OnClickDelegate)};Ecom.Personalization.LoginHeader.prototype={initialize:function(){this.OnloadDelegate();var a=$get("loginheaderEmail");if(a!=null){$addHandler(a,"keypress",this.OnEnterEmailDelegate)}},OnComponentClick:function(){},ShowError:function(a){if(a=="UnexpectedError"){if(this.unexpectedErrorPopup==null){this.unexpectedErrorPopup=new Ecom.UI.ModalBox("#UnexpectedError",{dialogClass:"message-box personalization",width:360})}this.unexpectedErrorPopup.show()}else{if(a=="MaxLimitReached"){if(this.maxLimitReachedErrorPopup==null){this.maxLimitReachedErrorPopup=new Ecom.UI.ModalBox("#MaxLimitReached",{dialogClass:"message-box personalization",width:360})}this.maxLimitReachedErrorPopup.show()}else{if(a=="CompareMaximumExceeded"){if(this.compareMaximumExceededErrorPopup==null){this.compareMaximumExceededErrorPopup=new Ecom.UI.ModalBox("#CompareMaximumExceeded",{dialogClass:"message-box personalization",width:360})}this.compareMaximumExceededErrorPopup.show()}else{if(a=="CompareEmptySelection"){if(this.compareEmptySelectionErrorPopup==null){this.compareEmptySelectionErrorPopup=new Ecom.UI.ModalBox("#CompareEmptySelection",{dialogClass:"message-box personalization",width:360})}this.compareEmptySelectionErrorPopup.show()}}}}},DoLogin:function(){var a=$find("loginpopupcomponentmodaldialog");if(a!=null){a.Show();jQuery("#"+a.get_id()+" input:first").focus()}},DoLogout:function(){Sys.Services.AuthenticationService.logout("/",this.LogoutCompletedCallbackDelegate,null,null)},LoginCompletedCallback:function(){location.reload(true)},LogoutCompletedCallback:function(){},OnEnterEmail:function(b){var a=b.charCode;if(a!=null&&a==13){this.SubmitEmailAddress()}},SubmitEmailAddress:function(){var c=$get("loginheaderSendEmail");var b=$get("subscribeForNewsletterUrl");var f=$get("subscribeForNewsletterRedirectUrl");var e=$get("loginheaderEmail");if(c!=null&&e!=null&&e.value!=""&&(f!=null||b!=null)){if(e.value!=""&&e.value!=e.defaultValue){var d="";var a=false;if(f!=null&&f.value!=""){d=f.getAttribute("value");a=true}else{d=b.getAttribute("value")}d=decodeURIComponent(d);if(a){document.location.href=d+e.value}else{window.open(d+e.value,"Popup","")}}}},OnSwitchLanguage:function(c){var b=$get(c);if(b!=null){var a=decodeURIComponent(b.getAttribute("url"));window.location=a}},Onload:function(){var b=$get("viewedHolidaysComponent");var a=(b!=null);ThomasCook.Ecom.Web.Personalization.GetLoginStatus(a,this.OnShowLoginStatusCompletedDelegate,null,null)},SetLoginStatus:function(a){this.isLoggedIn=false;if(a){this.isLoggedIn=true;show("logout");show("myPassportButton");hide("login");hide("login_myPassportButton")}else{hide("logout");hide("myPassportButton");show("login");show("login_myPassportButton")}},OnShowLoginStatusCompleted:function(a,d,c){if(a!=null&&a.IsLoggedIn==true){this.SetLoginStatus(true)}else{this.SetLoginStatus(false)}var e=$get("loginViewedItemsCount");if(a!=null&&e!=null){e.innerHTML=a.ViewedItemsCount}var b=$get("viewedHolidaysComponent");if(a!=null&&b!=null&&a.ViewedItemsHtml!=null){b.innerHTML=a.ViewedItemsHtml}if(!this.isLoggedIn){if(document.location.hash=="#ShowLogin"){this.DoLogin()}}},IsLoggedIn:function(){return this.isLoggedIn},UpdateLanguageSwitchers:function(d){var b=jQuery(".lang-switcher");if(b.length>0){for(var f in d){var e=b.find(".jslink."+f);if(e.length>0){var c=this.languageSwitcherBaseUrl[f]+d[f];e[0].title=c}var a=b.find(".lslink."+f);if(a.length>0){var c=this.languageSwitcherBaseUrl[f]+d[f];a[0].href=c}}}}};Ecom.Personalization.LoginHeader.registerClass("Ecom.Personalization.LoginHeader",Ecom.ControlBase);jQuery(document).ready(function(){try{jQuery("#header").each(function(){var header=jQuery(this);if(header!=null){var isLoggedIn=header.attr("data-loggedin");var languageBaseUrl=header.attr("data-lsbaseurl");var languageBaseDictionary=eval("("+languageBaseUrl+")");var currentHeader=$get("header");var headerComponent=$create(Ecom.Personalization.LoginHeader,{isLoggedIn:isLoggedIn,languageSwitcherBaseUrl:languageBaseDictionary},null,null,currentHeader)}})}catch(ex){Sys.Debug.trace("Unexpected error initializing header")}});Ecom.Personalization.LoginPopup=function(a){Ecom.Personalization.LoginPopup.initializeBase(this,[a]);this.LoginCompletedCallbackDelegate=Function.createDelegate(this,this.LoginCompletedCallback);this.OnEnterLoginDelegate=Function.createDelegate(this,this.OnEnterLogin);this.DoLoginDelegate=Function.createDelegate(this,this.DoLogin);this.RegisterEventHandler("loginpopupLogin","click",true,this.DoLoginDelegate,null,null,null,null);this.CancelLoginDelegate=Function.createDelegate(this,this.CancelLogin);this.RegisterEventHandler("loginpopupCancel","click",true,this.CancelLoginDelegate,null,null,null,null);this.ForgotPasswordShowDelegate=Function.createDelegate(this,this.ForgotPasswordShow);this.RegisterEventHandler("loginpopupForgotPassword","click",true,this.ForgotPasswordShowDelegate,null,null,null,null);this.ForgotPasswordSendDelegate=Function.createDelegate(this,this.ForgotPasswordSend);this.RegisterEventHandler("passwordforgotSend","click",true,this.ForgotPasswordSendDelegate,null,null,null,null);this.ForgotPasswordResponseDelegate=Function.createDelegate(this,this.ForgotPasswordResponse);$addHandler(a,"click",this.OnClickDelegate);$addHandler(a,"keypress",this.OnEnterLoginDelegate)};Ecom.Personalization.LoginPopup.prototype={initialize:function(){},ForgotPasswordShow:function(){var b=$find("passwordforgotcomponentmodaldialog");if(b!=null){this.ForgotPasswordReset();b.Show()}var a=$find("loginpopupcomponentmodaldialog");if(a!=null){a.Close()}},ForgotPasswordSend:function(){var a=$get("passwordforgotemail");if(a!=null){var c="^([a-zA-Z0-9_\\.\\-])+\\@(?:[a-zA-Z0-9\\-]+\\.)+([a-zA-Z0-9]{2,4})+$";var b=new RegExp(c);if(a.value==""||b.test(a.value)==false){show("passwordforgotvalidation");this.UpdateValidFieldIndicator(a,"invalid",false)}else{hide("passwordforgotvalidation");this.UpdateValidFieldIndicator(a,"invalid",true);ThomasCook.Ecom.Web.Personalization.ResendPassword(a.value,this.ForgotPasswordResponse,null,null)}}},ForgotPasswordResponse:function(a){var b=$find("passwordforgotcomponentmodaldialog");if(a){b.Close()}else{show("passwordforgotfailure")}},ForgotPasswordReset:function(){var a=$get("passwordforgotemail");if(a!=null){a.value="";hide("passwordforgotvalidation");hide("passwordforgotfailure");this.UpdateValidFieldIndicator(a,"invalid",true)}},OnEnterLogin:function(a){var b=a.charCode;if(b!=null&&b==13){this.DoLogin()}},OnComponentClick:function(){},RememberProductToStore:function(g,d,f,b,a,c){var e=new Object();e.div=g;e.eventtype=d;e.dummy=f;e.successdelegate=b;e.failuredelegate=a;e.waitSpecificationInstance=c;this.favouriteToStore=e},LoginCompletedCallback:function(e){if(e){if(this.favouriteToStore!=null){var c=$find("loginpopupcomponentmodaldialog");if(c!=null){c.Close()}var f=$find("header");if(f!=null){f.SetLoginStatus(true)}var d=this.favouriteToStore;this.favouriteToStore=null;ThomasCook.Ecom.Web.Personalization.StorePackageInProfile(d.div,d.eventtype,d.dummy,d.successdelegate,d.failuredelegate,d.waitSpecificationInstance)}else{var b=$get("loginpopupLogin");if(b!=null){var a=decodeURIComponent(b.getAttribute("url"));if((a!=null)&&(a.length>0)){document.location.href=a}}}}else{show("loginfailure")}},DoLogin:function(){var b=$get("loginname");var a=$get("password");Sys.Services.AuthenticationService.login(b.value,a.value,false,null,null,this.LoginCompletedCallbackDelegate,null,null)},CancelLogin:function(){hide("loginfailure");var a=$find("loginpopupcomponentmodaldialog");if(a!=null){a.Close()}}};Ecom.Personalization.LoginPopup.registerClass("Ecom.Personalization.LoginPopup",Ecom.ControlBase);jQuery(document).ready(function(){try{var b=$get("loginpopupcomponentmain");if(b!=null){$create(Ecom.Personalization.LoginPopup,null,null,null,b)}var a=$get("loginpopupcomponentmodaldialog");if(a!=null){$create(Ecom.ModalDialog,{toBeDisabledId:"VisibleContentHolder",overlayPlaceHolderId:"loginHeaderOverlayPlaceHolder",toCloseId:"loginpopupCancel",fullScreen:true,width:360,height:390,modalTopMargin:155,initialFocusId:"loginname"},null,null,a)}var d=$get("passwordforgotcomponentmodaldialog");if(d!=null){$create(Ecom.ModalDialog,{toBeDisabledId:"VisibleContentHolder",overlayPlaceHolderId:"loginHeaderOverlayPlaceHolder",toCloseId:"passwordforgotCancel",fullScreen:true,width:360,height:390,modalTopMargin:155,initialFocusId:"passwordforgotemail"},null,null,d)}}catch(c){Sys.Debug.trace("Unexpected error initializing login popup")}});Ecom.Personalization.LoginRegistration=function(a){Ecom.Personalization.LoginRegistration.initializeBase(this,[a]);this.OnRegisteredDelegate=Function.createDelegate(this,this.OnRegistered);this.OnCancelDelegate=Function.createDelegate(this,this.OnCancel);this.OnTryRegisterDelegate=Function.createDelegate(this,this.OnTryRegister);this.TryChangePasswordDelegate=Function.createDelegate(this,this.TryChangePassword);this.OnPasswordChangedDelegate=Function.createDelegate(this,this.OnPasswordChanged);this.OnTryUpdateDelegate=Function.createDelegate(this,this.OnTryUpdate);this.OnUpdatedDelegate=Function.createDelegate(this,this.OnUpdated);this.AgreeWithNewslettersDelegate=Function.createDelegate(this,this.AgreeWithNewsletters);this.RegisterEventHandler("loginregNewsletterPref","click",false,this.AgreeWithNewslettersDelegate,null,null,null,null);this.OnEnteredEmailAddressDelegate=Function.createDelegate(this,this.OnEnteredEmailAddress);this.OnEnteredLastNameDelegate=Function.createDelegate(this,this.OnEnteredLastName);this.OnEnteredFirstNameDelegate=Function.createDelegate(this,this.OnEnteredFirstName);this.OnPasswordEnteredDelegate=Function.createDelegate(this,this.OnPasswordEntered);this.OnPasswordConfirmationEnteredDelegate=Function.createDelegate(this,this.OnPasswordConfirmationEntered);this.OnGenderSelectedDelegate=Function.createDelegate(this,this.OnGenderSelected);this.RegisterEventHandler("loginregRegister","click",true,this.OnTryRegisterDelegate,this.OnRegisteredDelegate,null,null,null);this.RegisterEventHandler("loginregCancel","click",true,this.OnCancelDelegate,null,null,null,null);this.RegisterEventHandler("loginregSave","click",true,this.OnTryUpdateDelegate,this.OnUpdatedDelegate,null,null,null);this.RegisterEventHandler("loginregChangePassword","click",true,this.TryChangePasswordDelegate,this.OnPasswordChangedDelegate,null,null,null);this.field=$get("loginreg_email");$addHandler(this.field,"blur",this.OnEnteredEmailAddressDelegate);this.field=$get("loginreg_firstName");$addHandler(this.field,"blur",this.OnEnteredFirstNameDelegate);this.field=$get("loginreg_lastName");$addHandler(this.field,"blur",this.OnEnteredLastNameDelegate);this.field=$get("loginreg_password");$addHandler(this.field,"blur",this.OnPasswordEnteredDelegate);this.field=$get("loginreg_passwordRepeat");$addHandler(this.field,"blur",this.OnPasswordConfirmationEnteredDelegate);this.field=$get("loginreg_gender");$addHandler(this.field,"blur",this.OnGenderSelectedDelegate);$addHandler(a,"click",this.OnClickDelegate)};Ecom.Personalization.LoginRegistration.prototype={initialize:function(){},SwitchRegistrationMode:function(b){hideAll("errorContainer");hideAll("passwordchangeerror");hideAll("updateerror");show("loginregistrationcomponentpanel");var a=$get("loginregistrationcomponentmode");if(a!=null){Sys.UI.DomElement.removeCssClass(a,"newsletterChangeMode");Sys.UI.DomElement.removeCssClass(a,"registrationMode");Sys.UI.DomElement.removeCssClass(a,"passwordChangeMode");Sys.UI.DomElement.removeCssClass(a,"updateMode");Sys.UI.DomElement.addCssClass(a,b)}hide("registrationpassword");show("registrationpassword")},OnComponentClick:function(){},AgreeWithNewsletters:function(){var a=$get("loginregNewsletterPref");if(a!=null){if(a.checked){show("loginregNewsletterchoices")}else{hide("loginregNewsletterchoices")}}},OnPasswordChanged:function(a){if(a){hide("passwordchangefailed");show("passwordchangesucceeded")}else{hide("passwordchangesucceeded");show("passwordchangefailed")}},TryChangePassword:function(a,k,n,b,o,e){var g=true;var f="";var j=$get("loginreg_origpassword");var d=$get("loginreg_password");var h=$get("loginreg_passwordRepeat");var l=j.value;var m=d.value;this.UpdateMandatoryFieldIndicator(j,"invalid");this.UpdateMandatoryFieldIndicator(d,"invalid");this.UpdateMandatoryFieldIndicator(h,"invalid");if(l==""||m==""){g=false}if(d.value!=h.value){g=false;var c=$get("errorPassword");if(c!=null){f+=c.innerHTML+"\n"}}if(g==true){ThomasCook.Ecom.Web.Personalization.ChangePassword(m,l,b,o,e)}else{if(f!=""){alert(f)}}},OnTryUpdate:function $Ecom$Personalization$LoginRegistration$OnTryRegister(f,e,d,b,a,c){hide("updatesucceeded");this.OnTryUpdateOrRegister(f,e,d,b,a,c,true)},OnTryRegister:function $Ecom$Personalization$LoginRegistration$OnTryRegister(f,e,d,b,a,c){this.OnTryUpdateOrRegister(f,e,d,b,a,c,false)},OnTryUpdateOrRegister:function $Ecom$Personalization$LoginRegistration$OnTryRegister(l,d,h,r,e,g,k){var v=true;var t="";var n=new ThomasCook.Ecom.Core.Services.Personalization.SubscriberDetails();var f="loginreg";var a=$get(f+"_firstName");var p=$get(f+"_lastName");var o=$get(f+"_gender");this.UpdateMandatoryFieldIndicator(a,"invalid");this.UpdateMandatoryFieldIndicator(p,"invalid");this.UpdateMandatoryFieldIndicator(o,"invalid");var j=$find("loginregbirthdate");var c=$get("registrationErrors");if(null!=c){hideAll("registrationErrors")}if(null!=j){j.Validate()}if(a.value==""||p.value==""||o.value==""||!j.IsValidDate()){v=false}var w=$get("loginreg_email");this.UpdateMandatoryFieldIndicator(w,"invalid");var q="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?";if(w.value==""||w.value.toLowerCase().match(q)!=w.value.toLowerCase()){v=false;this.UpdateValidFieldIndicator(w,"invalid",false)}else{this.UpdateValidFieldIndicator(w,"invalid",true)}var u=$get("loginreg_password");var m=$get("loginreg_passwordRepeat");this.UpdateMandatoryFieldIndicator(u,"invalid");this.UpdateMandatoryFieldIndicator(m,"invalid");if(u.value!=m.value){v=false;var b=$get("errorPassword");if(b!=null){t+=b.innerHTML+"\n"}}if(v==true){n.firstName=a.value;n.middleName=$get(f+"_middleName").value;n.lastName=p.value;n.gender=o.value;n.email=$get(f+"_email").value;n.password=$get(f+"_password").value;n.year=$get(f+"birthdate_years").value;n.month=$get(f+"birthdate_months").value;n.day=$get(f+"birthdate_days").value;n.language=$get(f+"_language").value;if(k){ThomasCook.Ecom.Web.Personalization.UpdateRegistration(l,d,n,r,e,g)}else{ThomasCook.Ecom.Web.Personalization.Register(l,d,n,r,e,g)}}else{show("loginregErrorMessage");if(t!=""){alert(t)}}},OnEnteredEmailAddress:function(c){var b=$get("loginreg_email");this.UpdateMandatoryFieldIndicator(b,"invalid");var d="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?";var a=false;if(b.value==""||b.value.toLowerCase().match(d)!=b.value.toLowerCase()){a=true}this.UpdateInvalidValueIndicator(b,a,"invalid")},OnEnteredLastName:function(b){var a=$get("loginreg_lastName");this.UpdateMandatoryFieldIndicator(a,"invalid")},OnEnteredFirstName:function(b){var a=$get("loginreg_firstName");this.UpdateMandatoryFieldIndicator(a,"invalid")},OnPasswordEntered:function(b){var a=$get("loginreg_password");this.UpdateMandatoryFieldIndicator(a,"invalid")},OnPasswordConfirmationEntered:function(b){var a=$get("loginreg_password");var c=$get("loginreg_passwordRepeat");this.UpdateInvalidValueIndicator(c,(c.value==""||a.value!=c.value),"invalid")},OnGenderSelected:function(b){var a=$get("loginreg_gender");this.UpdateMandatoryFieldIndicator(a,"invalid")},OnRegistered:function(a){if(a=="Success"){this.Redirect("loginregRegister")}else{show(a)}},OnUpdated:function(a){if(a=="Success"){show("updatesucceeded")}else{show(a)}},OnCancel:function(){this.Redirect("loginregCancel")},Redirect:function(c){var b=$get(c);if(b!=null){var a=decodeURIComponent(b.getAttribute("url"));if((a!=null)&&(a.length>0)){document.location.href=a}}}};Ecom.Personalization.LoginRegistration.registerClass("Ecom.Personalization.LoginRegistration",Ecom.ControlBase);Ecom.Personalization.PackageComparer=function(a){Ecom.Personalization.PackageComparer.initializeBase(this,[a]);this.GoToDetailPageDelegate=Function.createDelegate(this,this.GoToDetailPage);this.RemoveFromCompareStateRetrieverDelegate=Function.createDelegate(this,this.RemoveFromCompareStateRetriever);this.OnRemoveFromCompareDelegate=Function.createDelegate(this,this.OnRemoveFromCompare);this.CloseDelegate=Function.createDelegate(this,this.Close);this.RegisterEventHandler("comparedStoredListerItem","click",true,this.GoToDetailPageDelegate,null,null,null,null);this.RegisterEventHandler("removeComparedStoredListerItem","click",true,ThomasCook.Ecom.Web.Personalization.ShowComparison,this.OnRemoveFromCompareDelegate,this.RemoveFromCompareStateRetrieverDelegate,null,null);this.RegisterEventHandler("comparedStoredListerClose","click",true,this.CloseDelegate,null,null,null,null);$addHandler(a,"click",this.OnClickDelegate)};Ecom.Personalization.PackageComparer.prototype={initialize:function(){},OnRemoveFromCompare:function(c,b,a){this.DoPartialUpdate(c.divUpdates);this.Wait(b,false)},RemoveFromCompareStateRetriever:function(d,b){var a=d.target.id;var f=a.indexOf("_");if(f>=0){var g=a.substring(f+1);var e=$get("compareitemcheckbox_"+g);if(e!=null){e.checked=false}}var c=$find("storedListerComponentMain");if(c!=null){return c.GetSelectedItems(d)}return null},Close:function(b){var a=$find("comparepopupmodaldialog");if(a!=null){a.Close()}},GoToDetailPage:function(e){var d=e.split("_");if(d.length>1){var a="comparedStoredListerItemSelect_"+d[1];var c=$get(a);if(c!=null){var b=c.getAttribute("href");if(b!=null&&b!=""){document.location.href=b}}}}};Ecom.Personalization.PackageComparer.registerClass("Ecom.Personalization.PackageComparer",Ecom.ControlBase);
