var theRules=document.styleSheets[1];var clatitude=0;var clongitude=0;var HotelResults;var HotelImages;var IE6=(typeof document.body.style.maxHeight=="undefined");var isIE=navigator.userAgent.indexOf("MSIE ")>-1;var isOpera=navigator.userAgent.indexOf("Opera")>-1;var isMozilla=navigator.userAgent.indexOf("Firefox")>-1;var clientHeight=(document.all&&!isOpera)?document.documentElement.clientHeight:document.body.clientHeight;var clientWidth=(document.all&&!isOpera)?document.documentElement.clientWidth:document.body.clientWidth;var selectedHotelId=0;var AppAndVer=ImgPath.substring(0,ImgPath.indexOf("/",2));var currentTabIndex=1;var currentTabText=SearchResultsText;function Round(C,D){return Math.round(C*Math.pow(10,D))/Math.pow(10,D)}function toggleLayer(F,E){var H,G;if(document.getElementById){H=document.getElementById(F)}else{if(document.all){H=document.all[F]}else{if(document.layers){H=document.layers[F]}}}G=H.style;showed=(H.offsetWidth!=0&&H.offsetHeight!=0)?true:false;arrowSrc=document.getElementById(F+"_arrow").src.replace("_bott","{0}").replace("_rght","{0}");document.getElementById(F+"_arrow").src=(showed)?arrowSrc.replace("{0}","_rght"):arrowSrc.replace("{0}","_bott");H.style.display=(showed)?"none":"block"}function search_filter(E){var F=Array("price","location","rating");var D=0;for(D=0;D<3;D++){hideDiv("filter_tab_"+F[D]+"_cont");changeCSS("filter_tab_"+F[D],"")}if(E!="close"){showDiv("filter_tab_"+E+"_cont");changeCSS("filter_tab_"+E,"selected");document.getElementById("filter_tab_"+E).blur();hide_comment()}}function hide_comment(){hideDiv("comment_tab_cont")}function show_bbl(){showDiv("comment_tab_cont")}function getPoint(B){return new GLatLng(HotelResults[B].Latitude,HotelResults[B].Longitude)}function getIcon(F){var D=new Array("green","yellow","orange","red","red");var E=new GIcon();E.image=ImgPath+"/SearchResults/GoogleMap/mm_20_"+D[F]+".png";E.shadow=ImgPath+"/SearchResults/GoogleMap/mm_20_shadow.png";E.iconSize=new GSize(12,20);E.shadowSize=new GSize(22,20);E.iconAnchor=new GPoint(6,22);E.infoWindowAnchor=new GPoint(5,1);return E}function getInfoTabs(B){if(B==null){return null}if(B.MinRoomPrice>0&&AvailabilityWasNotFound==0){infoTabs=[new GInfoWindowTab(GeneralTabText,"<div id='thumbs'>"+B.FirstPhotos+"</div><div><h2 class='popH pricetext'>"+B.HotelName+"<br/><img src='"+ImgPath+"/SearchResults/"+(B.StarRating+"").substring(0,1)+"_stars.gif' /></h2><div class='popup'><a href='javascript:void(0);' onclick=\"ShowHotelDetailPopup('"+B.HotelId+"', 1);\" style='font-size:11px;'>"+ViewDetailsText+"</a> </div><div id='address'>"+B.Address+"</div><strong>"+PricesFromText+"&nbsp;<span class='pricetext'>"+Selected_Currency+addCommas((B.MinRoomPrice).toFixed(2)+"")+"</span></strong><div style='padding-top: 10px'><a href='javascript:void(0);' onclick='ShowHotelDetailPopup(\""+B.HotelId+"\", 4);' class='buttonModelSmall'>"+BookNowText+"</a></div><br/></div>"),new GInfoWindowTab(AmenitiesTabText,"<div><h2 class='popH pricetext'>"+B.HotelName+"<br/><img src='"+ImgPath+"/SearchResults/"+(B.StarRating+"").substring(0,1)+"_stars.gif' /></h2><div class='popup'>"+DisplayAmenities(B.Amenities)+"</div></div>")]}else{infoTabs=[new GInfoWindowTab(GeneralTabText,"<div id='thumbs'>"+B.FirstPhotos+"</div><div><h2 class='popH pricetext'><"+B.HotelName+"<br/><img src='"+ImgPath+"/SearchResults/"+(B.StarRating+"").substring(0,1)+"_stars.gif' /></h2><div class='popup'><a href='javascript:void(0);' onclick=\"ShowHotelDetailPopup('"+B.HotelId+"', 1);\" style='font-size:11px;'>"+ViewDetailsText+"</a> </div><div id='address'>"+B.Address+"</div><div style='padding-top: 10px'><a href='HotelDetailsRooms.aspx?HotelId="+B.HotelId+"&TargetHotelId="+B.HotelId+"&SearchDetails="+SearchDetailsString+"&PreviousSearchId="+SearchId+"&Prev="+PrevId+"&ActiveBasketGuid="+ActiveBasketGuid+"' class='buttonModelSmall'>"+CheckAvailabilityAndRatesText+"</a></div><br /></div>"),new GInfoWindowTab(AmenitiesTabText,"<div><h2 class='popH pricetext'>"+B.HotelName+"<br/><img src='"+ImgPath+"/SearchResults/"+(B.StarRating+"").substring(0,1)+"_stars.gif' /></h2><div class='popup'>"+DisplayAmenities(B.Amenities)+"</div></div>")]}return infoTabs}function OpenMarkerTooltip(B){if(B.value!=null&&B.value.ErrorOccurred){DisplaySessionExpired();return }if(ClickedMarker==null||B==null||B.ErrorOccurred){DisplaySessionExpired();return }if(B.value!=null){B=B.value}if(B.HotelId==0){return }if(Hotels.get(B.HotelId)==null){Hotels.put(B.HotelId,B)}HideUpdatingDiv();ClickedMarker.openInfoWindowTabsHtml(getInfoTabs(B))}function LockFilter(){document.getElementById("LockDiv").style.height=document.getElementById("leftCln").offsetHeight-50;document.getElementById("LockDiv").style.display="block"}function getMarkers(E){step=(MaxPrice-MinPrice)/4;batch.clear();for(var F=0;F<E;++F){iconpos=Math.max((MinPrice==null)?0:Math.round((HotelResults[F].MinRoomPrice-MinPrice)/step-0.5),0);var D=new GMarker(getPoint(F),{icon:getIcon(iconpos)});D.HotelId=HotelResults[F].HotelId;D.tooltip='<div class="tooltip"><div style="padding: 10px">'+HotelResults[F].HotelName+"<br/>";if(MinPrice!=null){D.tooltip+='<span class="pricetext">'+FromDotText+"&nbsp;"+Selected_Currency+HotelResults[F].MinRoomPrice+"</span>"}D.tooltip+="</div></div>";GEvent.addListener(D,"click",function(){ClickedMarker=this;if(Hotels.get(this.HotelId)==null){ShowUpdatingDiv();TAN.UserControls.HotelSearchResults.RetrieveHotelDetails(this.HotelId,OpenMarkerTooltip)}else{OpenMarkerTooltip(Hotels.get(this.HotelId))}});GEvent.addListener(D,"mouseover",function(){showTooltip(this)});GEvent.addListener(D,"mouseout",function(){tooltip.style.visibility="hidden"});batch.push(D)}return batch}function showTooltip(L){tooltip.innerHTML=L.tooltip;var G=map.getCurrentMapType().getProjection().fromLatLngToPixel(map.getBounds().getSouthWest(),map.getZoom());var I=map.getCurrentMapType().getProjection().fromLatLngToPixel(L.getPoint(),map.getZoom());var K=L.getIcon().iconAnchor;var J=L.getIcon().iconSize.width;var H=new GControlPosition(G_ANCHOR_BOTTOM_LEFT,new GSize(I.x-G.x-K.x+J+10,-I.y+G.y+K.y-35));H.apply(tooltip);tooltip.style.visibility="visible"}function DisplayAmenities(B){if(B==null){return""}mAmenitiesHTML="<ul style='list-style-type: none;'>";for(i=0;i<B.length;i++){mAmenitiesHTML+="<li>"+B[i].Text+"</li>"}mAmenitiesHTML+="</ul>";return mAmenitiesHTML}function setupMarkers(){if(mgr==null){mgr=new MarkerManager(map,{maxZoom:19})}mgr.clearMarkers();mgr.addMarkers(getMarkers(HotelResults.length),11);mgr.refresh()}String.prototype.replaceAll=function(D,C){return this.split(D).join(C)};function CheckAllStars(B){ShowUpdatingDiv();LockFilter();if(B){for(i=MinStarRating;i<=MaxStarRating;i++){if(document.getElementById("StarFilter"+i)!=null){document.getElementById("StarFilter"+i).checked=B}}}}function UnCheckAllAmenities(B){if(B){ShowUpdatingDiv();LockFilter();for(i=0;i<document.getElementById("amenity_filter_items").childNodes.length;i++){childnodeLI=document.getElementById("amenity_filter_items").childNodes[i];if(childnodeLI!=null&&childnodeLI.id!=null){for(j=0;j<childnodeLI.childNodes.length;j++){childnode=childnodeLI.childNodes[j];if(childnode!=null&&childnode.id!=null&&childnode.id.indexOf("CheckAmenityFilter")==0){childnode.checked=false}}}}TAN.UserControls.HotelSearchResults.ClearFilterByAmenity_AJAX(Filter_callback)}}function UnCheckAllAccountTypes(B){if(B){ShowUpdatingDiv();LockFilter();for(i=0;i<document.getElementById("accomodation_filter_items").childNodes.length;i++){childnodeLI=document.getElementById("accomodation_filter_items").childNodes[i];if(childnodeLI!=null&&childnodeLI.id!=null){for(j=0;j<childnodeLI.childNodes.length;j++){childnode=childnodeLI.childNodes[j];if(childnode!=null&&childnode.id!=null&&childnode.id.indexOf("CheckAccomodationTypeFilter")==0){childnode.checked=false}}}}TAN.UserControls.HotelSearchResults.ClearFilterByAccomodationTypes_AJAX(Filter_callback)}}function EraseFilter(){ShowUpdatingDiv();LockFilter();document.getElementById("AllStars").checked=true;document.getElementById("HotelNameFilter").value="";document.getElementById("NoAmenities").checked=true;if(document.getElementById("AllRegions")!=null){document.getElementById("AllRegions").checked=true}if(mySlider!=null){mySlider.setValue(mySlider.valueDefault,1);mySlider.setValue(mySlider.valueDefault2,2)}for(i=MinStarRating;i<=MaxStarRating;i++){if(document.getElementById("StarFilter"+i)!=null){document.getElementById("StarFilter"+i).checked=false}}for(i=0;i<document.getElementById("amenity_filter_items").childNodes.length;i++){childnodeLI=document.getElementById("amenity_filter_items").childNodes[i];if(childnodeLI!=null&&childnodeLI.id!=null){for(j=0;j<childnodeLI.childNodes.length;j++){childnode=childnodeLI.childNodes[j];if(childnode!=null&&childnode.id!=null&&childnode.id.indexOf("CheckAmenityFilter")==0){childnode.checked=false}}}}if(document.getElementById("region_filter_items")!=null){for(i=0;i<document.getElementById("region_filter_items").childNodes.length;i++){childnodeLI=document.getElementById("region_filter_items").childNodes[i];if(childnodeLI!=null&&childnodeLI.id!=null){for(j=0;j<childnodeLI.childNodes.length;j++){childnode=childnodeLI.childNodes[j];if(childnode!=null&&childnode.id!=null&&childnode.id.indexOf("CheckRegionFilter")==0){childnode.checked=false}}}}}TAN.UserControls.HotelSearchResults.EraseFilter_AJAX(Filter_callback);HideUpdatingDiv()}function CheckAnyRegions(B){if(B){ShowUpdatingDiv();LockFilter();if(document.getElementById("region_filter_items")!=null){for(i=0;i<document.getElementById("region_filter_items").childNodes.length;i++){childnodeLI=document.getElementById("region_filter_items").childNodes[i];if(childnodeLI!=null&&childnodeLI.id!=null){for(j=0;j<childnodeLI.childNodes.length;j++){childnode=childnodeLI.childNodes[j];if(childnode!=null&&childnode.id!=null&&childnode.id.indexOf("CheckRegionFilter")==0){childnode.checked=false}}}}}}TAN.UserControls.HotelSearchResults.EnableAllItems_FilterByLocation_AJAX(Filter_callback)}var MinPrice=SliderLeftPrices[0];var MaxPrice=SliderLeftPrices[SliderLeftPrices.length-1];var LeftPrice=0;var RightPrice=0;var mySlider;var priceSliderInfoTemplate='<span class="toLeft">{v:currency}{v:price1}</span><span class="perSmth" style="font-weight: 100 !important;"></span><span class="toPriceRight">{v:currency}{v:price2}</span>';var SliderChanged=false;var MapMode=false;var sliderChanges1=0;var sliderChanges2=0;var lastKnobPressed=0;var SelectedPopUpTab="";var StartFiltering=false;var TimerID=null;var HotelNameFilterBoolean=true;function DisplaySessionExpired(){yOff=parseInt(document.all?document.documentElement.scrollTop:window.pageYOffset);document.getElementById("UpdatingDiv").style.top=(clientHeight-document.getElementById("UpdatingDiv").style.height)/2+yOff;document.getElementById("UpdatingDiv").innerHTML=SessionExpiredText;document.getElementById("UpdatingDiv").style.display="block";LockFilter();TimerID=setTimeout("window.location.reload()",10)}function ShowMessageFilterWithNoResults(){document.getElementById("Notification").style.display="block"}function CheckIfSessionIsExpired(){if(StartFiltering){DisplaySessionExpired()}}function ShowUpdatingDiv(){StartFiltering=true;document.getElementById("Notification").style.display="none";document.getElementById("SortNav").style.display="none";yOff=parseInt(document.all?document.documentElement.scrollTop:window.pageYOffset);clientHeight=(document.all&&!isOpera)?document.documentElement.clientHeight:document.body.clientHeight;document.getElementById("UpdatingDiv").style.top=(clientHeight-document.getElementById("UpdatingDiv").style.height)/2+yOff;document.getElementById("UpdatingDiv").innerHTML=UpdatingResultsText;document.getElementById("UpdatingDiv").style.display="block"}function HideUpdatingDiv(){document.getElementById("UpdatingDiv").style.display="none";document.getElementById("SortNav").style.display="block";StartFiltering=false;if(TimerID!=null){clearTimeout(TimerID);TimerID=null}}function round(H,F,E){var G=Math.floor(H/F);if((H%F)>0){return E?((G+1)*F):(G*F)}else{return H}}function UpdateSlider(){if(MinPrice>0&&MaxPrice>0){mySlider=new Bs_Slider();mySlider.width=170;mySlider.height=26;mySlider.imgDir=SRImgPath;mySlider.fieldName="slider1_start";mySlider.preventValueCrossing=true;mySlider.valueDefault=0;mySlider.minVal=0;mySlider.arrowAmount=0;mySlider.maxVal=20;mySlider.valueInterval=1;mySlider.setSliderIcon("slider.gif",13,21);mySlider.useInputField=0;mySlider.colorbar=new Object({color:"red",height:5,widthDifference:-0,offsetLeft:0,offsetTop:5});mySlider.useSecondKnob=true;mySlider.wheelAmount=2;mySlider.fieldName2="slider1_end";mySlider.minVal2=0;mySlider.maxVal2=20;mySlider.valueInterval2=1;mySlider.valueDefault2=20;mySlider.setSliderIcon2("slider.gif",13,21);mySlider.useInputField2=0;mySlider.colorbar2=new Object({color:"blue",height:5,widthDifference:0,offsetLeft:0,offsetTop:5});mySlider.drawInto("sliderDiv");mySlider.attachOnChange(bsSliderChange);mySlider.attachOnSlideEnd(bsSliderEnd);LeftPrice=MinPrice;RightPrice=MaxPrice;priceSliderInfo=priceSliderInfoTemplate;priceSliderInfo=priceSliderInfo.replaceAll("{v:currency}",Selected_Currency);priceSliderInfo=priceSliderInfo.replace("{v:price1}",MinPrice);priceSliderInfo=priceSliderInfo.replace("{v:price2}",MaxPrice);document.getElementById("price_slider_info").innerHTML=priceSliderInfo}}function ApplyHotelNameFilter(B){ShowUpdatingDiv();LockFilter();document.getElementById("HotelNameFilterButton").innerHTML=!HotelNameFilterBoolean?ApplyText:ResetText;if(HotelNameFilterBoolean){TAN.UserControls.HotelSearchResults.ApplyFilterByHotelName_AJAX(B,Filter_callback)}else{document.getElementById("HotelNameFilter").value="";TAN.UserControls.HotelSearchResults.ApplyFilterByHotelName_AJAX("",Filter_callback)}HotelNameFilterBoolean=!HotelNameFilterBoolean}function ApplyStarFilter(D,C){ShowUpdatingDiv();LockFilter();if(D==0){CheckAllStars(C)}else{document.getElementById("AllStars").checked=false}if(C){TAN.UserControls.HotelSearchResults.ApplyFilterByStarRating_AJAX(D,Filter_callback)}else{TAN.UserControls.HotelSearchResults.RemoveFilterByStarRating_AJAX(D,Filter_callback)}}function ApplyRegionFilter(D,C){ShowUpdatingDiv();LockFilter();if(C){document.getElementById("AllRegions").checked=false;TAN.UserControls.HotelSearchResults.ApplyFilterByRegion_AJAX(D,Filter_callback)}else{document.getElementById("AllRegions").checked=false;TAN.UserControls.HotelSearchResults.RemoveFilterByRegion_AJAX(D,Filter_callback)}}function ApplyAmenityFilter(C,D){ShowUpdatingDiv();LockFilter();if(D){document.getElementById("NoAmenities").checked=false;TAN.UserControls.HotelSearchResults.ApplyFilterByAmenity_AJAX(C,Filter_callback)}else{TAN.UserControls.HotelSearchResults.RemoveFilterByAmenity_AJAX(C,Filter_callback)}}function ApplyAccomodationTypeFilter(C,D){ShowUpdatingDiv();LockFilter();if(D){document.getElementById("NoAccountTypes").checked=false;TAN.UserControls.HotelSearchResults.ApplyFilterByAccomodationType_AJAX(C,Filter_callback)}else{TAN.UserControls.HotelSearchResults.RemoveFilterByAccomodationType_AJAX(C,Filter_callback)}}function prettyPrintXml(B){if(B==null){return null}B=B.replace(/</g,"&lt;");B=B.replace(/>/g,"&gt;<br>");return B}function init(){if(document.getElementById("sliderDiv")==null){return }UpdateSlider()}function bsSliderChange(J,H,F,G){document.getElementById("price_slider_info").innerHTML="";lastKnobPressed=G;var I='<div id="price_slider_info"><span class="toLeft">{v:currency}{v:price1}</span><span class="perSmth" style="font-weight: 100 !important;"></span><span class="toPriceRight">{v:currency}{v:price2}</span></div>';if(G==1){LeftPrice=SliderLeftPrices[Math.round(H)];I=I.replace("{v:price2}",RightPrice)}else{RightPrice=SliderLeftPrices[Math.round(H)];I=I.replace("{v:price1}",LeftPrice)}SliderChanged=true;I=I.replace("{v:price"+G+"}",SliderLeftPrices[Math.round(H)]);I=I.replaceAll("{v:currency}",Selected_Currency);document.getElementById("price_slider_info").innerHTML=I}function bsSliderEnd(){LockFilter();ShowUpdatingDiv();if(lastKnobPressed==1){sliderChanges1++}else{sliderChanges2++}if(sliderChanges1==7||sliderChanges2==7){_minValue=mySlider.getValue();_maxValue=mySlider.getValue(2);document.getElementById("sliderDiv").innerHTML="";mySlider.drawInto("sliderDiv");mySlider.setValue(_minValue,1);mySlider.setValue(_maxValue,2);sliderChanges1=0;sliderChanges2=0}TAN.UserControls.HotelSearchResults.ApplyFilterByPrice_AJAX(SliderLeftPrices[mySlider.getValue()]+"-"+SliderLeftPrices[mySlider.getValue(2)],mySlider.getValue(),mySlider.getValue(2),Filter_callback)}function addCommas(B){if(CultureId==2057){return B}else{return B.replace(".",",")}}function ActivateTab(B){if(B!=currentTabIndex){ShowUpdatingDiv();MapMode=(B==2);document.getElementById("tabsFilter"+B).className="tabsFilter"+B+" selectedFilterTab";document.getElementById("tabsFilter"+currentTabIndex).className="tabsFilter"+currentTabIndex+" unSelectedFilterTab";document.getElementById("HotelSearchResults").style.display=!MapMode?"block":"none";document.getElementById("SearchResultsOnMap").style.display=MapMode?"block":"none";document.getElementById("SortingSystemDiv").style.display=!MapMode?"block":"none";document.getElementById("PagingSystemDiv").style.display=!MapMode?"block":"none";StartFiltering=false;document.getElementById("tabsFilter"+currentTabIndex).innerHTML=currentTabText;switch(B){case 1:TAN.UserControls.HotelSearchResults.getHotelsInNormalMode(Filter_callback);currentTabText=SearchResultsText;break;case 2:TAN.UserControls.HotelSearchResults.getHotelsInMapMode(Filter_callback);currentTabText=MapsViewText;break;case 3:TAN.UserControls.HotelSearchResults.getHotelsInRecommendedMode(Filter_callback);currentTabText=RecommendedViewText;break}currentTabIndex=B}}function SortResults(B){ShowUpdatingDiv();LockFilter();TAN.UserControls.HotelSearchResults.SortResults(B,Filter_callback)}function Filter_callback(D){if(D==null||D.value==null){DisplaySessionExpired();return }if(D.value.ErrorOccurred==true){if(D.value.Error.indexOf("Filter:")>-1){ShowMessageFilterWithNoResults();ErrParsed=D.value.Error.split(":");if(ErrParsed.length>1){FilterList=ErrParsed[1];FilterNames=FilterList.split(",");for(var C in FilterNames){switch(FilterNames[C]){case"HotelName":document.getElementById("HotelNameFilterButton").innerHTML=ResetText;HotelNameFilterBoolean=false;break;case"Region":case"Amenity":case"AccomodationType":case"Homepage":case"Ranking":case"Price":case"Star":break;default:}}}}else{DisplaySessionExpired()}}for(C=0;C<D.value.Counters.length;C++){counter=D.value.Counters[C];if(document.getElementById(counter[0])!=null){if(counter[1]>0){document.getElementById(counter[0]).innerHTML="("+counter[1]+")"}else{document.getElementById(counter[0]).innerHTML=""}}}ResultsNo=D.value.ResultsNo;MapMode=D.value.MapMode;document.getElementById("resultNo").style.display=!D.value.RecommendedMode?"inline":"none";document.getElementById("bestDealsNo").style.display=D.value.RecommendedMode?"inline":"none";document.getElementById("currentPage").innerHTML=D.value.CurrentPage;document.getElementById("currentPage2").innerHTML=D.value.CurrentPage;document.getElementById("pagesNo").innerHTML=D.value.PagesNo;document.getElementById("pagesNo2").innerHTML=D.value.PagesNo;if(D.value.PagesNo>1&&!MapMode){document.getElementById("PaginationNav").style.display="inline";document.getElementById("PaginationNav2").style.display="inline";if(document.getElementById("SortNav")!=null){document.getElementById("SortNav").style.display="block"}}else{document.getElementById("PaginationNav").style.display="none";document.getElementById("PaginationNav2").style.display="none";if(document.getElementById("SortNav")!=null){document.getElementById("SortNav").style.display=MapMode?"none":"block"}}document.getElementById("filteredResultNo").innerHTML=ResultsNo;if(document.getElementById("hotelno_price")!=null){document.getElementById("hotelno_price").innerHTML=ResultsNo+' <span style="text-transform: lowercase">'+HotelsText+"</span>"}D.value=D.value.Items;HotelResults=D.value;if(MapMode){document.getElementById("tabsFilter2").className="tabsFilter2 selectedFilterTab";document.getElementById("tabsFilter1").className="tabsFilter1 unSelectedFilterTab";if(document.getElementById("tabsFilter3")!=null){document.getElementById("tabsFilter3").className="tabsFilter3 unSelectedFilterTab"}document.getElementById("HotelSearchResults").style.display="none";document.getElementById("SearchResultsOnMap").style.display="block";document.getElementById("SortingSystemDiv").style.display="none";document.getElementById("PagingSystemDiv").style.display="none";clatitude=0;clongitude=0;latlongcounter=0;for(C=0;C<D.value.length;C++){if(D.value[C].Latitude!=-1&&D.value[C].Longitude!=-1&&D.value[C].HasValidLatLng){latlongcounter++;clatitude+=D.value[C].Latitude;clongitude+=D.value[C].Longitude}}if(latlongcounter>0){clatitude=clatitude/latlongcounter;clongitude=clongitude/latlongcounter;if(GBrowserIsCompatible()&&map==null&&MapMode){map=new GMap2(document.getElementById("Map"));map.addControl(new GSmallMapControl());map.addControl(new GMapTypeControl());tooltip=document.createElement("div");document.getElementById("Map").appendChild(tooltip);tooltip.style.visibility="hidden"}map.setCenter(new GLatLng(clatitude,clongitude),13);setupMarkers()}}else{hc="";hsc=document.getElementById("HotelStarItemTemplate").innerHTML;for(C=0;C<D.value.length;C++){thc="";thc=document.getElementById("HotelItemTemplate").innerHTML;thc=thc.replace("{v:HotelName}",D.value[C].HotelName);thc=thc.replaceAll("{v:HotelId}",D.value[C].HotelId);thc=thc.replace("/Images/SpacerToBeReplaced.gif",D.value[C].ThumbNail);thc=thc.replace("{v:HotelPhotoCaption}",D.value[C].ThumbNailText);thc=thc.replace("{v:HotelDescription}",D.value[C].HotelDescription);thc=thc.replace("{v:HotelRegionName}",D.value[C].RegionName);thc=thc.replaceAll("{v:Latitude}",D.value[C].Latitude);thc=thc.replaceAll("{v:Longitude}",D.value[C].Longitude);thc=thc.replace("{v:specialoffervisibility}",(D.value[C].Ranking>1)?"display:block":"display:none");thc=thc.replace("{v:hasReviewsVisibility}",D.value[C].HotelHasReviews==true?"display:block":"display:none");if(D.value[C].Latitude!=null&&D.value[C].Longitude!=null&&D.value[C].Latitude!=-1&&D.value[C].Longitude!=-1){thc=thc.replace("{v:visibleflag}","display:block")}else{thc=thc.replace("{v:visibleflag}","display:none")}thc=thc.replace("{v:HotelAmenityIcons}",D.value[C].AmenityIconsHTML);thc=thc.replaceAll("{v:SearchDetailsString}",SearchDetailsString);thsc="";for(s=10;s<=D.value[C].StarRating;s=s+10){thsc+=hsc}thc=thc.replace("{v:HotelStarsHTML}",thsc);thc=thc.replace("{v:HotelAccomodationType}",D.value[C].HotelTypeText);tra="";if(D.value[C].GetGrouppedQuotes!=null){for(j=0;j<D.value[C].GetGrouppedQuotes.length;j++){obj=D.value[C].GetGrouppedQuotes[j];tratmp=document.getElementById("HotelRoomTypeContentTemplate").innerHTML;tratmp=tratmp.replaceAll("{v:currency}",Selected_Currency);tratmp=tratmp.replace("{v:SellingPrice}",addCommas((obj.SellingPrice).toFixed(2)+""));tratmp=tratmp.replace("{v:NetPrice}",addCommas(obj.NetPrice.toFixed(2)+""));tratmp=tratmp.replace("{v:Commission}",addCommas(obj.Commission.toFixed(2)+""));tratmp=tratmp.replace("{v:RoomType}",obj.Name);tratmp=tratmp.replace("{v:SupplierName}",obj.SupplierName);tratmp=tratmp.replace("{v:RoomDescription}",obj.Description);tratmp=tratmp.replaceAll("{v:QuoteIndex}",obj.QuoteIndex);tratmp=tratmp.replaceAll("{v:SearchId}",SearchId);tratmp=tratmp.replaceAll("{v:SearchDetails}",SearchDetailsString);tra+=tratmp}if(D.value[C].GetGrouppedQuotes.length>0){tra=document.getElementById("HotelRoomTypeHeaderTemplate").innerHTML+tra+document.getElementById("HotelRoomTypeFooterTemplate").innerHTML;thc=thc.replace("{v:AvailableRoomTypes}",tra);thc=thc.replace("{v:CheckAvailabilityAndRatesButton}","")}else{thc=thc.replace("{v:AvailableRoomTypes}","<div style='float:right;padding:0px 10px 10px 0px;'><a href='HotelDetailsRooms.aspx?HotelId="+D.value[C].HotelId+"&TargetHotelId="+D.value[C].HotelId+"&SearchDetails="+SearchDetailsString+"&PreviousSearchId="+SearchId+"&Prev="+PrevId+"' class='buttonModelMedium'>"+CheckAvailabilityAndRatesText+"</a></div>")}}else{thc=thc.replace("{v:AvailableRoomTypes}","<div style='float:right;padding:0px 10px 10px 0px;'><a href='HotelDetailsRooms.aspx?HotelId="+D.value[C].HotelId+"&TargetHotelId="+D.value[C].HotelId+"&SearchDetails="+SearchDetailsString+"&PreviousSearchId="+SearchId+"&Prev="+PrevId+"' class='buttonModelMedium'>"+CheckAvailabilityAndRatesText+"</a></div>")}hc+=thc}hc=hc.replaceAll("<!--","");hc=hc.replaceAll("-->","");document.getElementById("HotelSearchResults").innerHTML=hc}if(SliderChanged){document.getElementById("hotelno_price").style.display="block";SliderChanged=false}HideUpdatingDiv();document.getElementById("LockDiv").style.display="none";if(document.getElementById("price_slider_info")!=null){document.getElementById("price_slider_info").style.display="block"}document.getElementById("tabsFilter"+currentTabIndex).innerHTML=document.getElementById("AvHotelsInfo").innerHTML;window.scrollTo(0,0)}window.onload=function(){if(typeof AjaxPro!="undefined"&&AjaxPro!==null){AjaxPro.timeoutPeriod=80000}if(isIE){dhtmlHistory.initialize();dhtmlHistory.addListener(historyChange);dhtmlHistory.setBlankHTMLPath(ImgPath);if(dhtmlHistory.isFirstLoad()){dhtmlHistory.add(0,0)}}if(!dhtmlHistory.isFirstLoad()){if(isIE){TAN.UserControls.HotelSearchResults.GetFirstPage(Filter_callback)}else{EraseFilter()}}init();document.getElementById("graybackground").onclick=function(){CloseHotelDetailPopup(true)};document.getElementById("HotelNameFilter").onkeypress=function(B){if(window.event){Key=window.event.keyCode}else{Key=B.which}if(Key==13){ApplyHotelNameFilter(document.getElementById("HotelNameFilter").value);return false}else{keyPressComingFromHotelName=true}};if(dhtmlHistory.isFirstLoad()){if(SelectedStars.length==0){document.getElementById("AllStars").checked=true;for(i=MinStarRating;i<=MaxStarRating;i++){if(document.getElementById("StarFilter"+i)!=null){document.getElementById("StarFilter"+i).checked=false}}}if(SelectedStars.length>0||SelectedHotelName.length>0){if(SelectedStars.length>0){document.getElementById("AllStars").checked=false;for(i=MinStarRating;i<=MaxStarRating;i++){if(document.getElementById("StarFilter"+i)!=null){if(SelectedStars.indexOf(" "+i+",")>-1){document.getElementById("StarFilter"+i).checked=true}else{document.getElementById("StarFilter"+i).checked=false}}}}if(SelectedHotelName.length>0){document.getElementById("HotelNameFilterButton").innerHTML=ResetText;HotelNameFilterBoolean=false}TAN.UserControls.HotelSearchResults.ApplyHomePageFilters(SelectedStars,SelectedHotelName,Filter_callback)}document.getElementById("NoAmenities").checked=true;if(DistrictId=="-1"){document.getElementById("AllRegions").checked=true}if(document.getElementById("region_filter_items")!=null){for(i=0;i<document.getElementById("region_filter_items").childNodes.length;i++){childnodeLI=document.getElementById("region_filter_items").childNodes[i];if(childnodeLI!=null&&childnodeLI.id!=null){for(j=0;j<childnodeLI.childNodes.length;j++){childnode=childnodeLI.childNodes[j];if(childnode!=null&&childnode.id!=null&&childnode.id.indexOf("CheckRegionFilter")==0){if("CheckRegionFilter"+DistrictId==childnode.id){childnode.checked=true}else{childnode.checked=false}}}}}}for(i=0;i<document.getElementById("amenity_filter_items").childNodes.length;i++){childnodeLI=document.getElementById("amenity_filter_items").childNodes[i];if(childnodeLI!=null&&childnodeLI.id!=null){for(j=0;j<childnodeLI.childNodes.length;j++){childnode=childnodeLI.childNodes[j];if(childnode!=null&&childnode.id!=null&&childnode.id.indexOf("CheckAmenityFilter")==0){childnode.checked=false}}}}}if(DistrictId!="-1"){ShowUpdatingDiv();LockFilter();TAN.UserControls.HotelSearchResults.ApplyFilterByRegion_AJAX(DistrictId,Filter_callback)}};function ChangeImage(B){photo=HotelImages[B];if(photo==null){return }imgObj=document.getElementById("img00");imgObj.src=photo.URL;imgObj.width=photo.Width;imgObj.height=photo.Height}function OpenPopUpImage(I,J,G,H){try{if(HotelImages==null){return }document.getElementById("MaximizedPopUp").style.display="none";document.getElementById("MaximizedPopUpContent").innerHTML='<a style="display:block;text-align:right;margin: -5px 10px 10px 0;" href="javascript:void(0);" onclick="CloseMaximizedPopup();return false;"><img src="/TANWeb/Branding/LAE/Images/SearchResults/close_tip.gif"  onclick="closeToolTip();" style="cursor: pointer" align="top" border="0" class="xButton"></a>';document.getElementById("MaximizedPopUpContent").innerHTML+="<img id='img00' src=\""+HotelImages[J].URL+'" width="'+HotelImages[J].Width+'" height="'+HotelImages[J].Height+'" />';document.getElementById("MaximizedPopUpContent").innerHTML+='<div style="font-size:24px;text-align:center;">';if(J>0){document.getElementById("MaximizedPopUpContent").innerHTML+='<a class="nav" style="float:left" href="javascript:void(0);" onclick="OpenPopUpImage(this, '+(J-1)+', HotelImages.length, true);return false;">&laquo;</a>'}if(J<G-1){document.getElementById("MaximizedPopUpContent").innerHTML+='<a class="nav" style="float:right" href="javascript:void(0);" onclick="OpenPopUpImage(this, '+(J+1)+', HotelImages.length, true);return false;">&raquo;</a>'}document.getElementById("MaximizedPopUpContent").innerHTML+="</div>";lowres=(screen.width<=1024);if(!H){if(lowres){if(IE6){yOff=parseInt(document.all?document.documentElement.scrollTop:window.pageYOffset);document.getElementById("MaximizedPopUp").style.position="absolute";document.getElementById("MaximizedPopUp").style.left="350px";document.getElementById("MaximizedPopUp").style.top=(100+yOff)+"px"}else{document.getElementById("MaximizedPopUp").style.left="350px";document.getElementById("MaximizedPopUp").style.top="100px"}}else{if(isMozilla){document.getElementById("MaximizedPopUp").style.left=findPosX(I);document.getElementById("MaximizedPopUp").style.top=findPosY(I)+30}else{if(IE6){document.getElementById("MaximizedPopUp").style.left=findPosX(I);document.getElementById("MaximizedPopUp").style.top=findPosY(I)+70}else{document.getElementById("MaximizedPopUp").style.left=findPosX(I)+260;document.getElementById("MaximizedPopUp").style.top=findPosY(I)+110}}}}document.getElementById("MaximizedPopUp").style.width=HotelImages[J].Width+20;document.getElementById("MaximizedPopUp").style.height=HotelImages[J].Height+70;document.getElementById("MaximizedPopUp").style.display="block"}catch(F){}}function OpenInternalPopup(){HideUpdatingDiv();yOff=parseInt(document.all?document.documentElement.scrollTop:window.pageYOffset);if(IE6&&document.getElementById("poplinks")!=null){document.getElementById("poplinks").style.background="#EEEEEE"}clientHeight=(document.all&&!isOpera)?document.documentElement.clientHeight:document.body.clientHeight;document.getElementById("HotelDetailsPopUp").style.top=35;document.getElementById("HotelDetailsPopUp").style.left=((clientWidth-1024)/2+300)+"px";if(IE6){document.getElementById("HotelDetailsPopUp").style.position="absolute";document.getElementById("MaximizedPopUp").style.position="absolute";document.getElementById("HotelDetailsPopUp").style.top=(yOff+80)+"px";theRules.addRule("html","overflow:hidden");theRules.addRule(".ppTabs a","height: 26px !important")}else{if(isOpera||isMozilla){theRules.insertRule(".ppTabs a {height: 26px !important}",theRules.cssRules.length)}else{if(theRules.addRule){theRules.addRule("html","overflow:hidden")}else{document.body.style.overflow="hidden"}}}document.getElementById("HotelDetailsPopUp").style.display="block";document.getElementById("SortingSystemDiv").style.display="none";if(document.getElementById("currency_section")!=null){document.getElementById("currency_section").style.display="none"}if(document.getElementById("LanguageSection")!=null){document.getElementById("LanguageSection").style.visibility="hidden"}}var pUpHotelId=-1;var pPopUpType=0;var oldContent="";var pReviewsTabStage=0;var pReviewsListIsExpanded=0;var pCountriesDropdownHtml=null;var pDefaultCustomerName=GetDefaultCustomerName();function ShowHotelDetailPopupCallBack(F){if(F!=null&&F.value!=null){F=F.value}if(Hotels.get(F.HotelId)==null){Hotels.put(F.HotelId,F)}selectedHotelId=F.HotelId;if(document.getElementById("tabnosel")!=null&&isMozilla){document.getElementById("tabnosel").style.left="-683px";document.getElementById("tabnosel").style.height="30px"}document.getElementById("graybackground").style.display="block";document.getElementById("graybackground").style.height=clientHeight+100;document.getElementById("graybackground").style.width=clientWidth;document.getElementById("graybackground").style.top=parseInt(document.all?document.documentElement.scrollTop:window.pageYOffset);if(F==null||F.HotelId==0||F.ErrorOccured){DisplaySessionExpired();return }pUpHotelId=F.HotelId;if(dhtmlHistory.isFirstLoad()){dhtmlHistory.add(pUpHotelId,pUpHotelId)}lowres=(screen.width<=1024);if(Hotels.get(pUpHotelId)==null){Hotels.put(pUpHotelId,F)}xiIsOpened=(document.getElementById("HotelDetailsPopUp").style.display=="block");if(!xiIsOpened){OpenInternalPopup();if(oldContent.length<1){content=document.getElementById("HotelDetailsPopUp").innerHTML;oldContent=content}else{content=oldContent}content=content.replaceAll("{v:HotelName}",F.HotelName);content=content.replaceAll("{v:HotelId}",F.HotelId);content=content.replace("/Images/SpacerToBeReplaced.gif",F.ThumbNail);content=content.replace("{v:HotelPhotoCaption}",F.ThumbNailText);content=content.replace("fab3star","fab"+F.StarRating/10+"star");content=content.replace("{v:Location}",F.RegionName);document.getElementById("HotelDetailsPopUp").innerHTML=content}cont="";if(SelectedPopUpTab.length>0){document.getElementById(SelectedPopUpTab).className=""}document.getElementById("PopUpContent").style.padding="15px 10px 15px 10px";document.getElementById("PopUpContent").style.width="683px";document.getElementById("PopUpContent").style.background="#FFFFFF";document.getElementById("PopUpContent").className="";switch(pPopUpType){case 0:SelectedPopUpTab="PhotosTab";document.getElementById("PhotosTab").className="selected";if(F!=null&&F.HotelPhotos!=null&&F.HotelPhotos.length>0){cont+='<div style="width:39%;float:left">';HotelImages=F.HotelPhotos;for(j=0;j<F.HotelPhotos.length;j++){cont+='<a href="javascript:void(0);" style="margin-right:5px"  onclick="javascript:DisplayEnlargedImage('+j+');return false;"><img width="80" height="60" style="border: solid 1px;" class="popupcolor" src="'+F.HotelPhotos[j].ThumbNailURL+'" alt="'+F.HotelPhotos[j].CaptionText+'" /></a>'}cont+='<div style="clear: both" class="hpHotelPhotosText"><p><strong>'+EnlargeText+"</strong></p></div>";if(HotelSubmitPhotoText.length>0){cont+='<div class="hpHotelPhotosText">'+HotelSubmitPhotoText+"</div>"}cont+="</div>";imageWidth=HotelImages[0].Width>400?400:HotelImages[0].Width;cont+='<div style="width:59%;float:right"><img id=\'LargeImageBox\' src="'+HotelImages[0].URL+'" width="'+imageWidth+'px" /></div>';document.getElementById("PopUpContent").style.height="430px";document.getElementById("HotelDetailsPopUp").style.height="600px"}else{cont+=NoPhotosText}break;case 1:SelectedPopUpTab="InformationTab";widthQuoteSection=670;document.getElementById("InformationTab").className="selected";if(F.GetGrouppedQuotes!=null&&F.GetGrouppedQuotes.length>0){cont+='<div style="float:left !important;width:'+widthQuoteSection+'px !important;">';cont+=document.getElementById("HotelRoomTypeHeaderTemplate").innerHTML;for(j=0;j<F.GetGrouppedQuotes.length;j++){tratmp=document.getElementById("HotelRoomTypeContentTemplate").innerHTML;tratmp=tratmp.replaceAll("{v:currency}",Selected_Currency);tratmp=tratmp.replace("{v:SellingPrice}",addCommas((F.GetGrouppedQuotes[j].SellingPrice).toFixed(2)+""));tratmp=tratmp.replace("{v:SupplierName}",F.GetGrouppedQuotes[j].SupplierName);tratmp=tratmp.replace("{v:NetPrice}",addCommas(F.GetGrouppedQuotes[j].NetPrice.toFixed(2)+""));tratmp=tratmp.replace("{v:Commission}",addCommas(F.GetGrouppedQuotes[j].Commission.toFixed(2)+""));tratmp=tratmp.replace("{v:RoomType}",F.GetGrouppedQuotes[j].Name);tratmp=tratmp.replace("{v:RoomDescription}",F.GetGrouppedQuotes[j].Description);tratmp=tratmp.replaceAll("{v:QuoteIndex}",F.GetGrouppedQuotes[j].QuoteIndex);tratmp=tratmp.replaceAll("{v:SearchId}",SearchId);tratmp=tratmp.replaceAll("{v:SearchDetails}",SearchDetailsString);cont+=tratmp}cont+="</table></div>"}else{cont+="<div><a href='HotelDetailsRooms.aspx?HotelId="+F.HotelId+"&TargetHotelId="+F.HotelId+"&SearchDetails="+SearchDetailsString+"&PreviousSearchId="+SearchId+"&Prev="+PrevId+"' class='buttonModelMedium'>"+CheckAvailabilityAndRatesText+"</a></div>"}cont+="</div>";if(F!=null&&((F.ExtendedHotelDescription!=null&&F.ExtendedHotelDescription.length>0)||(F.HotelAreaDetails!=null&&F.HotelAreaDetails.length>0))){cont+='<div style="clear:left"><strong>'+GeneralInfoText+"</strong></div><br/><br/>";if(F.HotelAreaDetails.length>0){cont+=F.HotelAreaDetails+"<br/><br/>"}cont+="<div>";if(F.ExtendedHotelDescription!=null&&F.ExtendedHotelDescription.length>0){cont+=F.ExtendedHotelDescription+"<br />"}cont+="</div>"}else{cont+=NoDescriptionsText}cont+='<div style="float:left;width: 310px;margin-top:15px"><strong>'+AddressText+"</strong><br/>"+F.Address+"</div>";if(F.Latitude!=-1&&F.Longitude!=-1){cont+='<div style="float:left;padding-left:10px;margin-top:15px;height: 80px;background: url('+ImgPath+'/HotelDetailsVerticalSeparator.gif) no-repeat;"><img src="'+ImgPath+'/mapIcon.gif" /><a class="hpHotelDetailsFeaturesMap" href="javascript:void(0);" onclick="SwitchTab(3);return false;">'+MapText+"</a></div>"}cont=cont.replaceAll("<!--","");cont=cont.replaceAll("-->","");document.getElementById("PopUpContent").style.height=((!lowres?560:580)-(1024-screen.height))+"px";document.getElementById("HotelDetailsPopUp").style.height=((!lowres?730:750)-(1024-screen.height))+"px";break;case 2:SelectedPopUpTab="FacilitiesTab";document.getElementById("FacilitiesTab").className="selected";if(F!=null&&F.Amenities!=null&&F.Amenities.length>0){cont="<strong>"+AmenitiesTabText+"</strong><br>";for(j=0;j<F.Amenities.length;j++){cont+="-&nbsp;"+F.Amenities[j].Text+"<br>"}}else{cont+=NoAmenitiesText}if(F.RoomText!=null&&F.RoomText.length>0){cont+="<br><strong>"+RoomsText+"</strong><br>"+F.RoomText}document.getElementById("PopUpContent").style.height="260px";document.getElementById("HotelDetailsPopUp").style.height="450px";break;case 3:document.getElementById("PopUpContent").style.padding="0px";document.getElementById("PopUpContent").style.width="703px";document.getElementById("PopUpContent").style.height=((!lowres?580:600)-(1024-screen.height))+"px";document.getElementById("HotelDetailsPopUp").style.height=((!lowres?740:760)-(1024-screen.height))+"px";document.getElementById("PopUpContent").className="MapPopUpContent";SelectedPopUpTab="MapTab";document.getElementById("MapTab").className="selected";if(GBrowserIsCompatible()){var G=new GMap2(document.getElementById("PopUpContent"));G.addControl(new GSmallMapControl());G.addControl(new GMapTypeControl());G.setCenter(new GLatLng(F.Latitude,F.Longitude),13);var E=new GMarker(new GLatLng(F.Latitude,F.Longitude));G.addOverlay(E)}if(screen.width>=1024){E.openInfoWindowTabsHtml(getInfoTabs(F));GEvent.addListener(E,"click",function(){ShowUpdatingDiv();TAN.UserControls.HotelSearchResults.RetrieveHotelDetails(F.HotelId,OpenMarkerTooltip);E.openInfoWindowTabsHtml(getInfoTabs(F))})}break;case 4:SelectedPopUpTab="AvailabilityTab";document.getElementById("AvailabilityTab").className="selected";cont=document.getElementById("HotelRoomTypeHeaderTemplate").innerHTML;for(j=0;j<F.GetGrouppedQuotes.length;j++){tratmp=document.getElementById("HotelRoomTypeContentTemplate").innerHTML;tratmp=tratmp.replaceAll("{v:currency}",Selected_Currency);tratmp=tratmp.replace("{v:SellingPrice}",addCommas((F.GetGrouppedQuotes[j].SellingPrice).toFixed(2)+""));tratmp=tratmp.replace("{v:NetPrice}",addCommas(F.GetGrouppedQuotes[j].NetPrice.toFixed(2)+""));tratmp=tratmp.replace("{v:Commission}",addCommas(F.GetGrouppedQuotes[j].Commission.toFixed(2)+""));tratmp=tratmp.replace("{v:RoomType}",F.GetGrouppedQuotes[j].Name);tratmp=tratmp.replace("{v:RoomDescription}",F.GetGrouppedQuotes[j].Description);tratmp=tratmp.replaceAll("{v:QuoteIndex}",F.GetGrouppedQuotes[j].QuoteIndex);tratmp=tratmp.replaceAll("{v:SearchId}",SearchId);tratmp=tratmp.replaceAll("{v:SearchDetails}",SearchDetailsString);cont+=tratmp}cont+="</table></div>";cont=cont.replaceAll("<!--","");cont=cont.replaceAll("-->","");document.getElementById("PopUpContent").style.height="230px";document.getElementById("HotelDetailsPopUp").style.height="400px";break;case 5:SelectedPopUpTab="ReviewsTab";document.getElementById("ReviewsTab").className="selected";var H="";H+='<table class="hpSkeleton" width="100%" cellspacing="8px"><tr>';H+='<td width="70%"><strong>'+ReviewOwnPostText+"</strong></td>";H+='<td align="right"><span class="clear_dest"><a class="linkNormal" href="javascript: void(0);" onclick = "pReviewsTabStage = 0; pReviewsListIsExpanded = 0; SwitchTab(5);return false;">'+ReviewSeeOtherText+"</a></span></td>";H+='</tr></table><div class="hpHotelDetailsHorizontalSeparator"></div>';if(pReviewsTabStage==0){if(F!=null&&(F.Reviews!=null&&F.Reviews.length>0)){cont="";cont+='<table class="hpSkeleton" width="100%" cellspacing="8px"><tr>';cont+='<td width="70%">'+GetAverageReviewRatingIconHtml(F)+"</td>";cont+='<td align="right"><span class="clear_dest"><a class="linkNormal" href="javascript: void(0);" onclick = "pReviewsTabStage = 1;SwitchTab(5);return false;">'+ReviewOwnPostText+"</a></span></td>";cont+="</tr></table>";cont+='<div class="hpHotelDetailsHorizontalSeparator"></div>';cont+='<table class="hpSkeleton" width="100%" cellspacing="8px">';for(j=0;j<F.Reviews.length;j++){if(!pReviewsListIsExpanded&&j>=5){break}contReview="";contReview+='<tr><td colspan="2"><table width="100%"><tr>';contReview+='<td style="color:Gray" width="55%"><strong>'+ReviewdByText+" </strong>"+F.Reviews[j].CustomerName+", "+F.Reviews[j].Country+"</td>";contReview+='<td style="color:Gray" width="24%"><strong>'+ReviewStayedText+" </strong><span>"+F.Reviews[j].StayDate+"</span></td>";contReview+='<td width="21%"><strong>'+ReviewRatingText+' </strong><img src="'+ImgPath+"/reviewrating"+F.Reviews[j].Rating+'.jpg" style="border: none !important; margin-bottom: 0 !important;"/></td>';contReview+='<tr><td colspan="3"><table  style="color:Gray" width="100%"><tr><td><strong>'+ReviewCommentsText+" </strong></td><tr><tr><td>"+F.Reviews[j].Comments+"</td></table></td></tr>";contReview+='<tr><td colspan="3" align="center"><div style="width: 80%; height:5px" class="hpHotelDetailsHorizontalSeparator"></div></td></tr>';contReview+="</table></tr></tr>";cont+=contReview}cont+="</table>";if(!pReviewsListIsExpanded&&j>=5){cont+='<a class="linkNormal" href="javascript: void(0);" onclick="pReviewsListIsExpanded=1; SwitchTab(5);">'+ReviewsReadMoreText+"</a>"}}else{cont+=NoReviewsText;cont+="<br>"+BeTheFirstReviewer;cont+='<a class="linkNormal" href="javascript: void(0);" onclick = "pReviewsTabStage = 1;SwitchTab(5);return false;">'+ClickToPostYourReview+"</a>"}}else{if(pReviewsTabStage==1){cont+=H;if(!IsAnonymous){cont+='</br><span id="SubmitReviewError" class = "errormessage" style="height:14px;display:none;"></span>';cont+='<table cellspacing="8px"><tr><td colspan="2"></td></tr>';cont+="<tr><td><strong>"+ReviewSubmitYourNameText+"</strong></td>";cont+='<td><input name="ReviewsNameTextBox"  type="text" value="'+pDefaultCustomerName+'" size="60" id="ReviewsNameTextBox" TestId="ReviewsNameTextBox" />';cont+="</td></tr>";cont+="<tr><td><strong>"+ReviewYourCountryText+"</strong></td><td>";cont+=pCountriesDropdownHtml;cont+="</td></tr>";cont+="<tr><td><strong>"+ReviewSubmitRoomRatingText+"</strong></td>";cont+="<td><style>{float: left;}</style>";cont+='<select name="ReviewsRoomRatingDropdown" id="ReviewsRoomRatingDropdown" TestId="ReviewsRoomRatingDropdown" OnChange="RefreshRoomRatingDisplay()" Class="reviewsRoomRatingDropdown">';cont+='<option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select>&nbsp;';cont+='<span name="RatingKey"><img id="ReviewsRoomRatingIcon" src="'+ImgPath+'/reviewrating0.jpg" height="13" width="47" style="border: none !important; margin-bottom: 0 !important;" /></span>';cont+="</td></tr>";cont+="<tr><td><strong>"+ReviewSubmitLocationRatingText+"</strong></td>";cont+="<td><style>reviewsLocationRatingDropdown{float: left;}</style>";cont+='<select name="ReviewsLocationRatingDropdown" id="ReviewsLocationRatingDropdown" TestId="ReviewsLocationRatingDropdown" OnChange="RefreshLocationRatingDisplay()" Class="reviewsLocationRatingDropdown">';cont+='<option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select>&nbsp;';cont+='<span name="RatingKey"><img id="ReviewsLocationRatingIcon" src="'+ImgPath+'/reviewrating0.jpg" height="13" width="47" style="border: none !important; margin-bottom: 0 !important;" /></span>';cont+="</td></tr>";cont+="<tr><td><strong>"+ReviewSubmitFacilitiesRatingText+"</strong></td>";cont+="<td><style>reviewsFacilitiesRatingDropdown{float: left;}</style>";cont+='<select name="ReviewsFacilitiesRatingDropdown" id="ReviewsFacilitiesRatingDropdown" TestId="ReviewsFacilitiesRatingDropdown" OnChange="RefreshFacilitiesRatingDisplay()" Class="reviewsFacilitiesRatingDropdown">';cont+='<option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select>&nbsp;';cont+='<span name="RatingKey"><img id="ReviewsFacilitiesRatingIcon" src="'+ImgPath+'/reviewrating0.jpg" height="13" width="47" style="border: none !important; margin-bottom: 0 !important;" /></span>';cont+="</td></tr>";cont+="<tr><td><strong>"+ReviewSubmitMealsRatingText+"</strong></td>";cont+="<td><style>reviewsMealsRatingDropdown{float: left;}</style>";cont+='<select name="ReviewsMealsRatingDropdown" id="ReviewsMealsRatingDropdown" TestId="ReviewsMealsRatingDropdown" OnChange="RefreshMealsRatingDisplay()" Class="reviewsMealsRatingDropdown">';cont+='<option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select>&nbsp;';cont+='<span name="RatingKey"><img id="ReviewsMealsRatingIcon" src="'+ImgPath+'/reviewrating0.jpg" height="13" width="47" style="border: none !important; margin-bottom: 0 !important;" /></span>';cont+="</td></tr>";cont+="<tr><td><strong>"+ReviewSubmitServiceRatingText+"</strong></td>";cont+="<td><style>reviewsServiceRatingDropdown{float: left;}</style>";cont+='<select name="ReviewsServiceRatingDropdown" id="ReviewsServiceRatingDropdown" TestId="ReviewsServiceRatingDropdown" OnChange="RefreshServiceRatingDisplay()" Class="reviewsServiceRatingDropdown">';cont+='<option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select>&nbsp;';cont+='<span name="RatingKey"><img id="ReviewsServiceRatingIcon" src="'+ImgPath+'/reviewrating0.jpg" height="13" width="47" style="border: none !important; margin-bottom: 0 !important;" /></span>';cont+="</td></tr>";cont+='<tr><td colspan="2"/></tr>';cont+="<tr><td><strong>"+ReviewSubmitStayDateText+"</strong></td><td>";cont+='<div id="div_date_holder" name="div_date_holder" >';cont+='<input name="ReviewsStayDateTextBox" onchange="" type="text" size="10" id="ReviewsStayDateTextBox" TestId="ReviewsStayDateTextBox" />&nbsp;';if(IsPartner){cont+='<a onClick="OpenDateTimePickerPopUp();" NAME="callink" ID="callink"><img src="'+ImgPath+'/calendar.gif"></a>'}else{cont+='<a onClick="OpenDateTimePickerPopUp();" NAME="callink" ID="callink"><img src="'+ImgPath+'/calendar.gif"></a>'}cont+='</div><div id="calpos" name="calpos" style="z-Index:100;position:absolute;visibility:hidden;background-color:white; border: 0;left:280px; top:340px"></div>';cont+='</td></tr><tr><td colspan="2"></td></tr>';cont+='<tr><td colspan="2" style="color:Gray">'+ReviewYourCommentText+"</td></tr>";cont+='<tr><td colspan="2"><textarea name="ReviewsReviewTextBox" rows="10" id="ReviewsReviewTextBox" TestId="ReviewsReviewTextBox" cols="80"></textarea></td></tr>';cont+='</br><td valign="bottom"><span id="SubmitReviewError2" class = "errormessage" style="height:14px;display:none;"></span></td>';cont+='<tr><td colspan="2"><a href="javascript:SendReview('+F.HotelId+');" class="buttonModelSmall">'+ReviewSendButtonText+"</a></td></tr>";cont+="</table>"}else{cont+=ReviewerNotAuthenticatedText}}else{if(pReviewsTabStage==2){cont+=H;cont+='<table cellspacing="8px"><tr><td colspan="2"></td></tr>';cont+="<tr><td><strong>"+ThankYouForReview+"</strong></td><td>";cont+="</table>"}else{if(pReviewsTabStage==3){cont+=H;cont+=EncounteredErrorStandard}}}}cont=cont.replaceAll("<!--","");cont=cont.replaceAll("-->","");document.getElementById("PopUpContent").style.height=((!lowres?560:580)-(1024-screen.height))+"px";document.getElementById("HotelDetailsPopUp").style.height=((!lowres?730:750)-(1024-screen.height))+"px";break}if(F.Latitude==-1||F.Longitude==-1){document.getElementById("MapTab").style.display="none"}else{document.getElementById("MapTab").style.display="block"}if(F.GetGrouppedQuotes!=null&&F.GetGrouppedQuotes.length>0){document.getElementById("AvailabilityTab").style.display="block"}else{document.getElementById("AvailabilityTab").style.display="none"}if(pPopUpType!=3){document.getElementById("PopUpContent").innerHTML=cont}HideUpdatingDiv()}function DisplayEnlargedImage(B){if(HotelImages==null){return }imageWidth=HotelImages[B].Width>400?400:HotelImages[B].Width;document.getElementById("LargeImageBox").src=HotelImages[B].URL;document.getElementById("LargeImageBox").width=imageWidth}function SendReview(B){if(ValidateReviewSubmitFormData()){if(IsAnonymous){DisplaySessionExpired();return }TAN.UserControls.HotelSearchResults.SubmitReview(B,document.getElementById("ReviewsNameTextBox").value,document.getElementById("ReviewsCountryDropDown").value,document.getElementById("ReviewsStayDateTextBox").value,document.getElementById("ReviewsReviewTextBox").value,document.getElementById("ReviewsRoomRatingDropdown").value,document.getElementById("ReviewsLocationRatingDropdown").value,document.getElementById("ReviewsFacilitiesRatingDropdown").value,document.getElementById("ReviewsMealsRatingDropdown").value,document.getElementById("ReviewsServiceRatingDropdown").value,SendReviewCallBack)}}function SendReviewCallBack(B){if(B.value=="1"){pReviewsTabStage=2;SwitchTab(5)}else{if(B.value=="0"){DisplaySessionExpired();return }else{ReviewsTabStage=3;SwitchTab(5)}}}function ValidateReviewSubmitFormData(){var D=document.getElementById("SubmitReviewError");var C=document.getElementById("SubmitReviewError2");C.align="bottom";C.style.display="block";D.style.display="block";if(document.getElementById("ReviewsNameTextBox").value==null||document.getElementById("ReviewsNameTextBox").value==""){D.innerHTML=EnterReviewerNameError;C.innerHTML=EnterReviewerNameError;return false}if(document.getElementById("ReviewsStayDateTextBox").value==null||document.getElementById("ReviewsStayDateTextBox").value==""){D.innerHTML=EnterReviewDateError;C.innerHTML=EnterReviewDateError;return false}else{if(!validStayDate(document.getElementById("ReviewsStayDateTextBox"))){D.innerHTML=EnterReviewDateError;C.innerHTML=EnterReviewDateError;return false}}if(document.getElementById("ReviewsReviewTextBox").value==null||document.getElementById("ReviewsReviewTextBox").value==""){D.innerHTML=EnterReviewTextError;C.innerHTML=EnterReviewTextError;return false}if(document.getElementById("ReviewsRoomRatingDropdown").value==0||document.getElementById("ReviewsLocationRatingDropdown").value==0||document.getElementById("ReviewsFacilitiesRatingDropdown").value==0||document.getElementById("ReviewsServiceRatingDropdown").value==0){D.innerHTML=EnterMissingReviewRatingError;C.innerHTML=EnterMissingReviewRatingError;return false}if((document.getElementById("ReviewsCountryDropDown").value==null)||(document.getElementById("ReviewsCountryDropDown").value=="")){D.innerHTML=EnterMissingCountryReviewError;C.innerHTML=EnterMissingCountryReviewError;return false}D.style.display="none";C.style.display="none";return true}function validStayDate(P){var I=/^\d{2}\/\d{2}\/\d{4}$/;var J=false;if(I.test(P.value)){var O=P.value.split("/")[0];var K=P.value.split("/")[1];var N=P.value.split("/")[2];var L=new Date(N,K-1,O);if((L.getMonth()+1==K)&&(L.getDate()==O)&&(L.getFullYear()==N)){J=true}var M=new Date();if(L>M){J=false}}if(J==false){P.select()}return J}function OpenDateTimePickerPopUp(){var B=getDateId();cal.select(document.getElementById(B),"callink","dd/MM/yyyy");return false}function GetDefaultCustomerName(){if(pDefaultCustomerName==null||pDefaultCustomerName==""||pDefaultCustomerName=="null"){TAN.UserControls.HotelSearchResults.GetDefaultCustomerName(GetDefaultCustomerNameCallBack)}}function GetDefaultCustomerNameCallBack(B){if(B.value=="null"||B.value==null){pDefaultCustomerName=""}else{pDefaultCustomerName=B.value}}function GetCountryDropdownHtml(){if(pCountriesDropdownHtml==null){TAN.UserControls.HotelSearchResults.GetCountryDropdownHtml(GetCountryDropdownHtmlCallBack)}}function GetCountryDropdownHtmlCallBack(B){if(B!=null){pCountriesDropdownHtml=B.value}}function GetAverageReviewRatingIconHtml(B){if(B.AverageRating<=0||B.AverageRating>5){return""}return"<strong>"+ReviewAverageRating+' </strong><img src="'+ImgPath+"/reviewrating"+B.AverageRating+'.jpg" style="border: none !important; margin-bottom: 0 !important;"/>'}function RefreshRoomRatingDisplay(){document.getElementById("ReviewsRoomRatingIcon").src=ImgPath+"/reviewrating"+document.getElementById("ReviewsRoomRatingDropdown").value+".jpg"}function RefreshLocationRatingDisplay(){document.getElementById("ReviewsLocationRatingIcon").src=ImgPath+"/reviewrating"+document.getElementById("ReviewsLocationRatingDropdown").value+".jpg"}function RefreshFacilitiesRatingDisplay(){document.getElementById("ReviewsFacilitiesRatingIcon").src=ImgPath+"/reviewrating"+document.getElementById("ReviewsFacilitiesRatingDropdown").value+".jpg"}function RefreshMealsRatingDisplay(){document.getElementById("ReviewsMealsRatingIcon").src=ImgPath+"/reviewrating"+document.getElementById("ReviewsMealsRatingDropdown").value+".jpg"}function RefreshServiceRatingDisplay(){document.getElementById("ReviewsServiceRatingIcon").src=ImgPath+"/reviewrating"+document.getElementById("ReviewsServiceRatingDropdown").value+".jpg"}function ShowHotelDetailPopup(C,D){HideUpdatingDiv();pPopUpType=D;tHotel=Hotels.get(C);GetCountryDropdownHtml();GetDefaultCustomerName();if(tHotel==null){ShowUpdatingDiv();TAN.UserControls.HotelSearchResults.RetrieveHotelDetails(C,ShowHotelDetailPopupCallBack)}else{ShowHotelDetailPopupCallBack(tHotel)}}function SwitchTab(B){if(pUpHotelId!=-1){ShowHotelDetailPopup(pUpHotelId,B)}}function CloseHotelDetailPopup(B){if(B&&dhtmlHistory.isFirstLoad()&&selectedHotelId>0){dhtmlHistory.add(selectedHotelId,selectedHotelId)}if(IE6){document.getElementById("HotelDetailsPopUp").style.position="absolute";theRules.addRule("html","overflow:auto")}else{if(theRules.addRule){theRules.addRule("html","overflow: scroll")}else{document.body.style.overflow="scroll"}}document.getElementById("graybackground").style.display="none";document.getElementById("HotelDetailsPopUp").style.display="none";document.getElementById("MaximizedPopUp").style.display="none";document.getElementById("SortingSystemDiv").style.display="block";if(document.getElementById("currency_section")!=null){document.getElementById("currency_section").style.display="block"}if(document.getElementById("LanguageSection")!=null){document.getElementById("LanguageSection").style.visibility="visible"}}function CloseMaximizedPopup(){document.getElementById("MaximizedPopUp").style.display="none"}function historyChange(C,D){if(document.getElementById("HotelDetailsPopUp").style.display=="block"){CloseHotelDetailPopup(false)}else{if(Hotels.get(selectedHotelId)!=null){ShowHotelDetailPopupCallBack(Hotels.get(selectedHotelId))}}}function SendMail(D,E,F){mail_str="mailto:?subject="+D+"&body=<strong>aaA</strong>";location.href=mail_str};
