var console;
if(console==undefined){console=new function(){this.log=function(){}
}
}var MultiSliderFilter=Slider.extend({options:{onChange:Class.empty,onComplete:function(){if(!this.disabled){var newLimitPos=this.toPosition([this.step[0],this.step[1]]);
this.drag1.options.limit.x=[this.options.offset,newLimitPos[1]];
this.drag2.options.limit.x=[newLimitPos[0],this.max-this.options.offset];
this.filterContainer.sendFilter("&searchFilter.name="+this.options.name+"&minValue="+this.getMin()+"&maxValue="+this.getMax())
}},onTick:function(pos){this.knob1.setStyle(this.p,pos[0]);
this.knob2.setStyle(this.p,pos[1])
},init:function(container){this.input=$E("input",container);
$E(".slider",container).removeClass("hide")
},mode:"horizontal",steps:100,offset:0,valueOffset:0,snap:false,scaleSize:1,name:""},initialize:function(container,filterContainer,options){this.setOptions(options);
this.filterContainer=filterContainer;
this.container=container;
this.container.removeClass("hide");
this.options.init(container);
var knobs=$ES("div div",container);
this.knob1=knobs[0];
this.knob2=knobs[1];
this.previousChange=[-1,-1];
this.previousEnd=[-1,-1];
this.step=[-1,-1];
var mod,offset;
this.z="x";
this.p="left";
mod={x:"left",y:false};
offset="offsetWidth";
var sliderbase=$E("div.slider",container);
this.max=sliderbase[offset]-this.knob1[offset]+(this.options.offset*2);
this.half=this.knob1[offset]/2;
this.getPos=sliderbase["get"+this.p.capitalize()].bind(this.sliderbase);
if(this.options.input){this.options.input.setStyle("border","none")
}knobs.setStyles({left:0,position:"relative"});
var lim1={};
lim1[this.z]=[-this.options.offset,this.max-this.options.offset];
var lim2={};
lim2[this.z]=[-this.options.offset,this.max-this.options.offset];
this.drag1=new Drag.Base(this.knob1,{limit:lim1,modifiers:mod,snap:0,onStart:function(){this.draggedKnob(0)
}.bind(this),onDrag:function(){this.draggedKnob(0)
}.bind(this),onComplete:function(){this.draggedKnob(0);
this.end(0)
}.bind(this)});
this.drag2=new Drag.Base(this.knob2,{limit:lim2,modifiers:mod,snap:0,onStart:function(){this.draggedKnob(1)
}.bind(this),onDrag:function(){this.draggedKnob(1)
}.bind(this),onComplete:function(){this.draggedKnob(1);
this.end(1)
}.bind(this)});
if(this.options.initialize){this.options.initialize.call(this)
}this.set(this.options.initialPosition);
this.previousChange=this.options.initialPosition
},set:function(step){this.step=[step[0].limit(this.options.valueOffset,this.options.steps+this.options.valueOffset),step[1].limit(this.options.valueOffset,this.options.steps+this.options.valueOffset)];
this.checkStep(1);
var pos=this.toPosition(this.step);
this.knob1.setStyle(this.p,pos[0]);
this.knob2.setStyle(this.p,pos[1]);
this.drag1.value.now.x=-this.options.offset;
this.drag2.value.now.x=this.max-this.options.offset;
var newLimitPos=this.toPosition([this.step[0],this.step[1]]);
this.drag1.options.limit.x=[this.options.offset,newLimitPos[1]];
this.drag2.options.limit.x=[newLimitPos[0],this.max-this.options.offset];
this.fireEvent("onChange",{min:this.step[0],max:this.step[1]});
this.options.hasChanged=false;
return this
},draggedKnob:function(i){i==0?knob=this.drag1:knob=this.drag2;
this.step[i]=this.toStep(knob.value.now[this.z]);
this.checkStep(i)
},checkStep:function(i){if(this.previousChange[i]!=this.step[i]){this.previousChange[i]=this.step[i];
this.fireEvent("onChange",{min:this.step[0],max:this.step[1]})
}},end:function(knobNumber){if(this.options.snap){var pos=this.toPosition(this.step);
this.knob1.setStyle(this.p,pos[0]);
this.knob2.setStyle(this.p,pos[1]);
this.drag1.value.now.x=pos[0];
this.drag2.value.now.x=pos[1]
}for(var i=0,l=this.step.length;
i<l;
i++){if(this.previousEnd[i]!=this.step[i]){this.previousEnd[i]=this.step[i];
this.fireEvent("onComplete",this.step)
}}if(knobNumber==0){this.knob1.setStyle("zIndex",10);
this.knob2.setStyle("zIndex",9)
}else{this.knob1.setStyle("zIndex",9);
this.knob2.setStyle("zIndex",10)
}this.options.hasChanged=true
},disable:function(){this.drag1.options.savedLimit=this.drag1.options.limit.x;
this.drag2.options.savedLimit=this.drag2.options.limit.x;
this.drag1.options.limit.x=[this.drag1.value.now.x-0.01,this.drag1.value.now.x+0.01];
this.drag2.options.limit.x=[this.drag2.value.now.x+0.01,this.drag2.value.now.x-0.01];
this.disabled=true
},enable:function(){this.drag1.options.limit.x=this.drag1.options.savedLimit;
this.drag2.options.limit.x=this.drag2.options.savedLimit;
this.disabled=false
},restore:function(){this.set(this.options.restorePosition)
},toStep:function(position){return Math.round((position+this.options.offset)/this.max*this.options.steps)+this.options.valueOffset
},toPosition:function(step){return[this.max*(step[0]-this.options.valueOffset)/this.options.steps,this.max*(step[1]-this.options.valueOffset)/this.options.steps]
},getMax:function(){return this.step[0]>this.step[1]?this.step[0]:this.step[1]
},getMin:function(){return this.step[0]<this.step[1]?this.step[0]:this.step[1]
}});
var CheckboxFilter=new Class({initialize:function(checkbox,filterContainer){this.filterContainer=filterContainer;
this.checkbox=checkbox;
this.initialState=checkbox.checked;
this.parent=checkbox.getParent();
checkbox.addEvent("click",function(e){var name="searchFilter."+this.checkbox.id;
var state=this.checkbox.checked;
this.filterContainer.sendFilter("&name="+name+"&value="+this.checkbox.value+"&checked="+state+"&"+name+"="+(state?"on":"off"))
}.bind(this))
},set:function(){this.checkbox.value=true
},restore:function(){this.checkbox.checked=false
},disable:function(){this.checkbox.setProperty("disabled","disabled")
},enable:function(){this.checkbox.removeProperty("disabled")
}});
var Filter=new Class({options:{url:""},initialize:function(options){this.options.url=options.url;
this.options.isVeMapSearch=options.isVeMapSearch;
this.sliderSettings.price.steps=options.maxPriceAbsolute-options.minPriceAbsolute;
this.sliderSettings.price.valueOffset=options.minPriceAbsolute;
this.sliderSettings.price.currency=options.currency;
this.sliderSettings.price.restorePosition=[options.minPriceAbsolute,options.maxPriceAbsolute];
this.sliderSettings.price.initialPosition=[options.minPrice,options.maxPrice];
this.sliderSettings.stars.initialPosition=[options.minNumberOfStars,options.maxNumberOfStars];
this.sliderSettings.totalRating.initialPosition=[options.minEvaluationResult,options.maxEvaluationResult];
if(map){map.filter=this
}this.filter=[];
if(options.isVeMapSearch){var multiSliders=["stars","totalRating"];
$("price").setStyle("display","none")
}else{var multiSliders=["price","stars","totalRating"]
}multiSliders.each(function(item){this.filter.push(new MultiSliderFilter($(item),this,this.sliderSettings[item]))
},this);
$$("ul.jsToggle input").each(function(item){this.filter.push(new CheckboxFilter(item,this))
},this);
$$("div.teaser span.restore").addEvent("click",function(ev){new Event(ev).stop();
this.filter.each(function(item){item.restore()
},this);
this.sendFilter("&restore=true")
}.bind(this)).removeClass("hide");
$("jsFree").addClass("hide");
$$(".sliderBox label").setStyle("width","auto");
$E("h4.jsFirst").removeClass("jsFirst")
},sliderSettings:{price:{onChange:function(){var min=this.getMin();
var max=this.getMax();
var text="";
min==max?text=max+" "+this.options.currency:text=min+"-"+max+" "+this.options.currency;
this.options.input.value=text
},snap:false,name:"price"},stars:{onChange:function(){var min=this.getMin();
var max=this.getMax();
min==max?$$("#starsMax","#min").addClass("hide"):$$("#starsMax","#min").removeClass("hide");
if(min==0){$("starsMin").addClass("notRated");
$("starsMin").setStyle("width",9)
}else{$("starsMin").removeClass("notRated");
$("starsMin").setStyle("width",min*9)
}$("starsMax").setStyle("width",max*9)
},init:function(container){$ES(".hide",container).removeClass("hide");
$E("input",container).addClass("hide")
},steps:5,valueOffset:0,snap:true,name:"stars",restorePosition:[0,5]},totalRating:{onChange:function(){this.options.input.value=this.getMin()+" - "+this.getMax()+"/10"
},steps:10,valueOffset:0,snap:false,name:"totalRating",restorePosition:[0,10]}},sendFilter:function(values){var hotellistFrame=window.hotellist||parent.hotellist;
if(hotellistFrame){hotellistFrame.location.href=this.options.url+values
}if(map){map.renderPushpins()
}},disableFilter:function(){this.filter.each(function(item){item.disable()
})
},enableFilter:function(){this.filter.each(function(item){item.enable()
})
}});
Filter.implement(new Options);
var Map=new Class({options:{minimizeText:"",maximizetext:"",generateContent:"",topLeftLat:0,topLeftLong:0,bottomRightLat:0,bottomRightLon:0,centerLat:0,centerLon:0,zoom:0,centerZoom:false,mapStyle:"",controlLanguage:"en",routingPopupUrl:""},initialize:function(options){this.setOptions(options);
this.isInit=false;
this.isShown=false;
this.filter=false;
this.view=null;
this.isFreefly=false;
this.iconSize=50;
this.zoomChange=true;
this.mapContainer=$("map");
this.mapOverlay=$("mapOverlay").setStyle("opacity",0.4);
if($("toggleMap")){$("toggleMap").removeClass("hide");
this.toggleButton=$E("#toggleMap .button");
this.toggleButton.getParent().addEvent("click",function(){this.isShown?this.close():this.open()
}.bind(this));
this.toggleButtonText=this.toggleButton.getChildren()[0].getChildren()[0]
}DynamicMap.isMapExpanded(function(isOpen){if(isOpen){map.open()
}});
$("toggleLegend").addEvent("click",function(){$("legend").toggleClass("hide");
$E("strong",this).toggleClass("open")
})
},open:function(){if(!this.isShown){if(this.toggleButtonText){this.toggleButtonText.setText(this.options.minimizeText)
}this.mapContainer.removeClass("hide");
$("mapFooter").removeClass("hide");
this.isShown=true;
if(!this.isInit){this.initIframe()
}if($("toggleMap")){$("toggleMap").removeClass("minimizeMap")
}}$("mapExpanded").value=true;
DynamicMap.setMapExpanded(true,function(data){})
},close:function(){if(this.isShown){if(this.toggleButtonText){this.toggleButtonText.setText(this.options.maximizeText)
}this.mapContainer.addClass("hide");
$("mapFooter").addClass("hide");
this.isShown=false;
$("toggleMap").addClass("minimizeMap");
if($("searchForm").getParent().hasClass("availabilityForm")){$("searchForm").getParent().removeClass("availabilityForm");
$("searchForm").getParent().removeClass("show");
$("jsToggleSearch").removeClass("open")
}}$("mapExpanded").value=false;
DynamicMap.setMapExpanded(false,function(data){})
},initIframe:function(){var iframe=new Element("iframe",{src:this.options.iframeUrl,name:"iframeMap",id:"mapIframe",scrolling:"no",frameborder:0,framespacing:0});
iframe.injectInside($("map"));
iframe.addEvent("load",function(){var f=function(){var dashbord=new Dashboard((window.iframeMap||parent.iframeMap),map.veMap)
};
f.delay(window.opera?100:0)
})
},init:function(veMap){this.isInit=true;
this.mapCoordinate={};
this.veMap=veMap;
this.veMap.LoadMap();
var iframe=(window.iframeMap||parent.iframeMap);
iframe.document.getElementsByTagName("body")[0].unload=function(){iframe.map.veMap.Dispose()
};
map.mapCoordinate.topLeftLat=map.options.topLeftLat;
map.mapCoordinate.topLeftLon=map.options.topLeftLon;
map.mapCoordinate.bottomRightLat=map.options.bottomRightLat;
map.mapCoordinate.bottomRightLon=map.options.bottomRightLon;
map.mapCoordinate.centerLat=map.options.centerLat;
map.mapCoordinate.centerLon=map.options.centerLon;
map.mapCoordinate.zoom=map.options.zoom;
map.mapCoordinate.centerZoom=map.options.centerZoom;
if(map.mapCoordinate.centerZoom&&map.mapCoordinate.centerLat&&map.mapCoordinate.centerLon){this.veMap.SetCenterAndZoom(iframe.getVELatLong(map.mapCoordinate.centerLat,map.mapCoordinate.centerLon),map.mapCoordinate.zoom)
}else{this.veMap.SetMapView([iframe.getVELatLong(this.options.topLeftLat,this.options.topLeftLon),iframe.getVELatLong(this.options.bottomRightLat,this.options.bottomRightLon)])
}this.veMap.Hide3DNavigationControl();
this.veMap.HideControl(iframe.document.getElementById("MSVE_navAction_FlatlandMapMode"));
this.veMap.HideControl(iframe.document.getElementById("MSVE_navAction_View3DMapMode"));
this.veMap.AttachEvent("onendzoom",this.storeMapBoundsHandler);
this.veMap.AttachEvent("onendpan",this.storeMapBoundsHandler);
this.veMap.AttachEvent("onchangemapstyle",this.storeChangeMapStyleHandler);
this.veMap.AttachEvent("onmouseover",this.openPushPinHandler);
this.veMap.SetMouseWheelZoomToCenter(false);
this.veMap.SetMapStyle((window.iframeMap||parent.iframeMap).getVEMapStyleShaded());
this.veMap.SetScaleBarDistanceUnit((window.iframeMap||parent.iframeMap).getVEDistanceUnit());
this.storeMapBoundsHandler();
if(window.gecko){$(veMap.mapelement).addEvent("mousewheel",function(e){new Event(e).stop()
})
}this.mwsLayer=new MWSLayer((window.iframeMap||parent.iframeMap),this.veMap);
this.mwsLayer.init();
if(parent.location.protocol=="http:"){this.extTileLayer=new BingMapsExtTileLayer((window.iframeMap||parent.iframeMap),this.veMap)
}this.routing=new Routing((window.iframeMap||parent.iframeMap),this.veMap,this.options.routingPopupUrl,this.options.routingOptions);
this.routing.init();
this.mwsLayer.enableCheckBoxes(true);
this.toggleSearch.initAvailibiltyButton();
map.renderPushpins()
},disable:function(){this.mapOverlay.removeClass("hide")
},enable:function(){this.mapOverlay.addClass("hide")
},storeMapBoundsHandler:function(){var hotellistFrame=window.hotellist||parent.hotellist;
if(map.mapCoordinate){if(map.veMap.GetMapStyle()!=(window.iframeMap||parent.iframeMap).getVEMapStyle("Birdseye")&&map.veMap.GetMapStyle()!=(window.iframeMap||parent.iframeMap).getVEMapStyle("BirdseyeHybrid")){if(hotellistFrame){if($defined(hotellistFrame.toggleMapsearch)){hotellistFrame.toggleMapsearch(true)
}}var view=map.veMap.GetMapView();
if(!map.filter.options.isVeMapSearch){map.checkDestinationIsInView(view)
}map.mapCoordinate.topLeftLat=view.TopLeftLatLong.Latitude;
map.mapCoordinate.topLeftLon=view.TopLeftLatLong.Longitude;
map.mapCoordinate.bottomRightLat=view.BottomRightLatLong.Latitude;
map.mapCoordinate.bottomRightLon=view.BottomRightLatLong.Longitude;
map.mapCoordinate.centerLat=map.veMap.GetCenter().Latitude;
map.mapCoordinate.centerLon=map.veMap.GetCenter().Longitude;
map.mapCoordinate.zoom=map.veMap.GetZoomLevel();
DynamicMap.storeMapCoordinate(map.mapCoordinate,function(data){});
map.renderPushpins()
}else{if(hotellistFrame){hotellistFrame.toggleMapsearch(false)
}}}},checkDestinationIsInView:function(view){if(!this.orginalDestination){this.orginalDestination=$E("#summary h2 span").getText()
}if(this.options.topLeftLat<view.BottomRightLatLong.Latitude||this.options.topLeftLon>view.BottomRightLatLong.Longitude||this.options.bottomRightLat>view.TopLeftLatLong.Latitude||this.options.bottomRightLon<view.TopLeftLatLong.Longitude){$E("#summary h2 span").setText(SEEMAP)
}else{$E("#summary h2 span").setText(this.orginalDestination)
}},storeChangeMapStyleHandler:function(){if(map.mapCoordinate){map.mapCoordinate.style=map.veMap.GetMapStyle();
map.mapCoordinate.zoom=map.veMap.GetZoomLevel();
map.mapCoordinate.center=map.veMap.GetCenter();
DynamicMap.storeMapCoordinate(map.mapCoordinate,function(data){})
}},openPushPinHandler:function(e){if(e&&e.elementID){selectedShape=map.veMap.GetShapeByID(e.elementID);
if($defined(selectedShape)){if((window.iframeMap||parent.iframeMap).isVEPushpin(selectedShape.GetType())){if($defined(selectedShape.hotel_keylist)){map.veMap.ShowInfoBox(selectedShape);
selectedShape.SetDescription("<div id='"+e.elementID+"_div'>"+map.options.generateContent+"</div>");
if(this.timeOut){clearTimeout(this.timeOut)
}this.timeOut=setTimeout(function(){DynamicMap.getPushpinHtml(selectedShape.hotel_keylist,function(data){var el=(window.iframeMap||parent.iframeMap).document.getElementById(e.elementID+"_div");
if(el){el.innerHTML=data;
var p=$(el);
if(p){for(var i=0;
i<7;
i++){p=p.getParent()
}var top=p.getTop();
var bubbleOffset=window.gecko?0:30;
var maxTop=360-p.getSize().size.y+bubbleOffset;
var speechOffset=window.gecko?10:20;
if(top>maxTop){p.setStyle("top",maxTop);
p.getLast().setStyle("top",top-maxTop+speechOffset)
}}}})
},0)
}}}}},renderPushpins:function(){if(map.veMap&&map.veMap.GetMapStyle()!=(window.iframeMap||parent.iframeMap).getVEMapStyle("Birdseye")&&map.veMap.GetMapStyle()!=(window.iframeMap||parent.iframeMap).getVEMapStyle("BirdseyeHybrid")){if(map.isFreefly){map.checkForHotels()
}else{map.getHotelsJS()
}}},checkForHotels:function(){if(!map.isBusy){map.filter.disableFilter();
DynamicMap.getPointListJS(map.mapCoordinate.topLeftLat,map.mapCoordinate.topLeftLon,map.mapCoordinate.bottomRightLat,map.mapCoordinate.bottomRightLon,map.veMap.GetZoomLevel(),function(jsResult){if(jsResult.count<parseInt(map.options.availabilityCheckCount)){map.toggleSearch.availibiltyButton.removeClass("selectDisabled");
$E("#mapFooter p").setText(CHECKPOSSIBLE)
}else{if($("searchForm").getParent().hasClass("availabilityForm")){$("searchForm").getParent().removeClass("show")
}map.toggleSearch.availibiltyButton.addClass("selectDisabled");
$E("#mapFooter p").setText(CHECKNOTPOSSIBLE);
$E("strong",$("checkAvailability")).addClass("open")
}map.veMap.GetShapeLayerByIndex(0).DeleteAllShapes();
eval(jsResult.result)
});
map.filter.enableFilter()
}},getHotelsJS:function(){map.filter.disableFilter();
var offset=map.getOffSetValues(map.iconSize);
DynamicMap.getHotelListJS(map.veMap.GetMapView().TopLeftLatLong.Latitude,map.veMap.GetMapView().TopLeftLatLong.Longitude,map.veMap.GetMapView().BottomRightLatLong.Latitude,map.veMap.GetMapView().BottomRightLatLong.Longitude,offset[0],offset[1],map.veMap.GetZoomLevel(),function(jsResult){map.veMap.GetShapeLayerByIndex(0).DeleteAllShapes();
eval(jsResult.result);
if(jsResult.fullcount<map.options.availabilityCheckCount&&jsResult.unavailablecount>0){map.toggleSearch.availibiltyButton.removeClass("selectDisabled");
$E("#mapFooter p").setText(CHECKPOSSIBLE)
}else{$("searchForm").getParent().removeClass("show");
$("searchForm").getParent().removeClass("availabilityForm");
map.toggleSearch.availibiltyButton.addClass("selectDisabled");
$E("#mapFooter p").setText(CHECKNOTPOSSIBLE);
$E("strong",$("checkAvailability")).addClass("open");
$("jsToggleSearch").removeClass("open")
}if(map.zoomChange){map.filter.enableFilter();
map.zoomChange=false
}});
map.filter.enableFilter()
},getOffSetValues:function(offset){offset=offset||50;
var center=map.veMap.GetCenter();
var pixel=map.veMap.LatLongToPixel(center);
pixel.x+=offset;
pixel.y+=offset;
var new_val=map.veMap.PixelToLatLong(pixel);
return[Math.abs(center.Latitude-new_val.Latitude),Math.abs(center.Longitude-new_val.Longitude)]
},clearHotelList:function(){map.isFreefly=true;
map.checkForHotels();
map.mwsLayer.enableCheckBoxes(false);
map.mwsLayer.resetIsOnMap();
map.mwsLayer.reinitMWSLayer()
},showSelected:function(inputs){var hotelKeys=[];
var numbersInList=[];
var isZoomIn;
$A(inputs).each(function(item){hotelKeys.push($defined(item.hotelKey)?item.hotelKey:item.getProperty("value"));
var tmp=$defined(item.indexInList)?item.indexInList:item.getPrevious().getText().replace(".","");
numbersInList.push(tmp);
isZoomIn=$defined(item.zoomIn)?item.zoomIn:false
});
scrollTo(0,100);
map.open();
function tryToGetVEShapeLayer(){if(parent&&(window.iframeMap||parent.iframeMap)&&(window.iframeMap||parent.iframeMap).getVEShapeLayer&&map.veMap){if(!map.selectedPushPinLayer){map.selectedPushPinLayer=(window.iframeMap||parent.iframeMap).getVEShapeLayer();
map.veMap.AddShapeLayer(map.selectedPushPinLayer)
}map.selectedPushPinLayer.DeleteAllShapes();
if(!$defined(isZoomIn)){isZoomIn=false
}if(isZoomIn){zoomLevel=map.veMap.GetZoomLevel();
if(zoomLevel<=17){map.veMap.SetZoomLevel(zoomLevel+2)
}}if(hotelKeys&&numbersInList&&hotelKeys.length>0&&numbersInList.length>0){DynamicMap.createDetailPushpins(hotelKeys,numbersInList,function(jsResult){eval(jsResult)
})
}}else{setTimeout(tryToGetVEShapeLayer,100)
}}tryToGetVEShapeLayer()
},tryToGetVEShapeLayer:function(){}});
Map.implement(new Options);
var map=false;
var ToggleSearch=new Class({initialize:function(isVeMapSearch){if(!isVeMapSearch){if(window.ie6){var iframe=new Element("iframe",{id:"jsToggleSearchIframe",src:flyoutIframeUrl});
iframe.injectBefore($("searchForm"))
}$("jsToggleSearch").addEvent("click",function(e){new Event(e).stop();
if(!this.getParent().getParent().hasClass("disabled")){$("searchForm").getParent().toggleClass("show");
this.toggleClass("open")
}});
$("searchForm").addEvent("click",function(){if($("jsToggleSearchIframe")){$("jsToggleSearchIframe").style.height=this.getSize().size.y
}})
}if($("jsToggleSearchDisabled")){$("jsToggleSearchDisabled").addEvent("click",function(e){new Event(e).stop()
})
}$E(".close",$("searchForm")).addEvent("click",function(){if($("jsToggleSearchDisabled")){$("searchForm").getParent().removeClass("availabilityForm")
}$("searchForm").getParent().removeClass("show");
$("jsToggleSearch").removeClass("open");
if(window.ie){var veMapSearch=$$("div.veMapSearch");
if(veMapSearch){veMapSearch.setStyle("height","")
}}});
$("checkAvailability2").addEvent("click",function(e){new Event(e).stop();
if($("jsToggleSearchDisabled")){$("searchForm").getParent().removeClass("availabilityForm")
}$("searchForm").getParent().removeClass("show");
$("jsToggleSearch").removeClass("open");
if(window.ie){var veMapSearch=$$("div.veMapSearch");
if(veMapSearch){veMapSearch.setStyle("height","")
}}});
map.toggleSearch=this
},initAvailibiltyButton:function(){this.availibiltyButton=$("checkAvailability");
this.availibiltyButton.addEvent("click",function(){this.toggleAvailibiltyButton()
}.bind(this))
},toggleAvailibiltyButton:function(){if(!this.availibiltyButton.hasClass("selectDisabled")){if($("searchForm").getParent().hasClass("show")){if(!$("searchForm").getParent().hasClass("availabilityForm")){$("searchForm").getParent().addClass("availabilityForm")
}else{$("searchForm").getParent().removeClass("show");
if($("jsToggleSearchDisabled")){$("searchForm").getParent().removeClass("availabilityForm")
}$("jsToggleSearch").removeClass("open")
}if(window.ie){var veMapSearch=$$("div.veMapSearch");
if(veMapSearch){veMapSearch.setStyle("height","")
}}}else{$("searchForm").getParent().addClass("show");
$("searchForm").getParent().addClass("availabilityForm");
if(window.ie){var veMapSearch=$$("div.veMapSearch")[0];
if(veMapSearch){$("searchForm").getSize().size.y;
veMapSearch.setStyle("height",(window.ie6?200:315)+$("searchForm").getSize().size.y)
}}}}}});