booking.utils={ie:{}};booking.promotions={};if(!gClientIsIE5&&GBrowserIsCompatible()){booking.BuildInfoWindow=function(_1){this.item_=_1;};booking.BuildInfoWindow.prototype.it=function(){GEvent.removeListener(this.item_.marker.handleBuildInfoWindow);this.item_.marker.infoWindow=new booking.InfoWindow(this.item_);booking.map.obj.addOverlay(this.item_.marker.infoWindow);this.item_.mouseoverHandle=GEvent.addListener(this.item_.marker,"mouseover",function(){this.infoWindow.show();});this.item_.mouseoutHandle=GEvent.addListener(this.item_.marker,"mouseout",function(){this.infoWindow.hide();});GEvent.trigger(this.item_.marker,"mouseover");};booking.Go=function(_2){this.url_=_2;};booking.Go.prototype.to=function(){document.location=this.url_;};booking.InfoWindow=function(_3){this.record_=_3;};booking.InfoWindow.prototype=new GOverlay();booking.InfoWindow.prototype.initialize=function(_4){var _5=document.createElement("div"),h=document.createElement("h3"),p=document.createElement("p"),className="BInfoWindow "+this.record_.icon_type,text;_5.className=className;_5.id=this.record_.id;if(this.record_.b_class){var _6=document.createElement("img");_6.setAttribute("src","/pics/static/"+this.record_.b_class+"sterren-small.png");_6.setAttribute("alt",this.record_.b_class+" "+(this.record_.b_class==1?booking.env.star:booking.env.stars));h.appendChild(_6);}if(this.record_.b_image_url){var _7=document.createElement("img");_7.setAttribute("src",this.record_.b_image_url);_7.setAttribute("alt","thumbnail photo");p.appendChild(_7);}if(this.record_.b_type.match("hotel")){h.appendChild(document.createTextNode(this.record_.title));text=this.record_.b_description;}else{var _8=document.createElement("span");_8.setAttribute("class","subhead");h.appendChild(document.createTextNode(this.record_.title));h.appendChild(document.createElement("br"));h.appendChild(document.createElement("span"));_8.appendChild(document.createTextNode(this.record_.subhead));h.appendChild(_8);text=this.record_.b_hotelcount+" "+(this.record_.b_hotelcount==1?booking.env.map_hotel:booking.env.map_hotels);}p.appendChild(document.createTextNode(text));_5.appendChild(h);_5.appendChild(p);_4.getPane(G_MAP_FLOAT_PANE).appendChild(_5);this.map_=_4;this.div_=_5;this.p_=p;};booking.InfoWindow.prototype.remove=function(){this.div_.parentNode.removeChild(this.div_);};booking.InfoWindow.prototype.copy=function(){return new booking.InfoWindow(this.record_);};booking.InfoWindow.prototype.redraw=function(_9){if(!_9){return;}};booking.InfoWindow.prototype.show=function(){if(booking.map.container.className.indexOf(booking.map.CLASS_NORMAL)!=-1){booking.map.display.clear();this.position();this.div_.style.visibility="visible";}};booking.InfoWindow.prototype.position=function(){var _a=this.map_.fromLatLngToDivPixel(this.record_.marker.getLatLng()),left="auto",markerType=booking.map.markerTypes[this.record_.icon_type],ddV=document.defaultView?document.defaultView:false,halfwidth=ddV?parseFloat(ddV.getComputedStyle(this.div_,null).width)/2:Math.round(this.div_.offsetWidth/2),height=ddV?parseFloat(ddV.getComputedStyle(this.div_,null).height):this.div_.offsetHeight,bounds=this.map_.getBounds(),pointEN=this.map_.fromLatLngToDivPixel(bounds.getNorthEast()),pointWS=this.map_.fromLatLngToDivPixel(bounds.getSouthWest()),mapInfowindowBounds=new GBounds(),count=0,text=this.p_.lastChild,top=_a.y+markerType.infoWindowAnchor.y-markerType.iconAnchor.y;mapInfowindowBounds.minY=pointEN.y+booking.map.MARGIN_TOP;mapInfowindowBounds.maxX=pointEN.x-booking.map.MARGIN_RIGHT;mapInfowindowBounds.maxY=pointWS.y-booking.map.MARGIN_BOTTOM;mapInfowindowBounds.minX=pointWS.x+booking.map.MARGIN_LEFT;function truncate(_b,_c){_b.nodeValue=_b.nodeValue.slice(0,_b.nodeValue.search(/\s{1}\S+$/))+"\ufffd\ufffd\ufffd";height=ddV?parseFloat(ddV.getComputedStyle(_c,null).height):_c.offsetHeight;}if(top+height>mapInfowindowBounds.maxY){if(_a.y>((mapInfowindowBounds.maxY-mapInfowindowBounds.minY)/2)){top=_a.y-markerType.infoWindowAnchor.y-height;while((top<mapInfowindowBounds.minY)&&(count++<200)){truncate(text,this.div_);top=_a.y-markerType.infoWindowAnchor.y-height;}}else{while((top+height>mapInfowindowBounds.maxY)&&(count++<200)){truncate(text,this.div_);}}}this.div_.style.top=top+=booking.CSS.units.px;if(_a.x+halfwidth>mapInfowindowBounds.maxX){left=mapInfowindowBounds.maxX-(halfwidth*2);}else{if(_a.x-halfwidth<mapInfowindowBounds.minX){left=mapInfowindowBounds.minX;}else{left=_a.x-halfwidth;}}this.div_.style.left=left+booking.CSS.units.px;};booking.InfoWindow.prototype.hide=function(){this.div_.style.visibility="hidden";};booking.map={description:"Object-literal namespace for sitewide Google Maps.",version:"1.1.7",ZOOM_TARGET_HOTEL_PREVIEW:12,ZOOM_TARGET_HOTEL_NORMAL:13,controls:{},CLASS_PREVIEW:"preview",CLASS_NORMAL:"normal",mapType:(booking.env.b_googlemaps_maptype=="satellite")?G_SATELLITE_MAP:false,MARGIN_TOP:30,MARGIN_RIGHT:0,MARGIN_BOTTOM:30,MARGIN_LEFT:72};booking.map.box=(booking.env.b_bbox_southwest_latitude&&booking.env.b_bbox_southwest_longitude&&booking.env.b_bbox_northeast_latitude&&booking.env.b_bbox_northeast_longitude)?new GLatLngBounds(new GLatLng(booking.env.b_bbox_southwest_latitude,booking.env.b_bbox_southwest_longitude),new GLatLng(booking.env.b_bbox_northeast_latitude,booking.env.b_bbox_northeast_longitude)):new GLatLngBounds();booking.map.center=(booking.env.b_latitude&&booking.env.b_longitude)?new GLatLng(booking.env.b_latitude,booking.env.b_longitude):booking.map.box.getCenter();var placesonmap;if(booking.map.box.isEmpty()){booking.promotions=mapitems;for(var i in booking.promotions){if(booking.promotions.hasOwnProperty(i)&&(typeof booking.promotions[i]=="object")){var promo=booking.promotions[i];if((booking.env.b_action!="searchresults"&&promo.b_type=="hotel_available")||(booking.env.b_action=="country"&&promo.b_type=="city")){booking.map.box.extend(new GLatLng(promo.b_latitude,promo.b_longitude));}}}booking.map.center=booking.map.box.getCenter();}booking.map.computeZoom=function(){this.boundsZoomLevel=this.obj.getBoundsZoomLevel(this.box);var _d=(booking.map.container.className.indexOf(booking.map.CLASS_PREVIEW)!=-1)?this.ZOOM_TARGET_HOTEL_PREVIEW:this.ZOOM_TARGET_HOTEL_NORMAL;this.boundsZoomLevel=_d+Math.round((this.boundsZoomLevel-_d)/2);};booking.map.setCenter=function(_e,_f,_10){this.obj.setCenter(_e?_e:this.center,_f?_f:this.boundsZoomLevel,_10?_10:this.mapType);};booking.map.addControls=function(){booking.map.controls.GLargeMapControl=new GLargeMapControl();booking.map.controls.GScaleControl=new GScaleControl();booking.map.controls.GMapTypeControl=new GMapTypeControl();for(var i in booking.map.controls){if(booking.map.controls.hasOwnProperty(i)){booking.map.obj.addControl(booking.map.controls[i]);}}};booking.map.removeControls=function(){for(var i in booking.map.controls){if(booking.map.controls.hasOwnProperty(i)){booking.map.obj.removeControl(booking.map.controls[i]);}}};booking.map.close=function(){if(booking.map.display.subject){GEvent.trigger(booking.map.display.subject.marker,"mouseout");booking.map.display.subject=null;}if(booking.map.container.className.indexOf(booking.map.CLASS_NORMAL)!=-1){booking.map.minimize();}else{booking.map.container.style.display="none";}return false;};booking.map.focus=function(_13){booking.map.obj.panTo(_13.latLng);GEvent.trigger(_13.marker,"mouseover");};booking.map.display=function(_14){if(booking.map.container.className.indexOf(booking.map.CLASS_PREVIEW)!=-1){booking.map.maximize();}else{booking.map.container.style.display="block";}if(!booking.map.display.initialized){booking.map.display.initialize();booking.map.display.initialized=true;}booking.map.display.clear();if(_14){if(booking.promotions[_14]||booking.placemarks){booking.map.display.subject=booking.promotions[_14]?booking.promotions[_14]:booking.placemarks[_14];booking.map.focus(booking.map.display.subject);}else{booking.map.display.subjectID=_14;}}else{booking.map.obj.panTo(booking.map.center);}return false;};booking.map.display.clear=function(){if(booking.map.display.subject){GEvent.trigger(booking.map.display.subject.marker,"mouseout");}};booking.map.display.initialize=function(){booking.map.processPlacemarks();};booking.map.initialize=function(){booking.map.show=GEvent.addListener(booking.map.obj,"click",booking.map.display);booking.map.computeZoom();booking.map.setCenter();booking.map.obj.disableDragging();if(gClientIsIE55){booking.map.shadow.style.display="none";}};booking.map.maximize=function(){if(gClientIsIE55){booking.map.shadow.style.display="block";}booking.map.obj.enableDragging();GEvent.removeListener(booking.map.show);booking.map.container.className=booking.map.CLASS_NORMAL;if(booking.map.container.currentStyle&&(booking.map.container.currentStyle.position!="fixed")){booking.map.container.style.position="absolute";booking.map.container.style.className=booking.map.CLASS_NORMAL+" IE6";booking.map.container.style.top="275px";booking.map.container.style.left="300px";}booking.map.obj.checkResize();booking.map.computeZoom();booking.map.setCenter();booking.map.zoom.normal=booking.map.obj.getZoom();booking.map.addControls();};booking.map.minimize=function(){booking.map.removeControls();booking.map.container.className=booking.map.CLASS_PREVIEW;if(booking.map.container.currentStyle&&(booking.map.container.currentStyle.position!="static")){booking.map.container.style.position="static";}booking.map.obj.checkResize();booking.map.initialize();};booking.map.markerTypes={};booking.map.Marker=function(_15){if(!_15){_15={};}this.image=_15.image?_15.image:this.image;this.shadow=_15.shadow?_15.shadow:this.shadow;this.iconSize=_15.iconSize?_15.iconSize:this.iconSize;this.shadowSize=_15.shadowSize?_15.shadowSize:this.shadowSize;this.iconAnchor=_15.iconAnchor?_15.iconAnchor:this.iconAnchor;this.infoWindowAnchor=_15.infoWindowAnchor?_15.infoWindowAnchor:(this.infoWindowAnchor?this.infoWindowAnchor:this.iconAnchor);this.printImage=_15.printImage?_15.printImage:(this.printImage?this.printImage:this.image);this.mozPrintImage=_15.mozPrintImage?_15.mozPrintImage:(this.mozPrintImage?this.mozPrintImage:this.image);this.printShadow=_15.printShadow?_15.printShadow:(this.printShadow?this.printShadow:this.shadow);this.transparent=_15.transparent?_15.transparent:this.transparent;this.imageMap=_15.imageMap?_15.imageMap:this.imageMap;this.maxHeight=_15.maxHeight?_15.maxHeight:this.maxHeight;this.dragCrossImage=_15.dragCrossImage?_15.dragCrossImage:this.dragCrossImage;this.dragCrossSize=_15.dragCrossSize?_15.dragCrossSize:this.dragCrossSize;this.dragCrossAnchor=_15.dragCrossAnchor?_15.dragCrossAnchor:this.dragCrossAnchor;};booking.map.Marker.prototype=new GIcon();booking.map.Marker.prototype.image="/pics/static/markers/marker-hotel.png";booking.map.Marker.prototype.shadow="/pics/static/markers/marker-shadow-hotel.png";booking.map.Marker.prototype.iconSize=new GSize(17,20);booking.map.Marker.prototype.shadowSize=new GSize(22,16);booking.map.Marker.prototype.iconAnchor=new GPoint(8.5,20);booking.map.Marker.prototype.infoWindowAnchor=new GPoint(8.5,20);booking.map.Marker.prototype.printImage=undefined;booking.map.Marker.prototype.mozPrintImage=undefined;booking.map.Marker.prototype.printShadow=undefined;booking.map.Marker.prototype.transparent="";booking.map.Marker.prototype.imageMap=[];booking.map.Marker.prototype.maxHeight=0;booking.map.Marker.prototype.dragCrossImage="";booking.map.Marker.prototype.dragCrossSize=new GSize(0,0);booking.map.Marker.prototype.dragCrossAnchor=new GPoint(0,0);booking.map.SmallMarker=function(){};booking.map.SmallMarker.prototype=new booking.map.Marker({image:"/pics/static/markers/marker-city.png",shadow:"/pics/static/markers/marker-shadow-city.png",iconSize:new GSize(9,9),shadowSize:new GSize(15,12),iconAnchor:new GPoint(4.5,4.5),infoWindowAnchor:new GPoint(4.5,9)});booking.map.ZoomRange=function(min,max){this.min=min?min:Math.NEGATIVE_INFINITY;this.max=max?max:Math.POSITIVE_INFINITY;};booking.map.markerTypes.hotel=new booking.map.Marker();booking.map.markerTypes.hotel.zoomRange=new booking.map.ZoomRange(11);booking.map.markerTypes.hotel_current=new booking.map.Marker({image:"/pics/static/markers/marker-hotel-current.png"});booking.map.markerTypes.hotel_current.zoomRange=new booking.map.ZoomRange(4);booking.map.markerTypes.hotel_available=new booking.map.Marker({image:"/pics/static/markers/marker-hotel.png"});booking.map.markerTypes.hotel_available.zoomRange=new booking.map.ZoomRange(10);booking.map.markerTypes.hotel_searchresults=new booking.map.Marker({image:"/pics/static/markers/marker-hotel-other.png"});booking.map.markerTypes.hotel_searchresults.zoomRange=new booking.map.ZoomRange(12);booking.map.markerTypes.airport=new booking.map.Marker({image:"/pics/static/markers/marker-airport.png"});booking.map.markerTypes.airport.zoomRange=new booking.map.ZoomRange(6);booking.map.markerTypes.landmark=new booking.map.Marker({image:"/pics/static/markers/marker-landmark.png"});booking.map.markerTypes.landmark.zoomRange=new booking.map.ZoomRange(12);booking.map.markerTypes.city=new booking.map.SmallMarker();booking.map.markerTypes.city.zoomRange=new booking.map.ZoomRange(4,16);booking.map.markerTypes.country=new booking.map.Marker({image:"/pics/static/markers/marker-country.png"});booking.map.markerTypes.country.zoomRange=new booking.map.ZoomRange(4,10);booking.map.markerTypes.district=new booking.map.SmallMarker({image:"/pics/static/markers/marker-district.png"});booking.map.markerTypes.district.zoomRange=new booking.map.ZoomRange(7);booking.map.buildMarker=function(_18){_18.latLng=new GLatLng(_18.b_latitude,_18.b_longitude);_18.marker=new GMarker(_18.latLng,{icon:this.markerTypes[_18.icon_type]});this.markerManager.addMarker(_18.marker,this.markerTypes[_18.icon_type].zoomRange.min,this.markerTypes[_18.icon_type].zoomRange.max);if(_18.url){_18.marker.go=new booking.Go(_18.url);GEvent.addListener(_18.marker,"click",function(){this.go.to();});}_18.marker.build=new booking.BuildInfoWindow(_18);_18.marker.handleBuildInfoWindow=GEvent.addListener(_18.marker,"mouseover",function(){if(booking.map.container.className.indexOf(booking.map.CLASS_NORMAL)!=-1){this.build.it();delete this.build;}});};booking.map.processPlacemarks=function(){var _19;for(var i in booking.promotions){_19=booking.promotions[i];_19.latLng=new GLatLng(_19.b_latitude,_19.b_longitude);if(_19.b_type=="hotel"){_19.icon_type="hotel_current";}else{_19.icon_type=_19.b_type;}if(i==booking.env.b_hotel_id){_19.icon_type="hotel_current";}if(!booking.promotions[i].marker){if(_19.b_image_url){_19.b_image_url=_19.b_image_url.replace("square90","square60");}booking.map.buildMarker(_19);}}if(booking.map.display.subjectID){booking.map.display.subject=booking.placemarks[booking.map.display.subjectID];booking.map.focus(booking.map.display.subject);delete booking.map.display.subjectID;}};booking.map.buildNode=function(){booking.map.close_map=document.createElement("a");booking.map.close_map.id="close_map";booking.map.close_map.href="javascript:void(0);";booking.map.close_map.appendChild(document.createTextNode(booking.env.close_map));booking.map.handle=document.createElement("h3");booking.map.handle.className="handle";booking.map.handle.appendChild(booking.map.close_map);booking.map.element=document.createElement("div");booking.map.element.id="google";booking.map.element.appendChild(booking.map.handle);booking.map.shadow=document.createElement("div");booking.map.shadow.id="innermap";booking.map.shadow.appendChild(booking.map.handle);booking.map.shadow.appendChild(booking.map.element);booking.map.show_map=document.createElement("a");booking.map.show_map.className="show_map";booking.map.show_map.appendChild(document.createTextNode(booking.env.show_map));booking.map.showMap=document.createElement("p");booking.map.showMap.id="showMap";booking.map.showMap.appendChild(booking.map.show_map);booking.map.container=document.createElement("div");booking.map.container.className=booking.map.CLASS_PREVIEW;booking.map.container.setAttribute("id","map");booking.map.container.appendChild(booking.map.shadow);booking.map.container.appendChild(booking.map.showMap);booking.featMap=document.getElementById("featMap");booking.featMap.parentNode.appendChild(booking.map.container);};booking.map.buildNode.description="Called from the body element descendant after which the map node should appear.";booking.map.load=function(){booking.map.element=document.getElementById("google");if(!booking.map.element){return;}booking.map.obj=new GMap2(booking.map.element);booking.map.setCenter();if(gClientIsIE55){booking.map.shadow.style.display="none";}booking.map.obj.enableContinuousZoom();booking.map.markerManager=new GMarkerManager(booking.map.obj);booking.map.initialize();booking.map.zoom={preview:booking.map.obj.getZoom()};var i,anchor,href;booking.map.anchors=document.getElementsByTagName("a");for(i=0;i<booking.map.anchors.length;i++){anchor=booking.map.anchors[i];if(anchor.className.indexOf("show_map")!=-1){var _1c=anchor.id.search(/\d/);GEvent.addDomListener(anchor,"click",GEvent.callbackArgs(booking.map,booking.map.display,_1c?anchor.id.substring(_1c):null));anchor.href="javascript:void(0);";}}delete booking.map.anchors;booking.map.element.anchors=booking.map.element.getElementsByTagName("a");for(i=0;i<booking.map.element.anchors.length;i++){anchor=booking.map.element.anchors[i];href=anchor.getAttribute("href");if(href.indexOf("ct=api_logo")!=-1){anchor.className+=" api_logo";}if(href.indexOf("terms_maps")!=-1){anchor.className+=" terms_maps";}}booking.map.display.initialized=false;booking.map.close_map.removeAttribute("onclick");booking.map.close_map.href="javascript:void(0);";GEvent.addDomListener(booking.map.close_map,"click",booking.map.close);Drag.init(booking.map.container);if(!booking.map.display.initialized){booking.map.display.initialize();booking.map.display.initialized=true;}};booking.load=function(){booking.map.load();};GEvent.addDomListener(window,"load",booking.load);GEvent.addDomListener(window,"unload",GUnload);}