function Price(_1,_2){
this.Separator=",";
this.Currency=_1;
this.Amount=_2;
}
Price.prototype.GetValue=function(){
var _3="";
if(this.Amount<0){
_3="-&nbsp;";
}
return _3+this.GetCurrencySymbol()+" "+this.FormatAmount();
};
Price.prototype.GetTitleValue=function(){
var _4="";
if(this.Amount<0){
_4="-&nbsp;";
}
return _4+this.Currency+" "+this.FormatAmount();
};
Price.prototype.GetValueWithPositiveSign=function(){
return (this.Amount>0?"+&nbsp;":"")+this.GetValue();
};
Price.prototype.FormatAmount=function(){
var _5=Math.floor(this.Amount);
if(_5<0){
_5=_5*-1;
}
var _6=0;
if(_5>0){
_6=Math.round((this.Amount%_5)*100);
}
var _7=_6;
if(_6==0){
_7="00";
}
if(_6<=9){
_7="0"+_6;
}
return _5+this.Separator+_7;
};
Price.prototype.GetCurrencySymbol=function(){
switch(this.Currency){
case "EUR":
return "&euro;";
case "USD":
return "$";
case "YEN":
return "&yen;";
case "GBP":
return "&pound;";
case "THB":
return "&#3647;";
break;
}
return this.Currency;
};
function Session(){
this.AjaxObj=null;
this.Page=null;
this.Data=null;
}
Session.prototype.Init=function(){
if(session.Page==null||session.Page.Name==null){
return;
}
InitilizeDateTexts();
try{
Language.ErrorMessages.GetMessage();
}
catch(ex){
alert("Error while loading multilang texts...");
}
this.AjaxObj=new AjaxObject();
this.AjaxObj.HandleSuccess=this.OnLoaded.bind(this);
this.AjaxObj.HandleFailure=this.OnFailure.bind(this);
this.AjaxObj.HandleFailsafe=this.OnFailsafe.bind(this);
this.AjaxObj.FailsafeTimeout=null;
this.AjaxObj.Request("GET","AjaxFeeds/Session.aspx","json",true);
};
Session.prototype.UpdateAndSaveSession=function(){
this.SaveSession(true);
};
Session.prototype.SaveSession=function(_8){
var _9="";
try{
_9=DataHandler.GetSearchAndFilterParams(_8?_8:false);
}
catch(ex){
return;
}
var _a=new AjaxObject();
_a.HandleSuccess=function(){
};
_a.HandleFailure=function(){
};
_a.HandleFailsafe=function(){
};
_a.FailsafeTimeout=null;
_a.Request("POST","AjaxFeeds/SessionStorage.aspx","str",false,"searchType="+session.Page.Name+_9);
};
Session.prototype.OnLoaded=function(_b){
this.Data={};
var _c=false;
if($id("filterHolder")){
_c=true;
}
for(prop in _b){
if(_b[prop]!=null){
this.Data[prop]=_b[prop];
if(_b[prop]){
var _d=null;
_d=_b[prop];
if(_b[prop].getTime){
_d=_b[prop].getTime();
}
if(session.Page.Name=="destination"&&_c&&(prop=="DestinationCode"||prop=="DestinationName")){
this.Data[prop]=null;
_d=null;
}
}
}
}
var _e=BookmarkUtil.GetKey("CurrentPage");
if(_e&&_e.Value>1){
this.Data.CurrentPage=_e.Value;
}else{
this.Data.CurrentPage=1;
}
var _e=BookmarkUtil.GetKey("Order");
if(_e&&_e.Value){
this.Data.Order=_e.Value;
}
if(session.Page.Name=="destination"&&$id("travelTypeX")&&this.Data["TravelType"]){
$id("travelTypeX").value=this.Data["TravelType"];
}
if($id("order")){
if(this.Data.Order){
$id("order").value=this.Data.Order;
}
}
this.Page.Init();
this.Page.PrefillFields(this.Data);
session.SaveSession();
};
Session.prototype.OnFailsafe=function(){
ErrorHandler.Show(Language.ErrorMessages.GetMessage("SESSION_REQUEST_FAILED"));
};
Session.prototype.OnFailure=function(_f){
ErrorHandler.Show(Language.ErrorMessages.GetMessage("SESSION_REQUEST_FAILED"));
};
var session=new Session();
function Page(){
this.Name=null;
this.DataService=null;
this.DestinationField=null;
this.ValidationHandler=null;
}
Page.prototype.Init=function(){
if($IS_OPERA){
$(document.body).addClass("Opera");
}
if(typeof (DataHandler)!="undefined"){
DataHandler.Init();
}
if($("#destination").length>0){
this.DestinationField=new AutoCompletionField();
this.DestinationField.Id="destination";
this.DestinationField.ItemName="Value";
this.DestinationField.ItemCode="Code";
this.DestinationField.Source="AjaxFeeds/Locations.aspx";
this.DestinationField.Required=true;
this.DestinationField.ShowEmptyText=false;
if(this.Name=="destination"||this.Name=="home"){
this.DestinationField.Required=false;
this.DestinationField.ShowEmptyText=true;
}
this.DestinationField.Init();
}
if(session.Data.ComplexSearch!=null){
if(this.SwitchSearch){
this.SwitchSearch(session.Data.ComplexSearch);
}
}
if($("#searchHolder").length>0||$("#filterHolder").length>0){
this.AttachValidationHandler();
}
if(!Browser.Modern){
try{
var _10=document.getElementsByTagName("select");
for(var i=0;i<_10.length;i++){
try{
_10[i].onmousewheel=function(){
return false;
};
}
catch(e1){
}
}
}
catch(e2){
}
}
if($("#linkToggleContent").length>0){
var _12=$("#linkToggleContent").html(Language.Texts.GetText("CLOSE")).click(function(e){
ToggleContent(e);
});
}
if($(".activitiesHolder:first").length>0){
var _14=$(".activitiesHolder:first");
$(_14).children("dl:first").hide();
_14.append($("<a></a>").html(Language.Texts.GetText("MORE_ABOUT_ACTIVITIES")).attr({id:"togggleActivitiesHolder",href:"#"}).click(function(e){
ToggleLocationActivities(e);
}));
}
$(".extendedDescription").each(function(){
var _16=$(this);
_16.hide();
var _17=Language.Texts.GetText("RESULTS_READ_MORE");
if(_16.attr("title")!=""){
_17+=" "+Language.Texts.GetText("ABOUT").toLowerCase()+" "+_16.attr("title");
}
var _18=$("<a></a>").html(_17).attr({id:"togggleDescriptionHolder",href:"#",bak:Language.Texts.GetText("RESULTS_READ_LESS")}).bind("click",{},ToggleDescription).addClass("closed");
_18.insertAfter(_16);
});
};
Page.prototype.AttachValidationHandler=function(){
};
Page.prototype.PrefillFields=function(_19){
var _1a=null;
if($("#dateFrom").length>0&&_19.MinDepartureDate){
_1a=_19.MinDepartureDate;
if(!_19.MinDepartureDate.getTime){
_1a=new Date();
_1a.setTime(_19.MinDepartureDate);
}
$("#dateFrom").val(_1a.format("%dd-%mm-%yyyy"));
}
if($("#dateUntil").length>0&&_19.DateUntil){
_1a=_19.DateUntil;
if(!_19.DateUntil.getTime){
_1a=new Date();
_1a.setTime(_19.DateUntil);
}
$("#dateUntil").val(_1a.format("%dd-%mm-%yyyy"));
}
if($("#dateFrom2").length>0&&_19.MaxDepartureDate){
_1a=_19.MaxDepartureDate;
if(!_19.MaxDepartureDate.getTime){
_1a=new Date();
_1a.setTime(_19.MaxDepartureDate);
}
$("#dateFrom2").val(_1a.format("%dd-%mm-%yyyy"));
}
if($("#dateUntil2").length>0&&_19.DateUntil2){
_1a=_19.DateUntil2;
if(!_19.DateUntil2.getTime){
_1a=new Date();
_1a.setTime(_19.DateUntil2);
}
$("#dateUntil2").val(_1a.format("%dd-%mm-%yyyy"));
}
if($("#duration").length>0&&_19.Duration){
FormHandler.SelectBox.SetValue($id("duration"),_19.Duration);
}
if(this.DestinationField&&_19.DestinationCode&&_19.DestinationName){
this.DestinationField.SetSelection(_19.DestinationCode,_19.DestinationName);
}
if($("#origin").length>0&&_19.OriginCode){
$("#origin").val(_19.OriginCode);
}
if($("#cabinClass").length>0&&_19.CabinClass){
$("#cabinClass").val(_19.CabinClass);
}
if($("#nrOfAdults").length>0&&_19.NrOfAdults){
$("#nrOfAdults").val(_19.NrOfAdults);
}
if($("#nrOfChildren").length>0&&_19.NrOfChildren){
$("#nrOfChildren").val(_19.NrOfChildren);
}
if($("#nrOfBabies").length>0&&_19.NrOfBabies){
$("#nrOfBabies").val(_19.NrOfBabies);
}
if($("#nrOfSeniors").length>0&&_19.NrOfSeniors){
$("#nrOfSeniors").val(_19.NrOfSeniors);
}
if($("#nrOfRooms").length>0&&_19.NrOfRooms){
$("#nrOfRooms").val(_19.NrOfRooms);
}
if($("#nrOfTrav").length>0){
var _1b="";
if(_19.NrOfSeniors&&_19.NrOfSeniors>0){
_1b+=_19.NrOfSeniors+" "+Language.Texts.GetText("PERS_AGE_CAT_SENIOR_SHORT")+".";
}
if(_19.NrOfAdults&&_19.NrOfAdults>0){
_1b+=_19.NrOfAdults+" "+Language.Texts.GetText("PERS_AGE_CAT_ADULT_SHORT")+".";
}
if(_19.NrOfChildren&&_19.NrOfChildren>0){
_1b+=_19.NrOfChildren+" "+Language.Texts.GetText("PERS_AGE_CAT_CHILD_SHORT")+".";
}
if(_19.NrOfBabies&&_19.NrOfBabies>0){
_1b+=_19.NrOfBabies+" "+(_19.NrOfBabies>1?Language.Texts.GetText("PERS_AGE_CAT_BABY"):Language.Texts.GetText("PERS_AGE_CAT_BABY_MULT"));
}
$("#nrOfTrav").html(_1b);
}
if($("#classRoomInfo").length>0&&_19.CabinClass){
var _1b="";
if(_19.CabinClass=="E"){
_1b+=Language.Texts.GetText("FLIGHT_CLASS_E");
}else{
if(_19.CabinClass=="C"){
_1b+=Language.Texts.GetText("FLIGHT_CLASS_C");
}else{
if(_19.CabinClass=="F"){
_1b+=Language.Texts.GetText("FLIGHT_CLASS_F");
}else{
_1b+="?";
}
}
}
if(this.Name=="flighthotel"&&_19.NrOfRooms){
_1b+=" / "+_19.NrOfRooms+" "+(_19.NrOfRooms==1?Language.Texts.GetText("RESULT_ITEMNAME_ROOM").toLowerCase():Language.Texts.GetText("RESULT_ITEMNAME_ROOM_MULT").toLowerCase());
}
$("#classRoomInfo").html(_1b);
}
if(session&&session.Page&&session.Page.Name&&session.Page.Name=="package"){
this.ProcessPackageParameters(_19);
}
};
Page.prototype.ProcessPackageParameters=function(_1c){
if($("#filterHolder").length>0){
return;
}
var _1d=null;
var _1e=null;
var _1f=null;
var _20=null;
var _21=null;
var _22=null;
var _23=null;
if(_1c["MinDepartureDate"]){
_1f=_1c["MinDepartureDate"];
dateFrom1=_1c["MinDepartureDate"];
}
if(_1c["MaxDepartureDate"]){
_20=_1c["MaxDepartureDate"];
dateFrom2=_1c["MaxDepartureDate"];
}
if(_1c["DateUntil"]){
_21=_1c["DateUntil"];
if(!_1e||_21>_1e){
_1e=_1c["DateUntil"];
}
}
if(_1c["DateUntil2"]){
_22=_1c["DateUntil2"];
if(!_1e||_22>_1e){
_1e=_1c["DateUntil2"];
}
}
if(!_1d&&dateFrom2){
_1d=_1e;
}
if(!_1d){
dateFrom2=null;
}
session.Data["MinDepartureDate"]=_1d;
session.Data["MaxDepartureDate"]=_1e;
if(_1d){
var _24=_1d;
if(!_24.getTime){
_24=new Date();
_24.setTime(_1d);
}
if($("#minDepartureDate").length>0){
$("#minDepartureDate").val(_24.format("%dd-%mm-%yyyy"));
}
}
if(_1e){
var _24=_1e;
if(!_24.getTime){
_24=new Date();
_24.setTime(_1e);
}
if($("#maxDepartureDate").length>0){
$("#maxDepartureDate").val(_24.format("%dd-%mm-%yyyy"));
}
}
_23=_1c["Duration"];
if(_23==null){
var _25=_1f;
var _26=_21;
if(_25&&!_25.getTime){
_25=new Date();
_25.setTime(_1f);
}
if(_26&&!_26.getTime){
_26=new Date();
_26.setTime(_21);
}
var _27=null;
if(_25&&_26){
var _28=parseInt(_26.getTime())-parseInt(_25.getTime());
_27=Math.floor(_28/(1000*60*60*24))+1;
}
if(_27==null||_27<2){
tmp=10;
}
if($("#duration").length>0&&$("#duration options").length>0){
$("#duration options").each(function(){
var _29=$(this);
if(_27>parseInt(_29.val())){
bestIndex=x;
_29.attr("selected","selected");
}
});
}
}
};
Page.prototype.SwitchSearch=function(_2a){
if(_2a!=null){
session.Data.ComplexSearch=_2a;
}else{
session.Data.ComplexSearch=!session.Data.ComplexSearch;
}
if($("#actionHolder").length>0){
if(session.Data.ComplexSearch){
$("#actionHolder").addClass("DatesExpanded");
}else{
$("#actionHolder").removeClass("DatesExpanded");
}
}
if(session.Page.Name=="package"){
session.Data.ComplexSearch=true;
}
if($("#searchSwitch").length>0){
if(session.Data.ComplexSearch){
if($("#flexibleDates").length>0){
$("#flexibleDates").removeClass("Hidden");
}
if($("#flexibleDates2").length>0){
$("#flexibleDates2").removeClass("Hidden");
}
if($("#labelFlexible1").length>0){
$("#labelFlexible1").removeClass("hiddenLabel");
}
if($("#labelFlexible2").length>0){
$("#labelFlexible2").removeClass("hiddenLabel");
}
if($("#labelFlexible3").length>0){
$("#labelFlexible3").removeClass("hiddenLabel");
}
if($("#labelFlexible4").length>0){
$("#labelFlexible4").removeClass("hiddenLabel");
}
$("#searchSwitch").html(Language.Texts.GetText("DATERANGE_SMALL"));
session.Data.ComplexSearch=true;
$("#searchType").val("Complex");
}else{
$("#flexibleDates").addClass("Hidden");
if($id("flexibleDates2").length>0){
Element.Class.Add($id("flexibleDates2"),"Hidden");
}
if($("#labelFlexible1").length>0){
$("#labelFlexible1").addClass("hiddenLabel");
}
if($("#labelFlexible2").length>0){
$("#labelFlexible2").addClass("hiddenLabel");
}
if($("#labelFlexible3").length>0){
$("#labelFlexible3").addClass("hiddenLabel");
}
if($("#labelFlexible4").length>0){
$("#labelFlexible4").addClass("hiddenLabel");
}
$("#searchSwitch").html(Language.Texts.GetText("DATERANGE_LARGE"));
session.Data.ComplexSearch=false;
$("#searchType").val("Simple");
}
}
};
PrintHandler={SetPopupStatus:function(){
var _2b=this.GetStylesheets();
for(var i=0;i<_2b.length;i++){
if(this.IsPopupActiveSheet(_2b[i])){
_2b[i].disabled=false;
}
}
},SetNormalStatus:function(){
var _2d=this.GetStylesheets();
for(var i=0;i<_2d.length;i++){
if(this.IsPopupActiveSheet(_2d[i])){
_2d[i].disabled=true;
}
}
},IsPopupActiveSheet:function(_2f){
return _2f.getAttribute("href").indexOf("popup_active")!=-1;
},GetStylesheets:function(){
var _30=[];
var _31=$tag("link");
for(var i=0;i<_31.length;i++){
if(_31[i].getAttribute("type")=="text/css"){
_30.push(_31[i]);
}
}
return _30;
}};
function TextBoxGroup(){
this.Id=null;
this.DefaultValue=null;
this.StartValue=null;
}
TextBoxHandler={ClassNameActive:"active",ClassNameInActive:"inActive",TextBoxes:[],Add:function(_33,_34){
if(_34.indexOf("NO_TEXT")>=0||_34.indexOf("undefined [")>=0){
return;
}
var _35=new TextBoxGroup();
if(_34){
_35.DefaultValue=_34;
}
_35.Id=_33;
if($("#"+_35.Id).length>0){
var obj=$("#"+_35.Id).bind("focus",{},TextBoxHandler.Focus).bind("blur",{},TextBoxHandler.Blur).addClass(TextBoxHandler.ClassNameInActive);
_35.StartValue=obj.attr("value");
if(obj.attr("value")==""&&_35.DefaultValue){
obj.attr("value",_35.DefaultValue);
}
}
this.TextBoxes.push(_35);
},Get:function(id){
for(var i=0;i<this.TextBoxes.length;i++){
if(this.TextBoxes[i].Id==id){
return this.TextBoxes[i];
}
}
return null;
},Focus:function(e){
e.preventDefault();
if(e){
var _3a=$(e.target);
if(_3a.length>0){
_3a.addClass(TextBoxHandler.ClassNameActive);
_3a.removeClass(TextBoxHandler.ClassNameInActive);
if(_3a.attr("value")==TextBoxHandler.Get(_3a.attr("id")).DefaultValue){
_3a.attr("value","");
}
_3a.select();
}
}
return false;
},Blur:function(e){
e.preventDefault();
if(e){
var _3c=$(e.target);
if(_3c.length>0){
if(_3c.attr("value")==""){
_3c.attr("value",TextBoxHandler.Get(_3c.attr("id")).StartValue?TextBoxHandler.Get(_3c.attr("id")).StartValue:TextBoxHandler.Get(_3c.attr("id")).DefaultValue);
_3c.addClass(TextBoxHandler.ClassNameInActive);
_3c.removeClass(TextBoxHandler.ClassNameActive);
}
}
}
return false;
}};
SearchHandler={Init:function(){
TextBoxHandler.Add("searchContent",Language.Texts.GetText("SEARCH_VALUE"));
TextBoxHandler.Add("fields_email",Language.Texts.GetText("NEWSLETTER_TEASER_TEXT"));
},Validate:function(_3d){
var _3d=$(_3d);
var _3e=$("#searchContent").attr("value");
if(!_3e||_3e==""){
ErrorHandler.Show(Language.ErrorMessages.GetMessage("NO_SEARCH_VALUE"));
return false;
}
return true;
}};
LinkHandler={Init:function(){
var _3f=$class("external");
for(var i=0;i<_3f.length;i++){
_3f[i].setAttribute("target","_blank");
}
}};
ListHandler={Lists:[],Init:function(){
this.Add("listDepartureDates",5,Language.Texts.GetText("MORE")+"&nbsp;"+Language.Texts.GetText("DEPARTURE_DATE_MULT").toLowerCase(),null,"priceArrow");
this.Add("listAccmomodationTypes",5,Language.Texts.GetText("MORE")+"&nbsp;"+Language.Texts.GetText("ACCOMMODATION_TYPE_MULT").toLowerCase(),null,"priceArrow");
if($("div.destinationContentDiv > h3:first").length>0){
this.Add("locationActivities",5,Language.Texts.GetText("MORE")+"&nbsp;"+Language.Texts.GetText("ABOUT").toLowerCase()+" "+($("div.destinationContentDiv > h3:first").html()),Language.Texts.GetText("LESS")+" "+Language.Texts.GetText("ABOUT").toLowerCase()+" "+($("div.destinationContentDiv > h3:first").html()),null);
}
if(!session.Page){
this.Add("locationWeather",5,Language.Texts.GetText("MORE")+"&nbsp;"+Language.Texts.GetText("WEATHER").toLowerCase(),Language.Texts.GetText("LESS")+" "+Language.Texts.GetText("WEATHER").toLowerCase(),null);
}
},Add:function(_41,_42,_43,_44,_45){
if(_41&&$("#"+_41).length>0){
var _46=$("#"+_41);
if(_46){
var _47=new ExtendingList();
_47.Id=this.Lists.length;
_47.List=_46;
_47.Amount=_42;
_47.ExtendLinkText=_43;
_47.ReduceLinkText=_44;
_47.LinkClassName=_45;
_47.Init();
this.Lists.push(_47);
}
}
},Toggle:function(e){
if(e){
e.preventDefault();
var _49=$(e.target);
var _4a=_49.attr("id").split(";")[1];
var _4b=ListHandler.Lists[_4a];
if(_4b){
if(_4b.Status=="reduced"){
if(!_4b.ReduceLinkText){
_49.remove();
}else{
_49.html(_4b.ReduceLinkText);
}
_4b.Status="extended";
}else{
if(!_4b.ExtendLinkText){
_49.remove();
}else{
_49.html(_4b.ExtendLinkText);
}
_4b.Status="reduced";
}
_4b.ProcessList();
}
}
return false;
}};
function ExtendingList(){
this.List=null;
this.Id=null;
this.Amount=5;
this.ExtendLinkText=null;
this.ReduceLinkText=null;
this.LinkClassName=null;
this.Status=null;
}
ExtendingList.prototype.Init=function(){
if(!this.List){
return;
}
var _4c=this.GetElements();
if(_4c.size()>this.Amount){
var _4d=$("<a></a>").html(this.ExtendLinkText).attr({id:"lstToggle;"+this.Id,href:document.location}).addClass("toggle"+(this.LinkClassName?" "+this.LinkClassName:"")).bind("click",{},ListHandler.Toggle);
if($("#"+this.List.attr("id")).length>0){
$("#"+this.List.attr("id")).parent().append(_4d);
this.Status="reduced";
this.ProcessList();
}
}
};
ExtendingList.prototype.GetElements=function(){
if($("#"+this.List.attr("id")).length>0){
var _4e=$("#"+this.List.attr("id"));
return _4e.children((_4e.tagName().toLowerCase()=="ul"?"li":"dd"));
}
};
ExtendingList.prototype.ProcessList=function(){
var _4f=this.GetElements();
var _50=this.Amount;
var i=0;
_4f.each(function(){
if(i>=_50){
$(this).toggle("slow");
}
i++;
});
};
MoodHandler={Moods:[],Object:null,Init:function(id){
var obj=$id(id);
if(obj){
MoodHandler.Object=obj;
MoodHandler.Moods=new Array();
}
},AddMood:function(_54,_55,_56,_57){
MoodHandler.Moods.push(new Mood(_54,_55,_56,_57));
},Switch:function(_58){
if(MoodHandler.Object){
var _59=new Array();
for(var i=0;i<MoodHandler.Moods.length;i++){
if(MoodHandler.Moods[i].Filters.length==1){
for(var j=0;j<_58.length;j++){
if(_58[j].Id===MoodHandler.Moods[i].Filters[0]){
_59.push(MoodHandler.Moods[i]);
break;
}
}
}else{
var _5c=true;
for(var j=0;j<MoodHandler.Moods[i].Filters.length;j++){
var _5d=false;
for(var x=0;x<_58.length;x++){
if(_58[x].Id===MoodHandler.Moods[i].Filters[j]){
_5d=true;
break;
}
}
if(!_5d){
_5c=false;
break;
}
}
if(_5c){
_59.push(MoodHandler.Moods[i]);
}
}
}
if(!_59||_59.length==0){
for(var i=0;i<MoodHandler.Moods.length;i++){
if(MoodHandler.Moods[i].Rank==-1){
_59.push(MoodHandler.Moods[i]);
break;
}
}
}
var _5f=null;
if(_59&&_59.length>0){
for(var i=0;i<_59.length;i++){
if(!_5f||(_59[i].Rank>_5f.Rank)){
_5f=_59[i];
}
}
}
if(_5f){
MoodHandler.ChangeBackground(_5f.Image);
}
}
},ChangeBackground:function(_60){
if(MoodHandler.Object){
MoodHandler.Object.style.background="url("+_60+") no-repeat left top";
}
}};
function Mood(_61,_62,_63,_64){
this.Rank=_61;
this.Name=_62;
this.Image=_63;
this.Filters=_64;
}
BannerHandler={Root:null,ListItemClassName:"listBanner",ListItemPosition:3,TargetListItemClassName:"resultItem",ZoneName:null,CountryName:null,TouristicRegionName:null,RegionName:null,LocationName:null,Init:function(){
var _65=$("."+BannerHandler.ListItemClassName);
for(var i=0;i<_65.size();i++){
var _67=_65[i].parent();
BannerHandler.AddBannerToList(_67,_65[i]);
}
},AddBannerToList:function(_68,_69){
_68.children("."+BannerHandler.ListItemClassName).remove();
if(BannerHandler.ListItemPosition<_68.children().size()){
var _6a=_68.children();
_69.insertBefore("#"+_6a[BannerHandler.ListItemPosition].id);
}else{
_68.append(_69);
}
},CreateBanner:function(_6b,_6c,_6d,_6e,_6f,_70){
var _71=new Date();
var _72=_71.getTime();
var _73="";
_73+="&amp;sZone="+_6d;
if(BannerHandler.CountryName){
_73+="&amp;sCountryName="+BannerHandler.CountryName;
}
if(BannerHandler.TouristicRegionName){
_73+="&amp;sTouristicRegionName="+BannerHandler.TouristicRegionName;
}
if(BannerHandler.RegionName){
_73+="&amp;sRegionName="+BannerHandler.RegionName;
}
if(BannerHandler.LocationName){
_73+="&amp;sLocationName="+BannerHandler.LocationName;
}
return "<iframe id='"+_6b+"' name='"+_6b+"' "+(_6f?" width='"+_6f+"px' ":"")+(_70?" height='"+_70+"px'":"")+"src='"+BannerHandler.Root+"afr.php?n="+_6b+"&amp;zoneid="+_6c+"&amp;cb="+_72+_73+"' framespacing='0' frameborder='no' scrolling='no' allowtransparency='true'><a href='"+BannerHandler.Root+"ck.php?n="+_6e+"&amp;cb="+_72+"' target='_blank' rel='nofollow'><img src='"+BannerHandler.Root+"avw.php?zoneid="+_6c+"&amp;cb="+_72+"&amp;n="+_6e+"' border='0' alt='' /></a></iframe>";
}};
function ShowOffer(e,id){
e.preventDefault();
$(".topOffers:first > ul:first").children().each(function(){
var _76=$(this);
if(_76.attr("id")==("offer"+id)){
_76.show();
}else{
_76.hide();
}
});
}
function loadForm(){
if($(".filterForm").length>0){
var _77=$(".filterForm:first");
_77.bind("submit",{},saveScrollPosition);
if($("#dpgDefault_dhDetailHolder_dcoOlezoContent_scrollPosition").length>0){
var _78=parseInt($("#dpgDefault_dhDetailHolder_dcoOlezoContent_scrollPosition").attr("value"));
window.scroll(0,_78);
}else{
if($("#dpgDefault_dhDetailHolder_dcwWhiteLabelContent_scrollPosition").length>0){
var _78=parseInt($("#dpgDefault_dhDetailHolder_dcwWhiteLabelContent_scrollPosition").attr("value"));
window.scroll(0,_78);
}
}
}
}
function saveScrollPosition(e){
if($("#dpgDefault_dhDetailHolder_dcoOlezoContent_scrollPosition").length>0){
$("#dpgDefault_dhDetailHolder_dcoOlezoContent_scrollPosition").attr("value",PageHandler.ScrollPositions().top);
}else{
if($("#dpgDefault_dhDetailHolder_dcwWhiteLabelContent_scrollPosition").length>0){
$("#dpgDefault_dhDetailHolder_dcwWhiteLabelContent_scrollPosition").attr("value",PageHandler.ScrollPositions().top);
}
}
}
function ToggleLocationActivities(e){
if(e){
e.preventDefault();
var _7b=$(e.target);
_7b.remove();
var _7c=$(".activitiesHolder:first > dl:first");
_7c.slideToggle("slow");
}
return false;
}
function ToggleDescription(e){
e.preventDefault();
var _7e=$(e.target);
if(_7e.length>0){
var _7f=_7e.attr("bak");
_7e.attr("bak",_7e.html()).html(_7f);
if(_7e.hasClass("closed")){
_7e.removeClass("closed").addClass("opened");
}else{
_7e.removeClass("opened").addClass("closed");
}
_7e.parent().children(".extendedDescription").slideToggle("slow");
}
return false;
}
function ToggleContent(e){
if(e){
e.preventDefault();
var _81=$(e.target);
var _82=false;
if(_81.html()==Language.Texts.GetText("CLOSE")){
_82=true;
_81.html(Language.Texts.GetText("OPEN"));
}else{
_81.html(Language.Texts.GetText("CLOSE"));
}
var _83=_81.parent().children(".informationContent");
for(var i=0;i<_83.length;i++){
if(_82){
_83[i].hide();
}else{
_83[i].show();
}
}
}
return false;
}
function AddElements(_85,_86){
if(_86){
for(var i=0;i<_86.length;i++){
_85.push(_86[i]);
}
}
}
function showFullDescription(e,id){
try{
if(e){
e.preventDefault();
}
}
catch(exc){
}
try{
if($("#headerInfoLink").val()==""){
$("#"+id).fadeIn("slow",function(){
if($.browser.msie){
try{
this.style.removeAttribute("filter");
}
catch(ex){
}
}
});
$("#"+id).prev("span").html($("#"+id).prev("span").html().replace("...",""));
$("#"+id).after($(".facilities"));
$("#headerInfoLink").html("Minder");
$("#headerInfoLink").val("2");
}else{
if($("#headerInfoLink").val()=="1"){
$("#"+id).fadeIn("slow",function(){
if($.browser.msie){
try{
this.style.removeAttribute("filter");
}
catch(ex){
}
}
});
$("#"+id).prev("span").html($("#"+id).prev("span").html().replace("...",""));
$(".accommodationHeaderDetailDescription .facilities").fadeIn("slow");
$("#headerInfoLink").html("Minder");
$("#headerInfoLink").val("2");
}else{
if($("#headerInfoLink").val()=="2"){
$("#"+id).fadeOut("slow",function(){
if($.browser.msie){
try{
this.style.removeAttribute("filter");
}
catch(ex){
}
}
});
$("#"+id).prev("span").html($("#"+id).prev("span").html()+"...");
$(".accommodationHeaderDetailDescription .facilities").fadeOut("slow");
$("#headerInfoLink").html("Lees meer");
$("#headerInfoLink").val("1");
}
}
}
}
catch(err){
}
return false;
}
function showMore(e,id,_8c){
try{
if(e){
e.preventDefault();
}
}
catch(err){
}
$("tr."+_8c+".hidden").attr("style","display:block");
$("#"+id+" a").remove();
return false;
}
var GoogleMapLoaded=false;
function SwitchDetailPanel(_8d){
try{
var _8e=$(".accommodationContent > div#Details > div.detailPanel").each(function(){
$(this).addClass("Hidden");
});
if($("#"+_8d).length>0){
var _8f=$("#"+_8d);
_8f.removeClass("Hidden");
}
var _90=$("div.detailMenu:first").removeClass("DetailMenuInfo").removeClass("DetailMenuMap").removeClass("DetailMenuPicture").removeClass("DetailMenuOverview");
if(_8d.toLowerCase()=="pnlaccocmsdetails"){
_90.addClass("DetailMenuInfo");
}else{
if(_8d.toLowerCase()=="pnlgooglemapsbig"){
if(!GoogleMapLoaded){
InitializeMapdivMapBig();
GoogleMapLoaded=true;
}
_90.addClass("DetailMenuMap");
}else{
if(_8d.toLowerCase()=="pnlpictures"){
_90.addClass("DetailMenuPicture");
}else{
_90.addClass("DetailMenuOverview");
}
}
}
if($("#dpgDefault_dhDetailHolder_dcoOlezoContent_activeTab").length>0){
$("#dpgDefault_dhDetailHolder_dcoOlezoContent_activeTab").attr("value",_8d);
}else{
if($("#dpgDefault_dhDetailHolder_dcwWhiteLabelContent_activeTab").length>0){
$("#dpgDefault_dhDetailHolder_dcwWhiteLabelContent_activeTab").attr("value",_8d);
}
}
}
catch(err){
}
return false;
}
function highLight(_91){
if(_91){
var _92=$(_91).children("td").each(function(){
$(this).addClass("hightLight");
});
}
}
function deHighLight(_93){
if(_93){
var _94=$(_93).children("td").each(function(){
$(this).removeClass("hightLight");
});
}
}
function clickOut(url){
window.open(url);
}
function RandomizeHeaderImage(_96,_97){
if(_97==undefined){
_97=false;
}
if(_96>1){
if(_97){
var _98=$("#HeaderContainer .header:first");
var _99=_98.clone();
var _9a=1;
for(var i=1;i<=_96;i++){
if(_99.is(".hd"+i)){
_9a=i;
_99.removeClass("hd"+i);
}
}
var _9c=Math.floor(Math.random()*_96+1);
while(_9a==_9c){
_9c=Math.floor(Math.random()*_96+1);
}
_99.addClass("hd"+_9c).attr("style","display:none");
_99.insertBefore(_98);
_99.fadeIn(1000);
_98.fadeOut(1000,function(){
$(this).remove();
});
}
_97=true;
setTimeout("RandomizeHeaderImage("+_96+","+_97+")",10000);
}
}
function InitClock(_9d){
setTimeout("UpdateLastMinuteTime('"+_9d+"',true)",1000);
}
function UpdateLastMinuteTime(_9e,_9f){
var now=new Date();
var _a1=now.getHours();
var _a2=now.getMinutes();
var _a3=now.getSeconds();
var _a4=""+(_a1<10?"0":"")+(_a1);
if(_a4=="0"){
_a4=12;
}
_a4+=(_9f?" ":":");
_a4+=((_a2<10)?"0":"")+_a2;
$("#"+_9e).html(_a4);
setTimeout("UpdateLastMinuteTime('"+_9e+"',"+(!_9f)+")",500);
}
function number_format(a,b,c,d){
var k="";
if((""+a).indexOf("-")==0){
k="-";
a=a*-1;
}
a=Math.round(a*Math.pow(10,b))/Math.pow(10,b);
var e=a+"";
var f=e.split(".");
if(!f[0]){
f[0]="0";
}
if(!f[1]){
f[1]="";
}
if(f[1].length<b){
var g=f[1];
for(var i=f[1].length+1;i<=b;i++){
g+="0";
}
f[1]=g;
}
if(d!=""&&f[0].length>3){
var h=f[0];
f[0]="";
for(var j=3;j<h.length;j+=3){
i=h.slice(h.length-j,h.length-j+3);
f[0]=d+i+f[0]+"";
}
j=h.substr(0,(h.length%3==0)?3:(h.length%3));
f[0]=j+f[0];
}
c=(b<=0)?"":c;
return k+f[0]+c+f[1];
}
(function($){
$.fn.supplierticker=function(_b1){
var _b2=$(this).attr("id");
var _b3={timer:5000};
var _b1=$.extend(_b3,_b1);
var _b4;
var _b5=0;
$(document).ready(function(){
_b4=$("#"+_b2+" li").hide().size();
$("#"+_b2+" ul#hiddenList").hide();
ticknews();
setInterval(ticknews,_b1.timer);
});
function ticknews(){
var _b6=$("#"+_b2+" #showList");
_b6.fadeOut("slow",function(){
var _b7="";
var i=0;
while(i<5&&i<_b4){
if(_b5>=_b4){
_b5=0;
}
_b7+="<li class=\"suppliersBig\"><span class=\""+$("#"+_b2+" span:eq("+_b5+")").attr("class")+"\" title=\""+$("#"+_b2+" span:eq("+_b5+")").attr("title")+"\"></span></li>";
_b5++;
i++;
}
_b6.html(_b7);
});
_b6.fadeIn("slow");
}
};
})(jQuery);
$(document).ready(function(){
if($("#supplierTicker").length>0){
$("#supplierTicker").supplierticker({timer:10000});
}
});
var activeId="Vacation";
function switchContentPanel(id){
if(!id||id!=activeId){
activeId=id;
var _ba="cm"+id;
var _bb="cc"+id;
$("#"+_ba).parent().children().removeClass("active");
$("#"+_ba).addClass("active");
$("#"+_bb).parent().children().each(function(){
var _bc=$(this);
if(_bc.attr("id")==_bb){
_bc.height("auto");
_bc.css("visibility","visible");
}else{
_bc.height("0");
_bc.css("visibility","hidden");
}
});
SwitchActiveCountry();
}
}
function preventDefault(e){
try{
e=e||window.event;
(e.preventDefault)?e.preventDefault():e.returnValue=false;
}
catch(exc){
}
}
function printPage(e,url){
try{
$(".logo > a:first").html(url);
Analytics.TrackEvent("Accommodation","Print",url);
window.print();
preventDefault(e);
}
catch(exc){
}
return false;
}
function OpenSendAFriend(_c0,url){
if(_c0){
preventDefault(_c0);
}
if($("#sendAFriend").length>0){
if(url){
Analytics.TrackEvent("Accommodation","Open Send-a-Friend",url);
}
var _c2=$("#sendAFriend");
if(_c2.parent().tagName().toLowerCase()!="body"){
_c2.remove();
$(document.body).append(_c2);
}
_c2.show();
var _c3=PageHandler.ScrollPositions();
var _c4=(($(document).width()/2))-(_c2.width()/2)+"px";
var _c5=(($(window).height()/2)+_c3.top)-(_c2.height()/2)+"px";
_c2.css({left:_c4,top:_c5});
_c2.show();
OpenShade(CloseSendAFriend);
}
}
function CloseSendAFriend(url){
Analytics.TrackEvent("Accommodation","Close Send-a-Friend",url);
CloseShade();
$("#sendAFriend").hide();
}
function PostSendAFriend(_c7,url,_c9){
if(_c7&&$("#"+_c7).length>0){
try{
$("#encId").val(_c9);
$("#"+_c7).attr("action",url);
return true;
}
catch(exc){
}
}
return false;
}
function OpenShade(_ca){
if($("#shade").length>0){
$("#shade").remove();
}
PageHandler.SelectBoxes.Hide();
var div=$("<div></div>").attr({id:"shade"}).css({position:"absolute",top:"0px",left:"0px",width:($(document).width())+"px",height:$(document).height()+"px"});
div.bind("click",{},_ca);
$(document.body).append(div);
}
function CloseShade(){
if($("#shade").length>0){
$("#shade").hide();
}
PageHandler.SelectBoxes.Show();
}
function sortFilters(a,b){
var _ce=a.Id.toLowerCase();
var _cf=b.Id.toLowerCase();
return sortName(_ce,_cf);
}
function sortName(a,b){
if(a<b){
return -1;
}
if(a>b){
return 1;
}
return 0;
}
(function($){
$.fn.ccTopList=function(_d3){
var _d4={codes:null};
var _d3=$.extend(_d4,_d3);
try{
$.ajax({type:"POST",url:$BASE+"AjaxFeeds/TopList.aspx",data:"Codes="+_d3.codes,dataType:"json",success:function(_d5){
if(_d5&&_d5.AjaxError){
var _d6=_d5.AjaxError.Text;
var _d7=false;
ErrorHandler.Show(_d6,_d7);
return;
}
if(_d5&&$("#topListContainer").length>0){
for(var i=0;i<_d5.length;i++){
$("#topListContainer").append(_d5[i].Contents);
}
}
},error:function(_d9){
var _da=_d9.Text;
var _db=false;
ErrorHandler.Show(_da,_db);
return;
}});
}
catch(err){
}
};
})(jQuery);
(function($){
$.fn.ccHotDeals=function(_dd){
var _de={code:null};
var _dd=$.extend(_de,_dd);
try{
$.ajax({type:"POST",url:$BASE+"AjaxFeeds/HotDeals.aspx",data:"Code="+_dd.code,dataType:"json",success:function(_df){
if(_df&&_df.AjaxError){
var _e0=_df.AjaxError.Text;
var _e1=false;
ErrorHandler.Show(_e0,_e1);
return;
}
if(_df&&$("#hotDealsHolder").length>0){
for(var i=0;i<_df.length;i++){
var _e3=$("<div></div>").addClass("hotDeals");
_e3.append("<h2>"+_df[i].Title+"</h2>");
var _e4=$("<ul></ul>").attr({id:"results"});
for(var j=0;j<_df[i].HotDealItems.length;j++){
_e4.append(_df[i].HotDealItems[j].Contents);
}
_e3.append($("<div></div>").addClass("explore").append(_e4));
$("#hotDealsHolder").append(_e3);
}
}
},error:function(_e6){
var _e7=_e6.Text;
var _e8=false;
ErrorHandler.Show(_e7,_e8);
return;
}});
}
catch(err){
}
};
})(jQuery);
(function($){
$.fn.ccCountries=function(){
try{
$.ajax({type:"POST",url:$BASE+"AjaxFeeds/Countries.aspx",data:"",dataType:"json",success:function(_ea){
if(_ea&&_ea.AjaxError){
var _eb=_ea.AjaxError.Text;
var _ec=false;
ErrorHandler.Show(_eb,_ec);
return;
}
if(_ea&&$("#fullListHolder").length>0){
for(var i=0;i<_ea.length;i++){
if(_ea[i].ContentTopCountries&&_ea[i].ContentTopCountries.length>0){
var _ee=$("<div></div>").append(_ea[i].ContentTopCountries);
_ee.insertBefore("#lnkMoreDest");
}
if(_ea[i].ContentAllCountries&&_ea[i].ContentAllCountries.length>0){
var _ee=$("<div></div>").attr({id:"lstBigc"+_ea[i].Code.toUpperCase()}).addClass("lstCountriesBig weather").hide();
_ee.append("<h4>Alle bestemmingen in "+_ea[i].Name+"</h4>");
_ee.append(_ea[i].ContentAllCountries);
$("#fullListHolder").append(_ee);
}
}
}
},error:function(_ef){
var _f0=_ef.Text;
var _f1=false;
ErrorHandler.Show(_f0,_f1);
return;
}});
}
catch(err){
}
};
})(jQuery);
$POPUP_OPEN=false;
var $IS_OPERA=navigator.userAgent.toLowerCase().indexOf("opera")>=0;
var $IS_IE=(document.all&&(navigator.userAgent.toLowerCase().indexOf("msie")>=0))||false;
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(e){
}
function $id(_f2){
return document.getElementById(_f2);
}
function $class(_f3,_f4,tag){
var _f6=[];
var _f4=typeof (_f4)!="undefined"?_f4:document;
var tag=typeof (tag)!="undefined"?tag:"*";
var _f7=$tag(tag,_f4);
_f3=_f3.replace(/\-/g,"\\-");
var _f8=new RegExp("(^|\\s)"+_f3+"(\\s|$)");
var _f9;
for(var i=_f7.length-1;i>=0;i--){
_f9=_f7[i];
if(_f8.test(_f9.className)){
_f6.push(_f7[i]);
}
}
return _f6;
}
function $tag(_fb,_fc){
return _fc?_fc.getElementsByTagName(_fb):document.getElementsByTagName(_fb);
}
function $create(tag,_fe){
var _ff=null;
if(typeof (document.createElementNS)!="undefined"){
_ff=document.createElementNS("http://www.w3.org/1999/xhtml",tag);
}else{
_ff=document.createElement(tag);
}
if(typeof (_fe)!="undefined"){
var _100=_fe;
if(tag.toLowerCase()=="p"&&_100){
_100=_100.replace("\t","");
_100=_100.replace(/^\s*|\s*$/g,"");
_100=_100.replace(/<p>/g,"");
_100=_100.replace(/<\/p>/g,"<br />");
}
_ff.innerHTML=_100;
}
return _ff;
}
function $parent(tag,obj){
if(!obj){
return null;
}
if(obj.parentNode){
while(obj=obj.parentNode){
if(tag===obj.nodeName.toLowerCase()){
return obj;
}
}
}
return null;
}
Element={Remove:function(obj,_104){
if(obj.parentNode){
if(typeof (_104)!="undefined"&&_104){
var _105=$tag("*",obj);
if(_105){
for(var i=0;i<_105.length;i++){
Event.RemoveBoundTo(_105[i]);
}
}
}
obj.parentNode.removeChild(obj);
}
},RemoveChildren:function(obj,_108){
var _109=$tag("*",obj);
for(var i=_109.length-1;i>=0;i--){
Element.Remove(_109[i],_108);
}
},IsChild:function(_10b,_10c){
if(_10c.parentNode){
while(_10c=_10c.parentNode){
if(_10b===_10c){
return true;
}
}
}
return false;
},FindElement:function(_10d,name){
if(!_10d||!name){
return false;
}
return Element.SearchChildren(_10d,name);
},SearchChildren:function(_10f,name){
if(_10f.id==name){
return _10f;
}
if(_10f.hasChildNodes()){
for(var i=0;i<_10f.childNodes.length;i++){
if(_10f.childNodes[i]){
var obj=Element.SearchChildren(_10f.childNodes[i],name);
if(obj){
return obj;
}
}
}
}
},SearchParent:function(tag,_114){
if(_114.nodeName.toLowerCase()===tag){
return _114;
}
if(_114.parentNode){
var obj=Element.SearchParent(tag,_114.parentNode);
if(obj){
return obj;
}
}
},Class:{Add:function(obj,name){
if(!Element.Class.Contains(obj,name)){
if(obj){
obj.className+=" "+name;
}
}
},Contains:function(obj,name){
if(!obj||!obj.className){
return false;
}
return (obj.className.indexOf(name)!=-1);
},Remove:function(obj,name){
if(obj){
obj.className=obj.className.replace(name,"");
}
}},Position:function(obj){
var pos={x:0,y:0};
if(obj.offsetParent){
pos.x=obj.offsetLeft;
pos.y=obj.offsetTop;
while(obj=obj.offsetParent){
pos.x+=obj.offsetLeft;
pos.y+=obj.offsetTop;
}
}
return pos;
},Focus:function(obj){
obj.focus();
},Visibility:{Hide:function(obj){
if(obj.style){
obj.style.display="none";
}
},Show:function(obj){
if(obj.style){
obj.style.display="";
}
},Toggle:function(obj){
if(obj.style){
obj.style.display=obj.style.display=="none"?"":"none";
}
},Set:function(obj,_123){
if(obj.style){
obj.style.display=_123;
}
},IsVisible:function(obj){
if(obj.style){
return obj.style.display!="none";
}
return true;
}},Dimensions:function(obj){
var dim={width:0,height:0};
dim.width=obj.offsetWidth||0;
dim.height=obj.offsetHeight||0;
return dim;
},Style:{Get:function(obj,_128){
if(obj.currentStyle){
var _129=_128.replace(/\-(.)/g,function(m,l){
return l.toUpperCase();
});
return obj.currentStyle[_129];
}else{
if(window.getComputedStyle){
var _12c=window.getComputedStyle(obj,"");
return _12c.getPropertyValue(_128);
}
}
}}};
PageHandler={Height:function(){
var D=document;
return Math.max(Math.max(D.body.scrollHeight,D.documentElement.scrollHeight),Math.max(D.body.offsetHeight,D.documentElement.offsetHeight),Math.max(D.body.clientHeight,D.documentElement.clientHeight));
},Dimensions:function(){
var dim={width:0,height:0};
if(window.innerHeight){
dim.height=window.innerHeight;
dim.width=window.innerWidth;
}else{
if(document.documentElement){
dim.height=document.documentElement.clientHeight;
dim.width=document.documentElement.clientWidth;
}else{
if(document.body){
dim.height=document.body.clientHeight;
dim.width=document.body.clientWidth;
}
}
}
return dim;
},ScrollPositions:function(){
var dim={left:10,top:10};
if(window.pageYOffset){
dim.top=window.pageYOffset;
dim.left=window.pageXOffset;
}else{
if(document.documentElement){
dim.top=document.documentElement.scrollTop;
dim.left=document.documentElement.scrollLeft;
}else{
if(document.body){
dim.top=document.body.scrollTop;
dim.left=document.body.scrollLeft;
}
}
}
return dim;
},SelectBoxes:{Show:function(){
var _130=$tag("select");
for(var i=0;i<_130.length;i++){
_130[i].style.visibility="";
}
},Hide:function(type){
var _133=$tag("select");
for(var i=0;i<_133.length;i++){
if(type=="calendar"){
if(_133[i].id.indexOf("travelType")>-1){
continue;
}
}
_133[i].style.visibility="hidden";
}
},Disable:function(){
var _135=$tag("select");
for(var i=0;i<_135.length;i++){
_135[i].disabled=true;
}
},HideAllExceptChildrenOf:function(_137,type){
this.Hide(type);
if(_137){
var _139=$tag("select",_137);
for(var i=0;i<_139.length;i++){
_139[i].style.visibility="";
}
}
}}};
$OBSERVERS_LIST=[];
Event={GetEvent:function(e){
return e||window.event;
},Stop:function(e){
if(!e){
return false;
}
var e=Event.GetEvent(e);
e.cancelBubble=true;
if(e.preventDefault){
e.preventDefault();
}
if(e.stopPropagation){
e.stopPropagation();
}
},GetElement:function(e,name){
if(!e){
return null;
}
var e=Event.GetEvent(e);
var obj=!e.target?e.srcElement:e.target;
if(typeof (name)!="undefined"){
while(obj.parentNode&&obj.nodeName.toLowerCase()!="label"){
obj=obj.parentNode;
}
}
return obj;
},Observe:function(obj,name,func,_143){
var _144=false;
if(obj.addEventListener){
obj.addEventListener(name,func,_143);
_144=true;
}
if(obj.attachEvent){
obj.attachEvent("on"+name,func);
_144=true;
}
if(_144){
$OBSERVERS_LIST.push({Object:obj,Name:name,Function:func,Capture:_143});
return true;
}
return false;
},Remove:function(obj,name,func,_148){
Event.Detach(obj,name,func,_148);
Event.RemoveFromEventList(obj,name,func,_148);
},Detach:function(obj,name,func,_14c){
if(func==null){
return true;
}
if(obj.removeEventListener){
obj.removeEventListener(name,func,_14c);
return true;
}
if(obj.detachEvent){
return (obj.detachEvent("on"+name,func));
}
return false;
},RemoveFromEventList:function(obj,name,func,_150){
for(var i=$OBSERVERS_LIST.length-1;i>=0;i--){
if(obj==$OBSERVERS_LIST[i].Object&&name==$OBSERVERS_LIST[i].Name&&func==$OBSERVERS_LIST[i].Function&&_150==$OBSERVERS_LIST[i].Capture){
$OBSERVERS_LIST.splice(i,1);
}
}
},RemoveAll:function(){
for(var i=$OBSERVERS_LIST.length-1;i>=0;i--){
Event.Detach($OBSERVERS_LIST[i].Object,$OBSERVERS_LIST[i].Name,$OBSERVERS_LIST[i].Function,$OBSERVERS_LIST[i].Capture);
$OBSERVERS_LIST.splice(i,1);
}
},RemoveIn:function(obj){
for(var i=$OBSERVERS_LIST.length-1;i>=0;i--){
if(Element.IsChild(obj,$OBSERVERS_LIST[i].Object)){
Event.Detach($OBSERVERS_LIST[i].Object,$OBSERVERS_LIST[i].Name,$OBSERVERS_LIST[i].Function,$OBSERVERS_LIST[i].Capture);
$OBSERVERS_LIST.splice(i,1);
}
}
},RemoveBoundTo:function(obj){
for(var i=$OBSERVERS_LIST.length-1;i>=0;i--){
if(obj==$OBSERVERS_LIST[i].Object){
Event.Detach($OBSERVERS_LIST[i].Object,$OBSERVERS_LIST[i].Name,$OBSERVERS_LIST[i].Function,$OBSERVERS_LIST[i].Capture);
$OBSERVERS_LIST.splice(i,1);
}
}
},Key:function(e){
var e=Event.GetEvent(e);
if(typeof (e.keyCode)=="number"){
return e.keyCode;
}else{
if(typeof (e.which)=="number"){
return e.which;
}else{
if(typeof (e.charCode)=="number"){
return e.charCode;
}
}
}
return null;
},KeyName:function(e){
var _159=Event.Key(e);
return (_159!=null?String.fromCharCode(_159):null);
},Mouse:{Position:function(e){
var e=Event.GetEvent(e);
var pos={x:0,y:0};
if(e.pageX||e.pageY){
pos.x=e.pageX;
pos.y=e.pageY;
}else{
if(e.clientX||e.clientY){
pos.x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
pos.y=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;
}
}
return pos;
},Button:function(e){
var e=Event.GetEvent(e);
}}};
FormHandler={DisableEnter:function(e){
if(e){
var key=Event.Key(e);
if(key==13){
Event.Stop(e);
return false;
}else{
return true;
}
}
return false;
},SelectBox:{SetValue:function(_15f,_160){
if(!_15f||!_15f.options){
return;
}
for(var _161=0;_161<_15f.options.length;_161++){
if(_15f.options[_161].value==_160){
_15f.options[_161].selected=true;
return;
}
}
},GetValue:function(_162,_163){
if(!_162||!_162.options){
return _163;
}
try{
if(_162.options[_162.selectedIndex].value!=null&&_162.options[_162.selectedIndex].value.length&&_162.options[_162.selectedIndex].value.length>0){
return _162.options[_162.selectedIndex].value;
}else{
if(_162.options[_162.selectedIndex].text!=null&&_162.options[_162.selectedIndex].text.length&&_162.options[_162.selectedIndex].text.length>0){
return _162.options[_162.selectedIndex].text;
}else{
return _163;
}
}
}
catch(ex){
return _163;
}
}}};
Function.prototype.bind=function(obj){
var _165=this;
temp=function(){
return _165.apply(obj,arguments);
};
return temp;
};
Browser={IsModern:function(){
if(document.body){
return (typeof (document.body.style.maxHeight)!="undefined");
}
return false;
}};
String.prototype.GetWidth=function(){
var span=$("<span></span>").html(this).hide();
$(document.body).append(span);
var _167=span.offsetWidth;
span.remove();
return _167;
};
String.prototype.StripNumbers=function(){
var _168="0123456789";
var s="";
for(var i=0;i<this.length;i++){
var _16b=this.substr(i,1);
if(_168.indexOf(_16b)<0){
s+=_16b;
}
}
return s;
};
String.prototype.StripNumbersOnStart=function(){
var _16c="0123456789";
var s="";
var _16e=true;
for(var i=0;i<this.length;i++){
var _170=this.substr(i,1);
if(_16e&&_16c.indexOf(_170)<0){
_16e=false;
}
if(!_16e||(_16e&&_16c.indexOf(_170)<0)){
s+=_170;
}
}
return s;
};
String.prototype.URLEncode=function(){
return escape(this);
};
String.prototype.ShortenByWidth=function(_171,_172){
var _173=new String();
if(this.GetWidth()>_171){
_173=this.substr(0,Math.floor(this.length-(this.length/4)));
while(_173.GetWidth()>_171){
_173=_173.substr(0,Math.floor(_173.length-(_173.length/4)));
}
return _173.Trim()+(_172?"..":"");
}
return this;
};
String.prototype.Shorten=function(_174,_175){
return (this.length>_174?(this.substring(0,_174-2).Trim()+".."):this);
};
String.prototype.Trim=function(){
var str=this;
var i=0;
var j=str.length-1;
while(str.charAt(i)==" "){
i++;
}
while(str.charAt(j)==" "){
j--;
}
if(i>0||j>0){
str=str.substring(i,j+1);
}
return str;
};
String.prototype.CreateClassName=function(){
var str=this;
if(str){
str=str.toLowerCase();
str=str.replace(new RegExp(/\d/g),"");
str=str.replace(new RegExp(/-/g),"");
str=str.replace(new RegExp(/&/g),"");
str=str.replace(" en ","");
str=str.replace(" and ","");
str=str.replace(new RegExp(/ /g),"");
str=str.replace(new RegExp(/\\/g),"");
var _17a=0;
while(str.indexOf("/")>-1&&_17a<10){
str=str.replace("/","");
_17a++;
}
}
return str;
};
var $MONTHNAMES=new Array();
var $MONTHSHORTNAMES=new Array();
var $DAYSHORTNAMES=new Array();
var $DAYNAMES=new Array();
function InitilizeDateTexts(){
$MONTHNAMES=[Language.Texts.GetText("MONTH_JAN"),Language.Texts.GetText("MONTH_FEB"),Language.Texts.GetText("MONTH_MAR"),Language.Texts.GetText("MONTH_APR"),Language.Texts.GetText("MONTH_MAY"),Language.Texts.GetText("MONTH_JUN"),Language.Texts.GetText("MONTH_JUL"),Language.Texts.GetText("MONTH_AUG"),Language.Texts.GetText("MONTH_SEP"),Language.Texts.GetText("MONTH_OCT"),Language.Texts.GetText("MONTH_NOV"),Language.Texts.GetText("MONTH_DEC")];
$MONTHSHORTNAMES=[Language.Texts.GetText("MONTH_JAN_SHORT"),Language.Texts.GetText("MONTH_FEB_SHORT"),Language.Texts.GetText("MONTH_MAR_SHORT"),Language.Texts.GetText("MONTH_APR_SHORT"),Language.Texts.GetText("MONTH_MAY_SHORT"),Language.Texts.GetText("MONTH_JUN_SHORT"),Language.Texts.GetText("MONTH_JUL_SHORT"),Language.Texts.GetText("MONTH_AUG_SHORT"),Language.Texts.GetText("MONTH_SEP_SHORT"),Language.Texts.GetText("MONTH_OCT_SHORT"),Language.Texts.GetText("MONTH_NOV_SHORT"),Language.Texts.GetText("MONTH_DEC_SHORT")];
$DAYSHORTNAMES=[Language.Texts.GetText("DAY_SUN_SHORT"),Language.Texts.GetText("DAY_MON_SHORT"),Language.Texts.GetText("DAY_TUE_SHORT"),Language.Texts.GetText("DAY_WED_SHORT"),Language.Texts.GetText("DAY_THU_SHORT"),Language.Texts.GetText("DAY_FRI_SHORT"),Language.Texts.GetText("DAY_SAT_SHORT")];
$DAYNAMES=[Language.Texts.GetText("DAY_SUN"),Language.Texts.GetText("DAY_MON"),Language.Texts.GetText("DAY_TUE"),Language.Texts.GetText("DAY_WED"),Language.Texts.GetText("DAY_THU"),Language.Texts.GetText("DAY_FRI"),Language.Texts.GetText("DAY_SAT")];
}
Date.prototype.getFirstDay=function(){
var day=new Date(this.getFullYear(),this.getMonth(),1);
var _17c=day.getDay();
return (_17c==0?7:_17c);
};
Date.prototype.getTotalDays=function(_17d,year){
if(_17d==null){
_17d=this.getMonth();
}
if(year==null){
year=this.getFullYear();
}
if(_17d==6){
return 31;
}else{
if(_17d==1){
return (this.isLeapYear(year)?29:28);
}else{
if(_17d>=7){
return (_17d%2==0?30:31);
}else{
return (_17d%2==0?31:30);
}
}
}
};
Date.prototype.isLeapYear=function(year){
if(year==null){
year=this.getFullYear();
}
return ((year%4==0)||(year%400==0&&year%100==0));
};
Date.prototype.getWeeksInMonth=function(){
return Math.ceil((this.getFirstDay+this.getTotalDays)/7);
};
Date.prototype.addMonth=function(){
var _180=this.getMonth();
var year=this.getFullYear();
if(_180==11){
year++;
_180=0;
}else{
_180++;
}
return new Date(year,_180,1);
};
Date.prototype.addDays=function(days){
var _183=this;
while(days!=0){
if(days>0){
var _184=_183.getTotalDays();
var _185=_183.getDate();
if(_185+1>_184){
_183.setDate(1);
_183=_183.addMonth();
}else{
_183=new Date(_183.getFullYear(),_183.getMonth(),_185+1);
}
days=days-1;
}
}
return _183;
};
Date.prototype.subtractMonth=function(){
var _186=this.getMonth();
var year=this.getFullYear();
if(_186==0){
year--;
_186=11;
}else{
_186--;
}
return new Date(year,_186,1);
};
Date.prototype.addMonths=function(_188){
var _189=this.getMonth();
var year=this.getFullYear();
for(var i=0;i<_188;i++){
if(_189==11){
year++;
_189=0;
}else{
_189++;
}
}
return new Date(year,_189,this.getDate());
};
Date.prototype.matches=function(year,_18d,day){
return (year==this.getFullYear()&&_18d==this.getMonth()&&day==this.getDate());
};
Date.prototype.format=function(str){
str=str.replace(/%mmmm/,$MONTHNAMES[this.getMonth()]);
str=str.replace(/%mmm/,$MONTHSHORTNAMES[this.getMonth()]);
str=str.replace(/%mm/,((this.getMonth()+1)<10?"0"+(this.getMonth()+1):this.getMonth()+1));
str=str.replace(/%m/,this.getMonth()+1);
str=str.replace(/%dd/,(this.getDate()<10?"0"+this.getDate():this.getDate()));
str=str.replace(/%d/,this.getDate());
str=str.replace(/%wwww/,$DAYNAMES[this.getDay()]);
str=str.replace(/%www/,$DAYSHORTNAMES[this.getDay()]);
str=str.replace(/%yyyy/,this.getFullYear());
str=str.replace(/%yy/,this.getFullYear().toString().substr(2,2));
return str;
};
Date.prototype.earlierThen=function(date){
return (parseInt(this.format("%yyyy%mm%dd"))<parseInt(date.format("%yyyy%mm%dd")));
};
Date.prototype.earlierThenOrEqual=function(date){
return (parseInt(this.format("%yyyy%mm%dd"))<=parseInt(date.format("%yyyy%mm%dd")));
};
Date.prototype.equals=function(date){
return (parseInt(this.format("%yyyy%mm%dd"))==parseInt(date.format("%yyyy%mm%dd")));
};
Date.fromDDMMYYYY=function(date){
date=""+date;
if(date.indexOf("-")>0){
var _194=new Date();
_194.setFullYear(date.split("-")[2]*1,date.split("-")[1]*1-1,date.split("-")[0]*1);
return _194;
}
return false;
};
Weather={GetWeatherName:function(_195){
if(_195==null){
_195=0;
}
var _196=Language.Texts.GetText("WEATHERNAME_"+_195);
if(_196){
return _196;
}else{
return "?";
}
}};
function Init(){
try{
BookmarkUtil.Init();
session.Init();
SearchHandler.Init();
LinkHandler.Init();
ListHandler.Init();
PrintHandler.SetNormalStatus();
ErrorHandler.Init();
loadForm();
try{
InitContinentsFlash();
}
catch(ex){
}
BannerHandler.Init();
InitClock("time");
}
catch(ex){
}
}
if(!window.XMLHttpRequest){
window.XMLHttpRequest=function(){
var _197=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"];
for(var i=0;i<_197.length;i++){
try{
return new ActiveXObject(_197[i]);
}
catch(e){
}
}
return undefined;
};
}
function ForceAjaxAbort(){
for(var i=0;$AJAXITEMS&&i<$AJAXITEMS.length;i++){
if($AJAXITEMS[i].Abort){
$AJAXITEMS[i].Abort();
}
}
}
var $AJAXITEMS=new Array();
Event.Observe(window,"beforeunload",ForceAjaxAbort,false);
function AjaxObject(){
this.obj=new window.XMLHttpRequest;
this.Aborted=false;
this.Url=null;
this.Format=null;
this.ASync=true;
this.HandleLoading=null;
this.HandleReceiving=null;
this.HandleSuccess=null;
this.HandleFailure=null;
this.HandleFailsafe=null;
this.FailsafeTimeout=null;
this.FailsafeTimeoutObject=null;
$AJAXITEMS.push(this);
}
AjaxObject.prototype.SetHeader=function(_19a,_19b){
this.obj.setRequestHeader(_19a,_19b);
};
AjaxObject.prototype.Abort=function(){
this.Aborted=true;
this.obj.abort();
this.Aborted=false;
};
AjaxObject.prototype.Request=function(_19c,url,_19e,_19f,_1a0){
if(url.indexOf("HTTP://")<0&&url.indexOf("http://")<0){
var _1a1=url;
if(_1a1.indexOf("/")==0){
_1a1=_1a1.replace("/","");
}
var _1a2="";
try{
_1a2=$BASE;
}
catch(ex){
_1a2="";
}
_1a1=_1a2+_1a1;
url=_1a1;
}
if(this.HandleSuccess!=null&&this.HandleFailure!=null){
this.Format=_19e;
this.Url=url;
var _1a3=(url.indexOf("?")==-1?"?":"&")+"ts="+(new Date().getTime());
this.ASync=(typeof (_19f)=="undefined"?true:_19f);
if(this.HandleFailsafe!=null&&this.FailsafeTimeout!=null){
this.FailsafeTimeoutObject=window.setTimeout(this.OnFailsafe.bind(this),this.FailsafeTimeout);
}
this.obj.open(_19c,this.Url+_1a3,this.ASync);
var _1a4=this;
_1a4.OnLoading();
this.obj.onreadystatechange=function(){
switch(_1a4.obj.readyState){
case 0:
case 1:
case 2:
_1a4.OnLoading();
break;
case 3:
_1a4.OnReceiving();
break;
case 4:
if(!_1a4.Aborted){
_1a4.OnLoaded();
}
break;
}
};
if(_19c=="post"||_19c=="POST"){
this.obj.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
}
this.obj.send(_1a0);
}else{
var _1a5=[];
if(this.HandleSuccess==null){
_1a5.push("HandleSuccess");
}
if(this.HandleFailure==null){
_1a5.push("HandleFailure");
}
Debug("Please define '"+_1a5.toString()+"' function"+(_1a5.length>1?"s":"")+" for request to '"+url+"'.");
}
};
AjaxObject.prototype.OnFailsafe=function(){
this.Abort();
this.HandleFailsafe();
};
AjaxObject.prototype.OnReceiving=function(){
if(this.HandleReceiving!=null){
this.HandleReceiving();
}
};
AjaxObject.prototype.OnLoading=function(){
if(this.HandleLoading!=null){
this.HandleLoading();
}
};
AjaxObject.prototype.OnLoaded=function(){
if(this.FailsafeTimeoutObject!=null){
window.clearTimeout(this.FailsafeTimeoutObject);
}
var _1a6={Code:"UNKNOWN",Text:Language.ErrorMessages.GetMessage("UNKNOWN_ERROR_MESSAGE")};
if((this.obj.status>=200&&this.obj.status<300)||this.obj.status==304){
var _1a7=null;
switch(this.Format.toLowerCase()){
case "str":
if(this.IsValid(this.obj.responseText)){
_1a7=this.obj.responseText;
}
break;
case "xml":
if(this.IsValid(this.obj.responseXML)){
_1a7=this.obj.responseXML;
}
break;
case "json":
if(this.IsValid(this.obj.responseText)){
try{
_1a7=eval("("+this.obj.responseText+")");
}
catch(e){
_1a7=null;
}
}
break;
default:
Debug(this.Format.toLowerCase()+Language.ErrorMessages.GetMessage("INVALID_AJAX_TYPE"));
break;
}
if(_1a7){
this.HandleSuccess(_1a7);
return;
}else{
if(this.obj.responseText.indexOf("AjaxError")!=-1){
var obj2=eval("("+this.obj.responseText+")");
_1a6.Code=obj2.AjaxError.Code;
_1a6.Text=obj2.AjaxError.Text;
if(obj2.AjaxError.Code=="NO_SESSION_COOKIE"){
_1a6.Text=Language.ErrorMessages.GetMessage("NO_SESSION_COOKIE_MESSAGE");
}
}
}
}else{
try{
_1a6.Code=obj.Code;
_1a6.Text=obj.Text;
}
catch(except){
_1a6.Code="INV_RESPONSE";
_1a6.Text=Language.ErrorMessages.GetMessage("INVALID_RESPONSE_MESSAGE");
}
}
this.HandleFailure(_1a6);
};
AjaxObject.prototype.IsValid=function(_1a9){
if(_1a9.indexOf("AjaxError")!=-1){
return false;
}
if(typeof (_1a9)=="undefined"){
return false;
}
if(_1a9==null){
return false;
}
if(_1a9.length==0){
return false;
}
return true;
};
var $IS_OPERA=navigator.userAgent.toLowerCase().indexOf("opera")>=0;
var $IS_IE=(document.all&&(navigator.userAgent.toLowerCase().indexOf("msie")>=0))||false;
var $IFRAME_LOADED=false;
var $WINDOW_TITLE=document.title;
if($WINDOW_TITLE&&$WINDOW_TITLE.indexOf("#")){
$WINDOW_TITLE=$WINDOW_TITLE.split("#")[0];
}
$HISTORY_UPDATE=false;
BookmarkUtil={LocationCode:null,LocationName:null,Keys:new Array(),HasKeys:false,FirstRun:true,HadKeysOnLoading:false,ModernBrowser:true,Listeners:new Array(),CurrentQuery:null,IFrameName:"historyIFrame",Init:function(){
this.ModernBrowser=Browser?Browser.IsModern():true;
this.FirstRun=false;
if(!this.ModernBrowser&&$IS_IE){
if($id(this.IFrameName)){
Element.Remove($id("historyIFrame",true));
}
var _1aa=$create("iframe");
_1aa.id=this.IFrameName;
var _1ab;
var _1ac="";
try{
_1ac=$BASE;
}
catch(ex){
_1ac="";
}
_1ab=_1ac+"HistoryHolder1.html";
_1aa.setAttribute("src",_1ab);
_1aa.style.display="none";
$tag("body")[0].appendChild(_1aa);
}
var _1ad=this.GetURLSubPartSpecifySplitter(false,false);
if(_1ad&&_1ad.length>0){
this.HadKeysOnLoading=true;
this.ReadKeys(_1ad);
if(!this.ModernBrowser&&$IS_IE){
this.UpdateIFrameURL(_1ad);
}
}
if(!this.ModernBrowser&&$IS_IE){
}else{
setInterval(BookmarkUtil.CheckForChangesNotSelfProduced,500);
this.Notify();
}
},TransformLongKeyToShort:function(_1ae){
var _1af=_1ae;
switch(_1ae){
case "DestinationCode":
_1af="DC";
break;
case "DestinationName":
_1af="DN";
break;
case "NrOfRooms":
_1af="NR";
break;
case "DateFrom":
_1af="DF";
break;
case "DateUntil":
_1af="DU";
break;
case "DateFrom2":
_1af="DF2";
break;
case "DateUntil2":
_1af="DU2";
break;
case "NrOfSeniors":
_1af="NS";
break;
case "NrOfBabies":
_1af="NB";
break;
case "NrOfAdults":
_1af="NA";
break;
case "NrOfChildren":
_1af="NC";
break;
case "CabinClass":
_1af="CC";
break;
case "OriginCode":
_1af="OC";
break;
case "ResultsPerPage":
_1af="RE";
break;
case "TravelType":
_1af="TT";
break;
case "CurrentPage":
_1af="CP";
break;
case "Order":
_1af="O";
break;
case "Duration":
_1af="D";
break;
case "ComplexSearch":
_1af="CS";
break;
case "SelectedFilters":
_1af="SF";
break;
case "OpenedTab":
_1af="OT";
break;
case "PopupOpen":
_1af="PO";
break;
}
return _1af;
},TransformShortKeyToLong:function(_1b0){
var _1b1=_1b0;
switch(_1b0){
case "DC":
_1b1="DestinationCode";
break;
case "DN":
_1b1="DestinationName";
break;
case "NR":
_1b1="NrOfRooms";
break;
case "DF":
_1b1="DateFrom";
break;
case "DU":
_1b1="DateUntil";
break;
case "DF2":
_1b1="DateFrom2";
break;
case "DU2":
_1b1="DateUntil2";
break;
case "NS":
_1b1="NrOfSeniors";
break;
case "NB":
_1b1="NrOfBabies";
break;
case "NA":
_1b1="NrOfAdults";
break;
case "NC":
_1b1="NrOfChildren";
break;
case "CC":
_1b1="CabinClass";
break;
case "OC":
_1b1="OriginCode";
break;
case "RE":
_1b1="ResultsPerPage";
break;
case "TT":
_1b1="TravelType";
break;
case "CP":
_1b1="CurrentPage";
break;
case "O":
_1b1="Order";
break;
case "D":
_1b1="Duration";
break;
case "CS":
_1b1="ComplexSearch";
break;
case "SF":
_1b1="SelectedFilters";
break;
case "OT":
_1b1="OpenedTab";
break;
case "PO":
_1b1="PopupOpen";
break;
}
return _1b1;
},GetKey:function(_1b2){
if(_1b2=="DestinationCode"&&this.LocationCode!=null){
return new BookmarkKey("DestinationCode",this.LocationCode);
}
if(_1b2=="DestinationName"&&this.LocationName!=null){
return new BookmarkKey("DestinationName",this.LocationName);
}
_1b2=this.TransformLongKeyToShort(_1b2);
for(var i=0;this.Keys&&i<this.Keys.length;i++){
if(!this.Keys[i]){
continue;
}
if(this.Keys[i].Name&&this.Keys[i].Name==_1b2){
return this.Keys[i];
}
}
return null;
},ReadKeys:function(_1b4){
var _1b5=$HISTORY_UPDATE;
$HISTORY_UPDATE=true;
_1b4=Encryptor.Decrypt(_1b4);
var _1b6=_1b4.split(";");
this.Keys=new Array();
for(var i=0;i<_1b6.length;i++){
var _1b8=_1b6[i].split(":");
if(_1b8.length<2){
continue;
}
if(_1b8.length>2){
var _1b9="";
for(var j=1;j<_1b8.length;j++){
_1b9+=(j>1?":":"")+_1b8[j];
}
_1b8[1]=this.DecodeString(_1b9);
}else{
_1b8[1]=this.DecodeString(_1b8[1]);
}
this.AddKey(this.TransformShortKeyToLong(_1b8[0]),_1b8[1],true);
}
$HISTORY_UPDATE=_1b5;
},AddKey:function(name,_1bc,_1bd){
var _1be=$HISTORY_UPDATE;
$HISTORY_UPDATE=true;
this.AddKeyObject(new BookmarkKey(name,_1bc),_1bd);
$HISTORY_UPDATE=_1be;
},AddKeyObject:function(key,_1c0){
if(key.Name=="DestinationCode"){
this.LocationCode=key.Value;
return;
}
if(key.Name=="DestinationName"){
this.LocationName=key.Value;
return;
}
if(key.Name=="NrOfRooms"&&!(session.Page.Name=="hotel"||session.Page.Name=="flighthotel")){
return;
}
if(key.Name=="DateUntil2"&&!(session.Page.Name=="destination")){
return;
}
if(key.Name=="DateFrom2"&&!(session.Page.Name=="destination"||session.Page.Name=="package")){
return;
}
if(key.Name=="Duration"&&!(session.Page.Name=="destination"||session.Page.Name=="package")){
return;
}
if(key.Name=="NrOfSeniors"&&!(session.Page.Name=="flight"||session.Page.Name=="flighthotel")){
return;
}
if(key.Name=="NrOfBabies"&&!(session.Page.Name=="flight"||session.Page.Name=="flighthotel")){
return;
}
if(key.Name=="NrOfAdults"&&(session.Page.Name=="car"||session.Page.Name=="destination"||session.Page.Name=="package")){
return;
}
if(key.Name=="NrOfChildren"&&(session.Page.Name=="car"||session.Page.Name=="destination"||session.Page.Name=="package")){
return;
}
if(key.Name=="CabinClass"&&!(session.Page.Name=="flight"||session.Page.Name=="flighthotel")){
return;
}
if(key.Name=="OriginCode"&&!(session.Page.Name=="flight"||session.Page.Name=="flighthotel")){
return;
}
if(key.Name=="ResultsPerPage"){
return;
}
if(key.Name=="DateUntil"&&(session.Page.Name=="package")){
return;
}
if(key.Name=="TravelType"&&!(session.Page.Name=="destination")){
return;
}
if(key.Name=="ComplexSearch"&&!(session.Page.Name=="destination")){
return;
}
if(key&&key.Name){
key.Name=this.TransformLongKeyToShort(key.Name);
}
var _1c1=$HISTORY_UPDATE;
$HISTORY_UPDATE=true;
if(!this.Keys){
this.Keys=new Array();
}
var _1c2=this.GetKey(this.TransformShortKeyToLong(key.Name));
if(!_1c2){
this.Keys.push(key);
}else{
_1c2.Value=key.Value;
}
this.HasKeys=true;
if(!_1c0){
this.Update();
}
$HISTORY_UPDATE=_1c1;
},RemoveKey:function(_1c3,_1c4){
if(_1c3=="DestinationCode"){
this.LocationCode=null;
return;
}
if(_1c3=="DestinationName"){
this.LocationName=null;
return;
}
_1c3=this.TransformLongKeyToShort(_1c3);
var _1c5=$HISTORY_UPDATE;
$HISTORY_UPDATE=true;
if(this.Keys){
for(var i=this.Keys.length-1;i>=0;i--){
if(!this.Keys[i]){
continue;
}
if(this.Keys[i].Name&&this.Keys[i].Name==_1c3){
this.Keys.splice(i,1);
}
}
}
var _1c7=0;
for(var i=0;this.Keys&&i<this.Keys.length;i++){
if(this.Keys[i]){
_1c7++;
}
}
this.HasKeys=this.Keys&&_1c7>0;
if(!_1c4){
this.Update();
}
$HISTORY_UPDATE=_1c5;
return false;
},Update:function(){
var _1c8=$HISTORY_UPDATE;
$HISTORY_UPDATE=true;
this.UpdatePageURL();
$HISTORY_UPDATE=_1c8;
},UpdatePageURL:function(){
var _1c9=this.GetURLSubPart(true);
var _1ca=this.GetBookmarkQuery();
var _1cb=Encryptor.Encrypt(_1ca);
if(!_1cb||!_1ca||_1ca==""||_1cb==""||_1ca=="SF:"||(ResultHandler.CurrentPage==1&&_1ca=="CP:1")||_1ca=="O:BESTSUGGESTION"||_1ca=="O:BESTSUGGESTION;SF:"||(ResultHandler.CurrentPage==1&&_1ca=="CP:1;O:BESTSUGGESTION;SF:")||(ResultHandler.CurrentPage==1&&_1ca=="CP:1;O:BESTSUGGESTION")){
return;
}
if(_1cb==this.CurrentQuery){
return;
}
this.UpdateIFrameURL(_1cb);
try{
location.hash="#"+_1cb;
}
catch(exc){
}
if(document.title!=$WINDOW_TITLE){
document.title=$WINDOW_TITLE;
}
},UpdateIFrameURL:function(_1cc){
if(!this.ModernBrowser||$IS_IE){
$IFRAME_LOADED=false;
if(!$id(this.IFrameName)){
return;
}
var _1cd=this.GetURLSubPartForIFrame(true);
$id(this.IFrameName).setAttribute("src",_1cd+"?"+_1cc);
}else{
$IFRAME_LOADED=true;
}
},RemoveEventListener:function(item){
for(var i=0;this.Listeners&&i<this.Listeners.length;i++){
if(this.Listeners[i]==item){
this.Listeners.splice(i,1);
}
}
},AddEventListener:function(func){
if(!this.Listeners){
this.Listeners=new Array();
}
this.Listeners.push(func);
},Notify:function(){
this.AlertEventListeners();
},AlertEventListeners:function(){
for(var i=0;this.Listeners&&i<this.Listeners.length;i++){
if(this.Listeners[i]){
try{
this.Listeners[i](i);
}
catch(e){
this.Listeners.splice(i,1);
}
}
}
},CheckForChangesNotSelfProduced:function(){
if(!BookmarkUtil.ModernBrowser||document.title!=$WINDOW_TITLE){
document.title=$WINDOW_TITLE;
}
if($HISTORY_UPDATE){
return;
}
if(!$IFRAME_LOADED){
return;
}
BookmarkUtil.CheckChangesReal();
},CheckChangesReal:function(){
var _1d2="";
if(!this.ModernBrowser&&$IS_IE){
if(!$id(this.IFrameName)){
return;
}
_1d2=this.GetURLSubPartForIFrame(false);
}else{
_1d2=this.GetURLSubPart(false);
}
var _1d3=Encryptor.Encrypt(this.GetBookmarkQuery());
if(_1d2!=_1d3){
if(_1d2==null||!_1d2.length||_1d2.length<0){
}
var _1d4=$HISTORY_UPDATE;
$HISTORY_UPDATE=true;
this.ReadKeys(_1d2);
if(!this.ModernBrowser&&$IS_IE){
this.UpdatePageURL();
}
this.AlertEventListeners();
$HISTORY_UPDATE=false;
}
return;
},GetBookmarkQuery:function(){
var _1d5="";
var _1d6=false;
for(var i=0;this.Keys&&i<this.Keys.length;i++){
if(this.Keys[i]==null){
continue;
}
if(_1d6){
_1d5+=";";
}
_1d5+=this.Keys[i].Name+":"+this.EncodeString(this.Keys[i].Value);
_1d6=true;
}
return _1d5;
},GetURLSubPartForIFrame:function(_1d8){
return this.GetURLSubPartSpecifySplitter(_1d8,true);
},GetURLSubPart:function(_1d9){
return this.GetURLSubPartSpecifySplitter(_1d9,false);
},GetURLSubPartSpecifySplitter:function(_1da,_1db){
var _1dc=null;
if(_1db){
if(!$id(this.IFrameName)){
return;
}
if($id(this.IFrameName).contentWindow){
_1dc=$id(this.IFrameName).contentWindow.document.location.toString();
}
}else{
_1dc=location.toString();
}
var _1dd=new Array();
if(_1db){
_1dd=_1dc.split("?");
}else{
_1dd=new Array();
var loc=location.toString();
var locH=location.hash;
_1dd[0]=loc.replace(locH,"");
_1dd[1]=locH.replace("#","");
}
if(!_1dd||_1dd.length<=0){
return "";
}
if(_1da){
return _1dd[0];
}else{
if(_1dd.length>1){
var _1e0="";
for(var i=1;i<_1dd.length;i++){
_1e0+=_1dd[i];
}
return _1e0;
}
return "";
}
},EncodeString:function(_1e2){
if(!_1e2||!_1e2.toString){
return _1e2;
}
_1e2=_1e2.toString();
if(_1e2.replace){
_1e2=_1e2.replace(/;/g,"%21");
_1e2=_1e2.replace(/ /g,"%20");
}
return _1e2;
},DecodeString:function(_1e3){
_1e3=_1e3.toString();
if(_1e3.replace){
_1e3=_1e3.replace(/%21/g,";");
_1e3=_1e3.replace(/%20/g," ");
}
return _1e3;
}};
function BookmarkKey(name,_1e5){
this.Name=name;
this.Value=_1e5;
}
ErrorHandler={Init:function(){
Event.Observe($tag("body")[0],"mousedown",ErrorHandler.OnBodyClick,false);
},Show:function(_1e6,_1e7){
if(!Browser.IsModern()){
PageHandler.SelectBoxes.Hide();
}
if(typeof (_1e6)!="undefined"){
var _1e8=[];
if(typeof (_1e6)=="string"){
_1e8.push(_1e6);
}else{
_1e8=_1e6;
}
var _1e9=$create("div");
_1e9.className="errorContainer";
if(_1e7){
_1e9.className+=" errorContainerWarning";
}
var _1ea=$create("div");
_1ea.className="errorShadingTop";
var _1eb=$create("div");
_1eb.className="errorShadingCenter";
var _1ec=$create("div");
_1ec.className="errorShadingBottom";
var _1ed=$create("div");
_1ed.className="errorHolderTop";
var _1ee=$create("div");
_1ee.className="errorHolderBottom";
var _1ef=$create("div");
_1ef.className="errorHolder";
if(_1e7){
_1ef.className+=" errorHolderWarning";
}
var _1f0=$create("div");
_1f0.className="errorContent";
var _1f1=null;
if(_1e7){
_1f1=$create("h1",Language.ErrorMessages.GetMessage("ERROR_WARNING_HEADER"));
}else{
_1f1=$create("h1",Language.ErrorMessages.GetMessage("ERROR_HEADER"));
}
var _1f2=$create("a",Language.Texts.GetText("CLOSE"));
_1f2.className="close";
_1f2.setAttribute("href","#");
var _1f3=$create("a","ok");
_1f3.className="ok";
_1f3.setAttribute("href","#");
Event.Observe(_1f2,"click",ErrorHandler.Hide,false);
Event.Observe(_1f3,"click",ErrorHandler.Hide,false);
_1f0.appendChild(_1f1);
_1f0.appendChild(_1f2);
_1f0.appendChild(_1f3);
var _1e6=$create("ul");
for(var i=0;i<_1e8.length;i++){
var text=_1e8[i].replace(/%s%/g,"<strong>");
text=text.replace(/%e%/g,"</strong>");
var _1f6=$create("li");
_1f6.innerHTML=text;
_1e6.appendChild(_1f6);
}
_1f0.appendChild(_1e6);
_1ef.appendChild(_1ed);
_1ef.appendChild(_1ee);
_1ef.appendChild(_1f0);
_1e9.appendChild(_1ea);
_1e9.appendChild(_1eb);
_1e9.appendChild(_1ec);
_1e9.appendChild(_1ef);
$tag("body")[0].appendChild(_1e9);
var _1f7=_1f0.offsetHeight;
_1eb.style.height=_1f7+10+"px";
_1ef.style.height=_1f7+2+"px";
_1ee.style.height=(_1f7-77<0?0:_1f7-77)+"px";
var _1f8=document.documentElement.scrollTop;
var _1f9=PageHandler.Dimensions().height;
var _1fa=PageHandler.Dimensions().width;
var _1fb=Element.Dimensions(_1e9).height;
var _1fc=Element.Dimensions(_1e9).width;
_1e9.style.top=_1f8+(_1f9/2)-(_1fb/2)+"px";
_1e9.style.left=(_1fa/2)-(_1fc/2)+"px";
_1f3.focus();
}
},Hide:function(e){
Event.Stop(e);
var _1fe=$parent("div",Event.GetElement(e)).parentNode.parentNode;
Element.Remove(_1fe,true);
if(!Browser.IsModern()){
PageHandler.SelectBoxes.Show();
}
return false;
},OnBodyClick:function(e){
var _200=Event.GetElement(e);
var _201=$class("errorContainer",$tag("body")[0],"div");
var _202=false;
for(var i=_201.length-1;i>=0;i--){
Element.Remove(_201[i],true);
_202=true;
}
if(_202&&!Browser.IsModern()){
PageHandler.SelectBoxes.Show();
}
}};
function ValidationHandler(_204,_205,_206){
this.IsExploring=false;
this.ValidationFields=_206?_206:new Array();
this.FormName=_205;
this.SearchType=_204;
this.ErrorMessages=new Array();
this.ValidationInProgress=null;
this.ValidationResult=null;
this.ValidationStarted=null;
this.ValidationMaxWait=3000;
this.IntervalItem=null;
}
ValidationHandler.prototype.Init=function(){
this.IsExploring=false;
if($id("filterHolder")){
this.IsExploring=true;
}
if($id(this.FormName)){
Event.Observe($id(this.FormName),"submit",this.ValidateForm.bind(this),false);
}else{
ErrorHandler.Show(Language.ErrorMessages.GetMessage("INIT_ERR"));
}
};
ValidationHandler.prototype.ValidateForm=function(e){
if(this.IsExploring){
session.Page.ValidationHandler.ValidateForm_REAL();
if(session.Page.ValidationHandler.ValidationResult){
return true;
}else{
Event.Stop(e);
return false;
}
}
Event.Stop(e);
var _208=false;
if(session.Page.ValidationHandler.ValidationResult!=null){
_208=!session.Page.ValidationHandler.ValidationResult;
}else{
if(!session.Page.ValidationHandler.ValidationInProgress){
session.Page.ValidationHandler.ValidationInProgress=true;
session.Page.ValidationHandler.ValidationStarted=new Date().getTime();
session.Page.ValidationHandler.ValidationResult=null;
this.IntervalItem=setInterval(session.Page.ValidationHandler.ValidateForm_REAL.bind(this),200);
_208=true;
}else{
_208=true;
}
}
if(_208){
Event.Stop(e);
return false;
}
return true;
};
ValidationHandler.prototype.ValidateForm_REAL=function(e){
if(!this.IsExploring){
var _20a=new Date().getTime();
if(_20a-this.ValidationStarted>this.ValidationMaxWait){
clearInterval(this.IntervalItem);
resetEvent=true;
}
if(session.Page.DestinationField&&session.Page.DestinationField.InRequest){
return false;
}
clearInterval(this.IntervalItem);
}
this.ValidationInProgress=false;
this.ValidationResult=true;
this.IsExploring=this.FormName=="filterHolder";
try{
var _20b=false;
this.ErrorMessages=new Array();
if(this.FormName=="searchHolder"){
_20b=true;
}
var _20c=true;
if($id("searchContent")&&$id("searchContent").value==""){
_20c=false;
}
if(!_20c){
ErrorHandler.Show(this.ErrorMessages,true);
this.ValidationResult=false;
}
}
catch(ex){
if(ErrorHandler.Show){
generalError=new Array();
generalError.push(Language.ErrorMessages.GetMessage("GENERAL_ERROR_MESSAGE"));
ErrorHandler.Show(generalError,true);
}else{
alert(Language.ErrorMessages.GetMessage("GENERAL_ERROR_MESSAGE"));
}
this.ValidationResult=false;
}
if(this.ValidationResult){
this.ValidationResult=null;
$id(this.FormName).submit();
}else{
this.ValidationResult=null;
}
};
FieldValidation={RequiredTextField:function(_20d,_20e,_20f){
var text=null;
if($id(_20d)&&$id(_20d).value){
text=$id(_20d).value;
}
if((_20e&&text==_20e)||(_20f&&text==_20f)){
text=null;
}
return (text&&text.length>0);
},ValidDestination:function(_211){
var _212=(session.Page.Name!="destination");
if(!$id(_211)){
return false;
}
if(!this.RequiredTextField(_211)){
return !_212;
}
var _213=$id(_211).value;
var _214=_213.split(";");
if(_214.length<5||!_214[4]||!_214[4].lastIndexOf){
return false;
}
var _215="XXX";
switch(session.Page.Name){
case "home":
case "destination":
_215="I";
break;
case "hotel":
_215="H";
break;
case "flighthotel":
_215="D";
break;
case "package":
_215="P";
break;
case "car":
_215="C";
break;
case "flight":
_215="F";
break;
}
if(_214[4].lastIndexOf(_215)<0){
return false;
}
return true;
},RequiredDropDown:function(_216,_217,_218){
if(!$id(_216)||!$id(_216).options||$id(_216).options.length<=0){
return false;
}
if(!_217&&!_218){
return true;
}
try{
var _219=FormHandler.SelectBox.GetValue($id(_216));
if(!_219){
return false;
}
if(_217&&_217==_219){
return false;
}
if(_218&&_218==_219){
return false;
}
return true;
}
catch(ex){
return false;
}
return false;
}};
var fullList=false;
var calleFlashMovie;
function rolloverCountry(_21a){
if(_21a){
loadCallObject();
if(calleFlashMovie){
calleFlashMovie.rolloverCountry(_21a);
}
rolloverLink(_21a);
}
}
function rolloutCountry(_21b){
if(_21b){
loadCallObject();
if(calleFlashMovie){
calleFlashMovie.rolloutCountry(_21b);
}
rolloutLink(_21b);
}
}
function loadCallObject(){
if($.browser.msie&&window){
calleFlashMovie=window["flashmap"];
}else{
if(document){
calleFlashMovie=document["flashmap"];
}
}
}
function receiveData(map){
backtoFlash(eval(map+"_list"),eval(map+"_names"),eval(map+"_weather"),eval(map+"_hits"));
}
function backtoFlash(list,_21e,_21f,hits){
loadCallObject();
if(calleFlashMovie){
calleFlashMovie.sendBack(list,_21e,_21f,hits);
}
}
function visitCountry(_221){
}
function rolloverLink(_222){
try{
if(_222){
if($("#country_"+_222+"-s").length>0){
changeClassName($("#country_"+_222+"-s"),"countryLinkHover");
}
if($("#country_"+_222+"-b").length>0){
changeClassName($("#country_"+_222+"-b"),"countryLinkHover");
}
}
}
catch(exc){
alert(exc);
}
}
function rolloutLink(_223){
try{
if(_223){
if($("#country_"+_223+"-s").length>0){
changeClassName($("#country_"+_223+"-s"),"countryLinkHover",true);
}
if($("#country_"+_223+"-b").length>0){
changeClassName($("#country_"+_223+"-b"),"countryLinkHover",true);
}
}
}
catch(exc){
alert(exc);
}
}
function changeClassName(_224,_225,_226){
try{
if(_224){
if(!_226){
_224.addClass(_225);
}else{
_224.removeClass(_225);
}
}
}
catch(exc){
alert(exc);
}
}
function changeContinent(_227,_228){
var _229=false;
var _22a=null;
var _22b=null;
if($id("pnl"+_227)){
_22a=$("#pnl"+_227);
}
if($id("pnl"+_228)){
_22b=$("#pnl"+_228);
}
if(_22a){
_22a.hide();
}
if(_22b){
_22b.show();
}
var link=$("#lnkMoreDest");
if(link){
link.hide();
link.unbind("click").click(function(e){
e.preventDefault();
SwitchFullList("lstBig"+_228);
});
var _22e=$(_22b).children("li");
var _22f=0;
if($("#lstBig"+_228)){
var _230=$("#lstBig"+_228);
if(_230){
_22f=_230.children("ul").children("li").size();
}
}
if(_22b&&_22e.length>0){
_229=true;
if(_22f>_22e.length){
link.show();
}
}
}
if(fullList){
SwitchFullList("lstBig"+_227);
}
return _229;
}
function SwitchFullList(_231){
if($("#fullListHolder")){
var _232=$("#fullListHolder");
if(_232){
_232.hide();
var _233=$("#"+_231);
if(fullList){
_232.hide();
if(_233){
_233.hide();
}
fullList=false;
}else{
_232.show();
if(_233){
_233.show();
}
fullList=true;
}
}
}
}
function InitContinentsFlash(){
var _234=$("#fullListHolder");
if(_234){
_234.hide();
if(!changeContinent(null,"cEU")){
}
}
}
function SwitchActiveCountry(){
var id=$("#listCountries > div > ul:visible").attr("id");
if(id){
id=id.replace("pnl","");
changeContinent(null,id);
}
}
$.vsbValues=[];
(function($){
$.fn.ccVacation=function(_237){
try{
var _238={filters:null};
var _237=$.extend(_238,_237);
$("#Filters").text(Language.Texts.GetText("VSB_LOADING"));
$.ajax({type:"POST",url:$BASE+"AjaxFeeds/VacationSearchBox.aspx",data:"Filters="+_237.filters+"&ReturnFilters=false&Type=search",dataType:"json",success:function(data){
if(data&&data.AjaxError){
var _23a=data.AjaxError.Text;
var _23b=false;
ErrorHandler.Show(_23a,_23b);
return;
}
if(data){
var _23c=new ResultObject();
_23c.SetProperties(data);
var _23d=$("ul.master:first");
_23d.children().remove();
for(var i=0;i<_23c.FilterBlocks.length;i++){
var pre="";
switch(i){
case 0:
pre="B";
break;
case 1:
pre="C";
break;
case 2:
pre="D";
break;
}
_23c.FilterBlocks[i].Render(_23d,pre);
$("input[name='"+_23c.FilterBlocks[i].Name+"']").click(function(){
$.process(this);
});
}
}
for(var j=0;j<data.Values.lenght;j++){
$.vsbValues["A"+data.Values[i].Ind[0]+"B"+data.Values[i].Ind[1]+"C"+data.Values[i].Ind[2]+"D"+data.Values[i].Ind[3]]=data.Values[i].Amt;
}
$.process();
},error:function(data){
var _242=data.Text;
var _243=false;
ErrorHandler.Show(_242,_243);
return;
}});
}
catch(err){
}
};
})(jQuery);
(function($){
$.storeFilters=function(){
var _245="";
var _246="";
if($("#ddlCountries").length>0){
var item=$("#ddlCountries :selected")[0];
if(item!=undefined&&item!=null){
_246=item.id;
_245=item.value+(item.value!=""?";":"");
}
}
var _248=$(".rdItem:checked");
for(var i=0;i<_248.length;i++){
if(_248[i].checked){
if(_248[i].id!="otherMonth"){
_246=_246+_248[i].id;
_245=_245+_248[i].value+(_248[i].value!=""?";":"");
}else{
var _24a=$("#ddlOtherMonth :selected")[0];
_246=_246+_24a.id;
_245=_245+_24a.value+(_24a.value!=""?";":"");
}
}
}
$("#searchFilters").val(_245);
return _246;
},$.process=function(e){
if(e==undefined||e.id!="otherMonth"){
var _24c=$.storeFilters();
var _24d=$("#Filters")[0];
var _24e=$.vsbValues[_24c]!=undefined?$.vsbValues[_24c]:"";
if(_24e!=""){
$("#Filters").attr({disabled:""});
$("#Filters").text(number_format(_24e*1,0,",",".")+Language.Texts.GetText("VSB_AMOUNT_TEXT"));
}else{
$("#Filters").attr({disabled:"disabled"});
$("#Filters").text(Language.Texts.GetText("VSB_NO_RESULTS"));
}
}else{
$("#"+e.id).next("label").remove();
$("#ddlOtherMonth").fadeIn("fast");
$.process();
}
};
})(jQuery);
function ResultObject(){
this.CountryBlocks=[];
this.FilterBlocks=[];
}
ResultObject.prototype.SetProperties=function(data){
for(var i=0;i<data.FilterBlocks.length;i++){
if(data.FilterBlocks[i].Code=="GENERIC_LOCATION_INTERNAL:COUNTRIES"||data.FilterBlocks[i].Code=="LOCATIONS_CONTINENT/COUNTRY"){
var _251=new FilterBlock(data.FilterBlocks[i]);
var _252=$("#ddlCountries");
if($("#ddlCountries > option").length==0){
var _253=$("<option></option>").html(Language.Texts.GetText("VSB_ALL_DESTINATIONS")).attr({selected:"selected",id:"A0",value:""});
_252.append(_253);
for(var j=0;j<_251.Filters.length;j++){
var _255=new Filter(_251.Filters[j]);
var item=$("<option></option>").val(_255.Code).html(_255.Name).attr({id:"A"+_255.IndexValue,selected:(_255.Selected?"selected":"")});
_252.append(item);
}
}
}else{
this.FilterBlocks.push(new FilterBlock(data.FilterBlocks[i]));
}
}
for(var i=0;i<data.Values.length;i++){
$.vsbValues["A"+data.Values[i].Ind[0]+"B"+data.Values[i].Ind[1]+"C"+data.Values[i].Ind[2]+"D"+data.Values[i].Ind[3]]=data.Values[i].Amt;
}
};
function FilterBlock(){
this.Code=null;
this.InternalCode=null;
this.Name=null;
this.Filters=[];
}
function FilterBlock(data){
this.Code=data.Code;
this.InternalCode=data.InternalCode;
this.Name=data.Name;
this.Filters=[];
for(var i=0;i<data.Filters.length;i++){
this.Filters.push(new Filter(data.Filters[i]));
}
}
FilterBlock.prototype.Render=function(_259,pre){
var item=$("<li></li>").addClass("child");
var dl=$("<dl></dl>").append($("<dt></dt>").html(this.Name));
dl.append($("<dd></dd>").append($("<input type=\"radio\" class=\"rdItem\" name=\""+this.Name+"\" id=\""+pre+"0\" checked value=\"\"/>")).append($("<label></label>").html(Language.Texts.GetText("VSB_DEFAULT_LABEL")).attr({"for":(pre+"0")})));
var _25d=false;
var _25e=false;
if(pre!="B"){
for(var i=0;i<this.Filters.length;i++){
if($.browser.msie){
if(this.Filters[i].Selected){
_25d=true;
}
}
dl.append($("<dd></dd>").append($("<input type=\"radio\" class=\"rdItem\" name=\""+this.Name+"\" id=\""+pre+this.Filters[i].IndexValue+"\" "+(this.Filters[i].Selected?"checked":"")+" value=\""+this.Filters[i].Code+"\" />")).append($("<label></label>").html(this.Filters[i].Name).attr({"for":pre+this.Filters[i].IndexValue})));
}
item.append(dl);
}else{
var _260=$("<select style=\"display:none\">&nbsp;</select>").attr({id:"ddlOtherMonth"}).addClass("");
for(var i=0;i<this.Filters.length;i++){
if(this.Filters[i].Selected){
_25d=true;
if(i>4){
_25e=true;
}
}
if(i<5){
dl.append($("<dd></dd>").append($("<input type=\"radio\" class=\"rdItem\" name=\""+this.Name+"\" id=\""+pre+this.Filters[i].IndexValue+"\" "+(this.Filters[i].Selected?"checked":"")+" value=\""+this.Filters[i].Code+"\" />")).append($("<label></label>").html(this.Filters[i].Name).attr({"for":pre+this.Filters[i].IndexValue})));
}else{
_260.append($("<option></option>").val(this.Filters[i].Code).html(this.Filters[i].Name).attr({id:pre+this.Filters[i].IndexValue,selected:(this.Filters[i].Selected?"selected":"")}));
}
}
var _261=$("<dd></dd>");
_261.append($("<input id=\"otherMonth\" type=\"radio\" class=\"rdItem\" name=\""+this.Name+"\" group=\""+pre+"\""+(_25e?"checked":"")+" />")).append($("<label></label>").html(Language.Texts.GetText("VSB_OTHERMONTH_LABEL")).attr({"for":"otherMonth"}));
_261.append(_260);
dl.append(_261);
item.append(dl);
}
_259.append(item);
if(_25d){
$("#"+pre+"0").attr({checked:false});
}
if(_25e){
$("#otherMonth").next("label").remove();
$("#ddlOtherMonth").fadeIn("fast");
}
$("#ddlOtherMonth").change(function(){
$.process();
});
};
function Filter(){
this.Code=null;
this.Name=null;
this.Count=0;
this.Selected=false;
this.IndexValue=0;
}
function Filter(data){
this.Code=data.Code;
this.Name=data.Name;
this.Count=data.Count;
this.Selected=data.Selected;
this.IndexValue=data.IndexValue;
}
function Value(){
this.Key=null;
this.Amt=0;
}
function Value(data){
this.Key="A"+data.Ind[0]+"B"+data.Ind[1]+"C"+data.Ind[2]+"D"+data.Ind[3];
this.Amt=data.Amt;
}
$(document).ready(function(){
try{
if($("#vacationSearchBox").length>0){
$("#ddlCountries >option").remove();
$(".master > li").remove();
$("#ccVacation").ccVacation({filters:null});
$("#ddlCountries").change(function(){
$.process(this);
$("#ccVacation").ccVacation({filters:$("#searchFilters").val()});
});
}
}
catch(err){
}
});
Analytics={UseAsyncMethod:true,GetQueryParameter:function(_264){
if(!_264||_264==""){
return "?";
}else{
return "&";
}
},GetQuery:function(_265){
if(!type){
return Analytics.GetQueryParameters();
}else{
if(type=="result"){
return Analytics.GetResultQueryParamters();
}
}
},GetQueryParameters:function(){
var _266="";
if(session.Data.MinDepartureDate){
_266+=Analytics.GetQueryParameter(_266)+"date="+session.Data.MinDepartureDate.format("%mm-%yyyy");
}
if(session.Data.SearchString||session.Data.BackupSearchString){
_266+=Analytics.GetQueryParameter(_266)+"search="+(session.Data.SearchString?session.Data.SearchString:session.Data.BackupSearchString);
}
if(FilterHandler.ActiveFilters&&FilterHandler.ActiveFilters.length>0){
_266+=Analytics.GetQueryParameter(_266)+"filter="+FilterHandler.ActiveFilters[FilterHandler.ActiveFilters.length-1].Id;
_266+=Analytics.GetQueryParameter(_266)+"numberOfFilters="+FilterHandler.ActiveFilters.length;
}
if(ResultHandler&&ResultHandler.NumberOfResults){
_266+=Analytics.GetQueryParameter(_266)+"numberOfResults="+ResultHandler.NumberOfResults;
}
return _266;
},GetResultQueryParameters:function(){
var _267="";
if(session.Data.CurrentPage){
_267+=Analytics.GetQueryParameter(_267)+"page="+session.Data.CurrentPage;
}
if(session.Data.ResultsPerPage){
_267+=Analytics.GetQueryParameter(_267)+"resultsPerPage="+session.Data.ResultsPerPage;
}
if(ResultHandler&&ResultHandler.NumberOfResults){
_267+=Analytics.GetQueryParameter(_267)+"numberOfResults="+ResultHandler.NumberOfResults;
}
return _267;
},TrackAccommodation:function(e){
var obj=null;
if(e){
obj=Event.GetElement(e);
}
var _26a=Analytics.GetResultQueryParameters();
if(obj){
var _26b=0;
for(var i=0;i<ResultHandler.Results.length;i++){
if(ResultHandler.Results[i].Id==obj.id.split(";")[1]){
_26b=i+1;
break;
}
}
var _26d=((session.Data.CurrentPage-1)*session.Data.ResultsPerPage)+_26b;
_26a+="&selectedItem="+_26b;
_26a+="&resultNumber="+_26d;
}
Analytics.TrackPage("/accommodatie/"+_26a);
},TrackAccommodationTeaser:function(e){
var obj=null;
if(e){
obj=Event.GetElement(e);
}
if(obj){
var _270=true;
while(_270){
if(!obj.parentNode){
_270=false;
}else{
obj=obj.parentNode;
if(obj.nodeName.toLowerCase()=="div"&&Element.Class.Contains(obj,"detailSection")){
_270=false;
}
}
}
var _271=obj.className;
_271=_271.replace("detailSection","");
_271=_271.Trim();
if(_271=="bestoffer"){
Analytics.TrackBestOffer();
}else{
if(_271=="bestrated"){
Analytics.TrackBestRated();
}else{
if(_271=="popular"){
Analytics.TrackPopular();
}
}
}
}
},TrackPopular:function(){
Analytics.TrackPage("/resultaat/populair/");
},TrackBestRated:function(){
Analytics.TrackPage("/resultaat/best-beoordeeld/");
},TrackBestOffer:function(){
Analytics.TrackPage("/resultaat/beste-aanbieding/");
},TrackOffer:function(_272,_273){
Analytics.TrackPage("/aanbieding/"+_272+"/"+_273+"/");
},TrackPackage:function(id,_275,_276,_277,_278,_279,_27a,year){
Analytics.TrackPage("/outgoing/"+_275+"/?id="+id+"&accommodationType="+_276+"&travelType="+_277+"&price="+_278+"&currency="+_279);
},TrackFilter:function(){
Analytics.TrackPage("/zoeken/"+Analytics.GetQueryParameters());
},TrackSearchVacation:function(_27c){
Analytics.TrackPage("/home-block/?filters="+_27c);
},TrackPage:function(_27d){
if(Analytics.UseAsyncMethod){
if(_gaq){
_gaq.push(["_trackPageview",_27d]);
}
}else{
if(pageTracker){
pageTracker._trackPageview(_27d);
}
}
},TrackEvent:function(_27e,_27f,_280,_281){
if(Analytics.UseAsyncMethod){
if(_gaq){
if(_27e&&_27f&&_280&&_281){
_gaq.push(["_trackEvent",_27e,_27f,_280,_281]);
}else{
if(_27e&&_27f&&_280){
_gaq.push(["_trackEvent",_27e,_27f,_280]);
}else{
if(_27e&&_27f){
_gaq.push(["_trackEvent",_27e,_27f]);
}
}
}
}
}else{
if(pageTracker){
if(_27e&&_27f&&_280&&_281){
pageTracker._trackEvent(_27e,_27f,_280,_281);
}else{
if(_27e&&_27f&&_280){
pageTracker._trackEvent(_27e,_27f,_280);
}else{
if(_27e&&_27f){
pageTracker._trackEvent(_27e,_27f);
}
}
}
}
}
}};
FrameHandler={Frames:[],FramePrefix:"detail;",LastFrame:null,Init:function(){
$("div.wrapper").append($("<ul></ul>").attr({"id":"listFrames"}));
},GetValidId:function(id){
if(id){
id=id.replace(" ","");
id=id.replace("-","");
id=id.replace(":","");
id=id.replace(";","");
id=id.replace(".","");
}
return id;
},FindFrame:function(id){
if(FrameHandler.Frames&&FrameHandler.Frames.length>0){
for(var i=0;i<FrameHandler.Frames.length;i++){
if(FrameHandler.Frames[i].id===FrameHandler.FramePrefix+FrameHandler.GetValidId(id)){
FrameHandler.LastFrame=FrameHandler.Frames[i];
return FrameHandler.Frames[i];
}
}
}
return null;
},GetActiveFrame:function(){
if(FrameHandler.Frames&&FrameHandler.Frames.length>0){
for(var i=0;i<FrameHandler.Frames.length;i++){
var _286=$(FrameHandler.Frames[i]);
if(_286){
var _287=$(_286).parent("li");
if($(_287).is(":visible")){
if($(FrameHandler.Frames[i]).is(":hidden")){
$(FrameHandler.Frames[i]).show();
}
FrameHandler.LastFrame=FrameHandler.Frames[i];
return FrameHandler.Frames[i];
}
}
}
}
return null;
},CreateFrame:function(id,url){
var _28a=$("<iframe>").attr({"id":FrameHandler.FramePrefix+FrameHandler.GetValidId(id),"noresize":"noresize","scrolling":"auto","frameborder":"0","frameBorder":"0","border":"0","marginwidth":"0","marginheight":"0","src":url,"class":"detailFrame"});
FrameHandler.Frames.push(_28a[0]);
FrameHandler.LastFrame=_28a[0];
return _28a[0];
},RemoveFrame:function(_28b){
if(FrameHandler.Frames&&FrameHandler.Frames.length>0){
for(var i=0;i<FrameHandler.Frames.length;i++){
if(_28b.id==FrameHandler.Frames[i].id){
FrameHandler.Frames.splice(i,1);
break;
}
}
}
}};
var activeTab;
var activeTabClass;
function initTabs(){
var list=$("#supplierTabs")[0];
if(list){
for(var i=list.childNodes.length-1;i>=0;i--){
if(!(list.childNodes[i].nodeName.toLowerCase()==="li")){
Element.Remove(list.childNodes[i]);
}
}
}
}
function changeFrame(id,url,_291){
initTabs();
var _292=newWindowSupplierIds.split(";");
var _293=false;
for(var i=0;i<_292.length;i++){
if(_292[i]===_291){
_293=true;
}
}
$("#listFrames > li").hide();
id=FrameHandler.GetValidId(id);
if(!_293){
var _295=FrameHandler.FindFrame(id);
if(!_295){
_295=FrameHandler.CreateFrame(FrameHandler.GetValidId(id),url);
$("#listFrames").append($("<li></li>").append(_295));
window.setTimeout(function(){
var _296=FrameHandler.LastFrame;
if(_296){
if($(_296).is(":hidden")){
var _297=$(changeFrame).parent("li");
var _298=$create("div");
_298.className="error";
_298.appendChild($create("p",Language.Texts.GetText("POPUP_ADBLOCK_NOTICE")));
var _299=$class("suppLogo",$("#"+_296.id.split(";")[1])[0])[0].title;
var link=$create("a","Klik hier om naar de website van "+_299+" te gaan");
link.setAttribute("target","_blank");
link.href=_295.src;
_298.appendChild(link);
var _29b=$create("div");
_29b.className="boxHeader";
_29b.id=_296.id;
_29b.appendChild($create("h2",Language.ErrorMessages.GetMessage("ERROR_HEADER")));
_29b.appendChild(_298);
_297.appendChild(_29b);
Element.Remove(_296,true);
FrameHandler.RemoveFrame(_296);
}
}
},2000);
}
$(_295).parent("li").show();
}else{
var _29c=$("li#error_"+id);
if($(_29c).length==0){
var _29d=$create("li");
_29d.setAttribute("id","error_"+id);
var _29e=$class("suppLogo",$("#"+id)[0])[0].title;
var _29f=$create("div");
_29f.className="error";
_29f.appendChild($create("p",Language.Texts.GetText("POPUP_NEWWINDOW_NOTICE").replace("{0}",url).replace("{1}",id)));
_29d.appendChild(_29f);
$("#listFrames").append(_29d);
$("a#popup_"+id).popupWindow({windowURL:url,centerBrowser:1,location:1,menubar:1,resizable:1,scrollbars:1,status:1,toolbar:1,width:1000,top:138});
}else{
_29c.show();
}
$("a#popup_"+id).click();
}
}
function activateTab(_2a0){
var _2a1=$("#"+FrameHandler.GetValidId(_2a0))[0];
if(_2a1){
if(activeTab!=null&&activeTabClass!=null){
activeTab.className=activeTabClass;
}
activeTabClass=_2a1.className;
activeTab=_2a1;
_2a1.className="active "+_2a1.className;
var list=$("#supplierTabs")[0];
if(list){
for(var i=0;i<list.childNodes.length;i++){
if(list.childNodes[i]==activeTab&&i>=numberOfVisibleTabs){
var _2a4=null;
for(var j=0;j<i;j++){
_2a4=list.childNodes[0].cloneNode(true);
if(_2a4&&_2a4.nodeName.toLowerCase()==="li"){
Element.Remove(list.childNodes[0],true);
if(_2a4.className){
}
list.appendChild(_2a4);
}else{
Element.Remove(list.childNodes[0],false);
}
}
break;
}
}
}
}
}
function hover(_2a6){
Element.Class.Add(_2a6,"hover");
}
function unHover(_2a7){
Element.Class.Remove(_2a7,"hover");
}
function closeFrame(url){
try{
if(e){
e.preventDefault();
}
}
catch(err){
}
var _2a9=null;
if(url){
_2a9=url;
}else{
var _2aa=FrameHandler.GetActiveFrame();
if(_2aa){
var _2ab=$("#"+_2aa.id)[0];
_2a9=_2aa.src;
}
}
if(_2a9){
document.location=_2a9;
}
return false;
}
function closeWindow(){
window.close();
}
function moveLeft(){
var list=$("#supplierTabs")[0];
if(list){
var _2ad=$("#supplierTabs > li");
var _2ae=_2ad[0];
var _2af=null;
_2af=list.lastChild;
_2ae=list.firstChild;
list.appendChild(_2ae);
}
}
function moveRight(){
var list=$("#supplierTabs")[0];
if(list){
var _2b1=$("#supplierTabs > li");
var _2b2=_2b1[_2b1.length-1];
var _2b3=null;
_2b3=list.firstChild;
_2b2=list.lastChild;
list.insertBefore(_2b2,list.firstChild);
}
}
function minMax(){
if($("#headerContent").is(":visible")){
$("#headerContent").slideUp();
$("div.h25").slideDown("fast");
$("div.minimize").hide();
}else{
$("#headerContent").slideDown("normal");
$("div.h25").slideUp("fast",hideh25);
}
}
function hideh25(){
$("div.minimize").show();
}
(function($){
$.fn.popupWindow=function(_2b5){
$(this).bind("click",{},function(){
$.fn.popupWindow.defaultSettings={centerBrowser:0,centerScreen:0,height:500,left:0,location:0,menubar:0,resizable:0,scrollbars:0,status:0,width:500,windowName:null,windowURL:null,top:0,toolbar:0};
settings=$.extend({},$.fn.popupWindow.defaultSettings,_2b5||{});
if($.browser.msie){
settings.height=document.documentElement.clientHeight-(window.screenTop+settings.top);
}else{
settings.height=window.innerHeight-(window.screenY+(window.outerHeight-window.innerHeight)+settings.top);
}
if(settings.height<330){
settings.height=700;
}
var _2b6="height="+settings.height+",width="+settings.width+",toolbar="+settings.toolbar+",scrollbars="+settings.scrollbars+",status="+settings.status+",resizable="+settings.resizable+",location="+settings.location+",menuBar="+settings.menubar;
settings.windowName=this.name||settings.windowName;
settings.windowURL=this.href||settings.windowURL;
var _2b7,_2b8;
if(settings.centerBrowser){
if($.browser.msie){
_2b7=(window.screenTop)+settings.top;
_2b8=window.screenLeft+((((document.body.offsetWidth+20)/2)-(settings.width/2)));
}else{
_2b7=window.screenY+(window.outerHeight-window.innerHeight)+settings.top;
_2b8=window.screenX+(((window.outerWidth/2)-(settings.width/2)));
}
window.open(settings.windowURL,settings.windowName,_2b6+",left="+_2b8+",top="+_2b7).focus();
}else{
if(settings.centerScreen){
_2b7=(screen.height-settings.height)/2;
_2b8=(screen.width-settings.width)/2;
window.open(settings.windowURL,settings.windowName,_2b6+",left="+_2b8+",top="+_2b7).focus();
}else{
window.open(settings.windowURL,settings.windowName,_2b6+",left="+settings.left+",top="+settings.top).focus();
}
}
return false;
});
};
})(jQuery);

