// generated Wed Nov 25 05:36:02 EST 2009

try{jq=jQuery.noConflict()}catch(ignored){}var _isIE=(((navigator.appName).indexOf("Microsoft")>-1)?true:false);var _isSafari=(((navigator.userAgent).indexOf("Safari")>-1)?true:false);var _isDebug=false;var _defaultUpdatingIcon='<img style="vertical-align: middle" src="/images/a-confirmation-circle.gif" width="18" height="20">&nbsp;&nbsp;';var _defaultUpdatingMessage="Updating results...";var _updatingResultsMessage=null;var messageBoxDelay=1000;var _currentPageNum=1;var _numrows;var isFlexDate=false;var secondPhaseInProgress=false;var secondPhaseDisplayMessage=null;var filterMatchCriteriaPrice=null;var filterMatchCriteriaUndo=null;function getStartingRow(){return((_currentPageNum-1)*_numrows)}function getEndingRow(){return Math.min(((_currentPageNum-1)*_numrows)+_numrows,_filtered.length)}function hidePagingTooltip(){jQuery("body").unbind("click",hidePagingTooltip);jQuery("#filtercorners").css("background-color","#eee");jQuery("div.fullFilterSection").css("background-color","#eee");hideAllTT()}function showOwedSections(){jquery(".slidedown").slideDown("slow")}function showPagingTooltip(){if(typeof showPagingTooltipEnabled!="function"){return}if(showPagingTooltipEnabled()){jQuery("#filtercorners").css("background-color","#dedede");jQuery("div.fullFilterSection").css("background-color","#dedede");var offsets={x:-50,y:0};showTT(document.getElementById("topOfFilter"),'<div class=\'pagingToolTip\'><div><b>Find results faster</b></div><div>Selecting filter options on the left will narrow results to just a few.</div><span style="float: right"><a target="_blank" href="http://www.youtube.com/kayak">Tell me more</a></span></div>',"BL",offsets);jQuery("body").bind("click",hidePagingTooltip);jQuery.cookie("pgmsgshown","y");addAdt("showpgtooltip")}}function setPage(pnum,skipHistory){var num=pnum;if((skipHistory==null||!skipHistory)&&num!=_currentPageNum&&typeof addHistory=="function"){addHistory()}if(typeof hotelTwoPhaseUpdateMessage=="function"&&hotelTwoPhaseUpdateMessage()){_updatingResultsMessage="Getting results for next page...";showmessage(getUpdateMessage())}function doPage(){if(!isNaN(num)&&num>=1&&num!=_currentPageNum){_currentPageNum=num;updateTable("paging");window.scrollTo(0,0);pgNums();addAdt("page."+num);updateDisplayA_ds(num);hidemessage();if(pnum==2){showPagingTooltip()}}}waitForResults(doPage)}var R9TotalResultCount=0;function getTopPageControlsAndResultCountObsolete(optionalText,maxPagesToShow){if(optionalText==null){optionalText=""}if(maxPagesToShow==null||maxPagesToShow==""){maxPagesToShow=4}var filteredCount=_filtered.length;var resultCount=Math.max(R9TotalResultCount,_r.length);var showAll="";var filterReasons=getFilteredOutReasons().reasons;if(filteredCount>resultCount){filteredCount=resultCount}if(filteredCount<resultCount&&filterReasons.length>0){showAll='<span class="parenthetical">(<a class="actionlink" href="javascript:showLowest(false)">show all</a>)</span>'}var html=new Array();html[html.length]="<div class='topofresultsctrls'>";html[html.length]='<span class="sectioncount"> <span id="filtered_count">'+_filtered.length+'</span> of <span id="result_count">'+resultCount+"</span> shown "+optionalText+showAll+"</span>";html[html.length]="<span class='sectionpaging'>";html[html.length]=getPageControls(null,maxPagesToShow);html[html.length]="</span></div>";return html.join("")}function showRemoveFiltersLink(){var filteredCount=_filtered.length;var resultCount=Math.max(R9TotalResultCount,_r.length);var showAll="";if(filteredCount>resultCount){filteredCount=resultCount}if(filteredCount<resultCount){return true}return false}function getTopPageControlsAndResultCount(optionalText,maxPagesToShow,searchtype,showMatrixControls,currentmatrixview){if(showMatrixControls==null){showMatrixControls=true}if(optionalText==null){optionalText=""}if(maxPagesToShow==null||maxPagesToShow==""){maxPagesToShow=4}var filteredCount=_filtered.length;var resultCount=Math.max(R9TotalResultCount,_r.length);var showAll="";var filterReasons=getFilteredOutReasons().reasons;if(filteredCount>resultCount){filteredCount=resultCount}if(filteredCount<resultCount&&filterReasons.length>0){showAll='<span class="parenthetical"><a class="actionlink" href="javascript:showLowest(false)">show all</a></span>'}var html=new Array();html[html.length]="<div class='topofresultsctrls'>";if(searchtype=="flight"){html[html.length]='<span class="sectioncount">'+replaceArgs('<span class="resultcountbold">{0}</span> of <span id="result_count" class="resultcountbold">{1} {2} shown</span>',_filtered.length,resultCount,optionalText)+" "+showAll;if(showAll!=""){html[html.length]=" | "}if(showMatrixControls){if(currentmatrixview==null||currentmatrixview!="matrix"){html[html.length]='<span id="toolboxitemshowmatrix"><a class="actionlink" href="javascript: doHide();chgView(\'matrix\')">show matrix</a></span>';html[html.length]='<span id="toolboxitemhidematrix" style="display:none"><a class="actionlink" href="javascript: doHide();chgView(\'list\')">hide matrix</a></span>'}else{html[html.length]='<span id="toolboxitemshowmatrix" style="display:none"><a class="actionlink" href="javascript: doHide();chgView(\'matrix\')">show matrix</a></span>';html[html.length]='<span id="toolboxitemhidematrix" ><a class="actionlink" href="javascript: doHide();chgView(\'list\')">hide matrix</a></span>'}}html[html.length]="</span>"}else{if(searchtype=="hotel"){var onlineprices="";if(use_unpricedfilter){if(showAll!=""){showAll+='<span id="unpriced_spacer" style="padding:0 6px 0 6px;color:#999;">|</span>'}if(show_unpriced){onlineprices='<span class="parenthetical"><a class="actionlink" href="javascript:showunpriced(true);refilter(noop);" id="unpriced_on" style="display:none;">show hotels without online availability</a>';onlineprices+='<a class="actionlink" href="javascript:showunpriced(false);refilter(noop)" id="unpriced_off" >hide hotels without online availability</a></span>'}else{onlineprices='<span class="parenthetical"><a class="actionlink" href="javascript:showunpriced(true);refilter(noop);" id="unpriced_on">show hotels without online availability</a>';onlineprices+='<a class="actionlink" href="javascript:showunpriced(false);refilter(noop)" id="unpriced_off" style="display:none;">hide hotels without online availability</a></span>'}}html[html.length]='<span class="sectioncount">'+replaceArgs('<span class="resultcountbold">{0}</span> of <span class="resultcountbold">{1} hotels shown</span>',_filtered.length,resultCount)+" "+optionalText+showAll+onlineprices+"</span>"}else{if(searchtype=="car"){html[html.length]='<span class="sectioncount">'+replaceArgs('<span class="resultcountbold">{0}</span> of <span class="resultcountbold">{1} car rentals shown</span>',_filtered.length,resultCount)+" "+optionalText+showAll+" ";if(showMatrixControls){if(currentmatrixview==null||currentmatrixview!="matrix"){html[html.length]='<span id="toolboxitemshowmatrix"><a class="actionlink" href="javascript: doHide();chgView(\'matrix\')">show matrix</a></span>';html[html.length]='<span id="toolboxitemhidematrix" style="display:none"><a class="actionlink" href="javascript: doHide();chgView(\'list\')">hide matrix</a></span>'}else{html[html.length]='<span id="toolboxitemshowmatrix" style="display:none"><a class="actionlink" href="javascript: doHide();chgView(\'matrix\')">show matrix</a></span>';html[html.length]='<span id="toolboxitemhidematrix"><a class="actionlink" href="javascript: doHide();chgView(\'list\')">hide matrix</a></span>'}}html[html.length]="</span>"}else{if(searchtype=="deal"){if(getDealPageType()=="A"){html[html.length]='<span class="sectioncount">'+replaceArgs('<span class="resultcountbold">{0} auctions found</span><span id="allAuctionHeaderLink"> (<a style="text-decoration: underline" href="javascript: NavListLinks(\'/dealssearch?auction=true&type=A&dest=\'+escape(\'All Auctions\'))">show all auctions</a>)</span>',_filtered.length,resultCount)+" "+optionalText+"</span>"}else{html[html.length]='<span class="sectioncount">'+replaceArgs('<span class="resultcountbold">{0} deals found</span>',_filtered.length,resultCount)+" "+optionalText+"</span>"}}else{html[html.length]='<span class="sectioncount"> <span id="filtered_count">'+_filtered.length+'</span> of <span id="result_count">'+resultCount+"</span> shown "+optionalText+showAll+"</span>"}}}}html[html.length]="<span class='sectionpaging'>";html[html.length]=getPageControls(null,maxPagesToShow);html[html.length]="</span></div>";return html.join("")}function getPageControls(tableclass,maxPagesToShow){if(maxPagesToShow==null){maxPagesToShow=5}var numpages=Math.ceil(_filtered.length/_numrows);if(numpages<2){return""}if(maxPagesToShow<0){return getMinimalPageControls(tableclass)}if(tableclass==null){tableclass="pagecontrols"}var pageControls="<table class='"+tableclass+"'><tr style='white-space:nowrap;'>";if(numpages>1){if(_currentPageNum==1){pageControls+="<td class='light' style='color:#999;white-space:nowrap;text-align:left;'><nobr>&laquo;&nbsp;Prev </nobr></td>"}else{pageControls+="<td style='white-space:nowrap;text-align:left;' ><nobr>&laquo;&nbsp;<a href=\"javascript:setPage("+(_currentPageNum-1)+');">Prev</a> </nobr></td>'}var i=Math.max((_currentPageNum-1),1);if(i>1){pageControls+="<td  onclick='setPage("+1+");' class='pageunsel'><a class='actionlink' href='javascript: setPage("+1+");'>"+1+"</a></td>";if(i>2){pageControls+="<td>&hellip;</td>"}}for(;i<=numpages&&maxPagesToShow>0;i++){if(i==_currentPageNum){pageControls+="<td class='current'>"+i+"</td>"}else{pageControls+="<td onclick='setPage("+i+");' class='pageunsel'><a class='actionlink' href='javascript: setPage("+i+");'>"+i+"</a></td>"}maxPagesToShow--}if(i<numpages){pageControls+="<td>&hellip;</td>";pageControls+="<td onclick='setPage("+numpages+");' class='pageunsel'><a class='actionlink' href='javascript: setPage("+numpages+");'>"+numpages+"</a></td>"}if(_currentPageNum==numpages){pageControls+="<td class='light' style='color:#999;white-space:nowrap;text-align:right;'><nobr>Next&nbsp;&raquo;</nobr></td>"}else{pageControls+="<td style='white-space:nowrap;text-align:right;'><a class='actionlink' href='javascript: setPage("+(_currentPageNum-0+1)+");'><nobr>Next</a>&nbsp;&raquo;</nobr></td>"}}pageControls+="</tr></table>";return pageControls}function getMinimalPageControls(tableclass){if(tableclass==null){tableclass="pagecontrolsminimal"}var pageControls="<table class='"+tableclass+"' border='0' cellpadding='0' cellspacing='0' style='padding:0;' ><tr style='white-space:nowrap;'>";var numpages=Math.ceil(_filtered.length/_numrows);if(numpages>0){if(_currentPageNum==1){pageControls+="<td class='light' style='color:#999;white-space:nowrap;text-align:left;'><nobr>&laquo;&nbsp;Prev</nobr></td>";pageControls+="<td class='light' style='color:#999;text-align:center;'> &ndash; </td>"}else{pageControls+="<td class='pageunsel' style='white-space:nowrap;text-align:left;' ><nobr>&laquo;&nbsp;<a href=\"javascript:setPage("+(_currentPageNum-1)+');">Prev</a> </nobr></td>';pageControls+="<td class='light' style='color:#999;text-align:center;'> &ndash; </td>"}if(_currentPageNum==numpages){pageControls+="<td class='light' style='color:#999;white-space:nowrap;text-align:right;'><nobr>Next&nbsp;&raquo;</nobr></td>"}else{pageControls+="<td class='pageunsel' style='white-space:nowrap;text-align:right;' ><nobr><a class='actionlink' href='javascript: setPage("+(_currentPageNum-0+1)+");'>Next</a>&nbsp;&raquo;</nobr></td>"}}pageControls+="</tr></table>";return pageControls}function getSeparatorLines(colspan,topcolor,bottomcolor){var separatorLines=new StringBuilder();separatorLines.append('<tr style="background-color:'+topcolor+';padding:0px;">');separatorLines.append('<td colspan="'+colspan+'" nowrap style="height:1px;background-color:'+topcolor+';padding:0px;" >');separatorLines.append("</td>");separatorLines.append("</tr>");separatorLines.append('<tr style="background-color:'+bottomcolor+';padding:0px;">');separatorLines.append('<td colspan="'+colspan+'" nowrap style="height:1px;background-color:'+bottomcolor+';padding:0px;" >');separatorLines.append("</td>");separatorLines.append("</tr>");return separatorLines.toString()}function clearPages(){_currentPageNum=1}function fNumRows(v){_numrows=(v>_filtered.length?_filtered.length:v);pgNums()}function sumbitEmail(field,btnfield){if(field.value.length==0||!validateEmail(field.value)){try{field.focus()}catch(ignored){}alert("Please enter a valid email address.");return false}try{btnfield.disabled=true}catch(ignored){}return true}function getUpdateMessage(defaultMsg){var msgToShow="";if(_updatingResultsMessage!=null&&_updatingResultsMessage.length>0){msgToShow+=_updatingResultsMessage}else{if(defaultMsg!=null&&defaultMsg.length>0){msgToShow+=defaultMsg}else{msgToShow+=_defaultUpdatingMessage}}return msgToShow}function resizeNumRows(v,cookiename){setTop(0);fNumRows(v);if(cookiename!=null&&cookiename.length>0){SetCookie(cookiename,v,365)}showmessage(getUpdateMessage());function resizeUpdate(){updateTable("resultsPerPage_"+v);hidemessage();_updatingResultsMessage=null;R9ResultsRendered=new Date()}window.setTimeout(resizeUpdate,1)}function jumpToTopOfFilters(){try{document.getElementById("filtercorners").scrollIntoView()}catch(ignored){}}function pgNums(){try{var currentNumPages=Math.floor(_filtered.length/_numrows)+((_filtered.length%_numrows>0)?1:0)}catch(ignored){}var useFilterMsg="";if(R9RsltCount==_filtered.length){useFilterMsg="<div class='useFiltersUpsell'>Too many pages? Use the <a href='javascript: jumpToTopOfFilters()'>filters</a> to instantly narrow down the list.</div>"}jq("#bottomPageControls").show();document.getElementById("bottomPageControls").innerHTML=getPageControls(null,4)+useFilterMsg;if(document.getElementById("showPhotosCB")!=null){jq("showPhotosCB").show();document.getElementById("showPhotosCB").innerHTML='<b>Show:</b>&nbsp;<input type="checkbox" id="showPhotos" onclick="togglePhotoDisplay(this.checked)" value="Y" '+((showPhotos)?'checked="checked"':"")+">photos"}}function setTop(i){document.getElementById("pagefirstrow").value=i;pgNums()}function computeFiltered(){_filtered=new Array();var k=0;var filterSmarts=new FilterFunctions();filterSmarts.setup();for(var j=0;j<_r.length;j++){var i=_r[j]._order;if(_r[i]._vs<0){continue}if(filterSmarts.includeRow(i)){_filtered[k++]=i}}if(document.getElementById("filtered_count")!=null){document.getElementById("filtered_count").innerHTML=_filtered.length}}function noop(){}function refilter(subfunc,resetPages,reason){showmessage(getUpdateMessage());addHistory();var func=subfunc;function doRefilter(){var start=new Date();clearPages();var nr=parseInt(document.resultsPaging.rowsper.value);if(resetPages==null||resetPages){setTop(0)}func();computeFiltered();if(nr>_numrows){fNumRows(nr)}if(_lastsort==null){updateTable(reason)}else{if(_lastdirection!=null){_lastdirection=!_lastdirection}sortresults(_lastsort,true)}window.setTimeout(hidemessage,250);_updatingResultsMessage=null;updateDisplayA_ds("filter");var end=new Date();addAdt("filtertime."+(end.getTime()-start.getTime()));if(typeof resetResultCount=="function"){resetResultCount()}}waitForResults(doRefilter)}function sortresults(sortfunc,skipHistory){var starttime=new Date();showmessage(getUpdateMessage("Sorting results..."));var func=sortfunc;function doSort(){var start=new Date();clearPages();setTop(0);func();var endtime=new Date();var extratime=messageBoxDelay-(endtime.getTime()-starttime.getTime());window.setTimeout(hidemessage,((extratime>0)?extratime:1));_updatingResultsMessage=null;var end=new Date();addAdt("sorttime."+(end.getTime()-start.getTime()));updateTable("sorting");updateDisplayA_ds("sort");var draw=new Date();if((skipHistory==null||!skipHistory)&&typeof addHistory=="function"){addHistory()}var afterHistory=new Date()}waitForResults(doSort)}var _maxprice=999999;function pricerange(){var i=document.resultUI.price_to.selectedIndex;_maxprice=document.resultUI.price_to[i].value}function openNewWindow(name,url,width,height){var args="title="+name+",width="+width+",height="+height+",location=no,menubar=no,resizable=yes,toolbar=no,status=no,scrollbars=yes";var newWin=window.open(url,"name",args);if(newWin==null){alert("Please make sure you are not blocking popups.")}else{newWin.focus()}}function openHotelDetail(url){openNewWindow("hoteldetail",url,650,600)}var _blankimg='&nbsp;<img src="/images/1x1_blank.gif" width="7" height="6" align="absmiddle" border="0">';var _sortup='&nbsp;<img src="/images/sort-up.gif" width="9" height="11" align="absmiddle"  border="0">';var _sortdown='&nbsp;<img src="/images/sort-down.gif" width="9" height="11" align="absmiddle"  border="0">';function sortImg(ascending){return(ascending?_sortup:_sortdown)}var _ps="results_price";var _ds="results_data";var _dsbk="results_book";var _dsm="results_dataMono";var _dsb="results_dataBold";function thdr(content,sort,width,align,span,style){var tag='<th class="results_headerNoSort'+((style)?" "+style:"")+'"';if(sort){tag='<th class="results_headerSort'+((style)?" "+style:"")+'"'}if(width){tag+=' width="'+width+'"'}if(align){tag+=' align="'+align+'"'}if(span){tag+=" colspan="+span}return tag+" nowrap>"+content+"</th>"}function tdata(content,style,width,align,span){var tag="<td";if(style){tag='<td class="'+style+'"'}if(width&&width!="-1"){tag+=' width="'+width+'"'}if(align){tag+=' align="'+align+'"'}if(span){tag+=" colspan="+span}return tag+">"+content+"</td>"}function nowrap(content,style,width,align,span){var tag="<td nowrap";if(style){tag+=' class="'+style+'"'}if(width){tag+=' width="'+width+'"'}if(align){tag+=' align="'+align+'"'}if(span){tag+=" colspan="+span}return tag+">"+content+"</td>"}function thead(content,span){if(span){return"<th colspan="+span+">"+content+"</th>"}else{return"<th>"+content+"</th>"}}function trow(stuff,classname){if(classname==null){return"<tr align='center'>"+stuff+"</tr>"}else{return"<tr align='center' class='"+classname+"'>"+stuff+"</tr>"}}function table(stuff,padding){var pad=0;if(padding){pad=padding}return"<table width='100%' border='0' cellpadding='"+pad+"' cellspacing='0'>"+stuff+"</table>"}function setHTML(document,id,content){if(id===null){id="headerspace"}try{document.getElementById(id).innerHTML=content}catch(e){window.status=exceptionMsg(e)}}function exceptionMsg(e){var smsg="Exception debug:"+(typeof e=="string")?e:((e.message)?e.message:"Unknown Error");return smsg}function beep(){}function displayDuration(duration){var mins=duration%60;if(mins<10){mins="0"+mins}var hrs=(duration-mins)/60;return replaceArgs("{0}h {1}m",hrs,mins)}function displayMoney(number,reround){return"$"+(reround=="no"?number:roundMoney(number))}function displayMoneyNoCurrency(number,reround){return(reround=="no"?number:roundMoney(number))}function roundMoney(number){return Math.floor(number+0.5)}var _showimg='<img src="/images/foldoutmenu_arrow_open.gif" width=15 height=14 align="absmiddle">';var _hideimg='<img src="/images/foldoutmenu_arrow.gif" width=15 height=14 align="absmiddle">';var hiddenDivs=new Array();function sethidden(id){hiddenDivs[id]=false}function toggleDiv(id){if(hiddenDivs[id]==false){return showDiv(id)}else{return hideDiv(id)}}function hideDiv(id){if(!_isIE){document.getElementById(id).style.height=2;document.getElementById(id).style.visibility="hidden"}else{document.getElementById(id).style.display="none"}setHTML(document,id+"arrow",_hideimg);return(hiddenDivs[id]=false)}function showDiv(id){if(!_isIE){document.getElementById(id).style.height="auto";document.getElementById(id).style.visibility="visible"}else{document.getElementById(id).style.display="inline"}setHTML(document,id+"arrow",_showimg);return(hiddenDivs[id]=true)}function getSelectByValue(what,value){for(var i=0;i<what.length;i++){if(what[i].value==value){return i}}return -1}function sizeForBrowser(){var rows=document.resultsPaging.rowsper.value;var width=screen.width;var height=screen.height;var j=document.resultsPaging.rowsper.selectedIndex;document.resultsPaging.rowsper[j].selected=false;j=0;if(width>=800&&height>=600){j++}if(width>1024&&height>768){j++}document.resultsPaging.rowsper[j].selected=true;rows=document.resultsPaging.rowsper.value;return rows}function showResultsMessage(htmlToSet){document.getElementById("resultmessage").innerHTML=htmlToSet}function hideResultsMessage(){document.getElementById("resultmessage").innerHTML=""}function dtl_cb(){this.onLoad=function(xmlobj){alert(xmlobj);if(xmlobj.xmlhttp.readyState==4){if(xmlobj.xmlhttp.status==200){if(xmlobj.getText().indexOf("bad")>=0){window.alert("Sorry, but your session has timed out. Please rerun your search if you wish to book.")}else{var dtlWin=window.open(xmlobj.uservars.dtlURL,"bookit");if(dtlWin){dtlWin.focus()}}}else{}}};this.onError=function(status,statusText){alert("Sorry, we could not retrieve details.  Please try again.  If this continues to happen, please try your search again or send feedback.")}}function dtl(sessionid,detailurl){var args=new Object();args.dtlURL=detailurl;var client=new R9HTTPXml();client.init(getProductVersionURI()+"/r9/affinity","action=session&anon=true&sid="+escape(sessionid),args);try{client.asyncGET(new dtl_cb())}catch(e){alert(e)}}function updateDisplayA_ds_cb(){this.onLoad=function(xmlobj){if(xmlobj.xmlhttp.readyState==4){if(xmlobj.xmlhttp.status==200){var results=xmlobj.getTags("results");if(results){try{var banner1=xmlobj.getTagText(results[0],"bannerad",0);var container1=document.getElementById("bannerad1");if(banner1&&container1){container1.innerHTML=banner1}var banner2=xmlobj.getTagText(results[0],"bannerad",1);var container2=document.getElementById("bannerad2");if(banner2&&container2){container2.innerHTML=banner2}var banner3=xmlobj.getTagText(results[0],"bannerad",2);var container3=document.getElementById("bannerad3");if(banner3&&container3){container3.innerHTML=banner3}}catch(e){alert(e)}}}}};this.onError=function(status,statusText){alert("Sorry, we could not retrieve details.  Please try again.  If this continues to happen, please try your search again or send feedback.")}}var lastclickid=null;var lastclickmsg="";function itemClicked(id,message,pcode){if(window.hidePriceSelections){hidePriceSelections()}_r[id]._vs=1;if(lastclickid!=null){_r[lastclickid]._vs=2}var newStyle=(document.getElementById("popupAfterBooking")!=null);if(!newStyle){if(_isIE){document.getElementById("msg"+id).style.display="block"}else{document.getElementById("msg"+id).style.display="table-row"}document.getElementById("resultmessage"+id).innerHTML=message;try{showprices(id,true)}catch(ignored){}}else{openbooking(null,message,pcode,id)}if(lastclickid!=null){if(document.getElementById("msg"+lastclickid)!=null){document.getElementById("msg"+lastclickid).style.display="none"}if(document.getElementById("tbd"+lastclickid)!=null){document.getElementById("tbd"+lastclickid).style.backgroundColor="#eeeeee"}}document.getElementById("tbd"+id).style.backgroundColor="#EEFFCC";lastclickmsg=message;lastclickid=id;addAdt("resultclick");return true}function openbooking(id,message,pcode,idx){var popupid=(id!=null)?id:"popupAfterBooking";var theDiv=document.getElementById(popupid);if(theDiv!=null){function closeBookingDialog(){closebooking(popupid)}toggleFaderPane(true,closeBookingDialog);theDiv.style.display="block";theDiv.style.top=(getScrollAmount()-0+150)+"px";if(message!=null){jq("#popupbookmessage").html(message);message="<span class='closearea'><a class='actionlink' href='javascript: closebooking()'>close</a> <img onclick='closebooking()' src='/images/close-x-white.gif' border='0' /></span>"+message;jq("#popupAfterBooking > tbody > tr > td.title").html(message).children("span.fnf").css("display","none")}jq("#fnflink > a").attr("href","javascript: flightnotfound("+idx+", '"+pcode+"')");if(typeof searchid!="undefined"){var tripslink="/s/addtotrip?searchid="+searchid+"&resultid="+_r[idx]._id+"&pcode="+pcode;jq("#addtotripslink").attr("href","javascript: addResultToTrip('"+tripslink+"')")}}}function closebooking(id){toggleFaderPane(false);var popupid=(id!=null)?id:"popupAfterBooking";var theDiv=document.getElementById(popupid);if(theDiv!=null){theDiv.style.display="none"}}function addResultToTrip(url){jq.getScript(url)}function hideSearchBox(){toggleFaderPane(false);document.getElementById("popupSearch").style.display="none"}function updateSearchFilter(cnt){var theDiv=document.getElementById("searchFilterTD");if(theDiv!=null){if(cnt==0){theDiv.className="noresults"}else{theDiv.className="results_box"}}}function hideMessageAboveResults(){jq("tr.results_message_tr").hide();jq("tr.results_message_tr_spacer").hide()}function showMessageAboveResults(html){try{jq("span.aboveresultmessagetext").html(html);jq("tr.results_message_tr").show();jq("tr.results_message_tr_spacer").show()}catch(ignored){}}var _lastEmailAttemptID=null;function emailresult(resultid,searchid,idx,bookingid){var height=585;var width=550;var titlebar=0;var params="?resultid="+resultid+"&searchid="+searchid;if(bookingid){params+="&bookingid="+bookingid}var winemail=window.open("/s/emailresult"+params,"emailresult","scrollbars,height="+(height+titlebar)+",width="+width+",menubar=no,toolbar=no,resizable");if(winemail!=null){if(idx>0){_lastEmailAttemptID=idx}winemail.focus()}}var _lastEmailAttemptID=null;function emailMessage(emailtype,subject,description,idx,addparams){var height=585;var width=550;var titlebar=0;var params="?emailtype="+escape(emailtype)+"&subject="+escape(subject)+"&message="+escape(description)+"&"+addparams;var winemail=window.open("/s/emailresult"+params,"emailresult","scrollbars,height="+(height+titlebar)+",width="+width+",menubar=no,toolbar=no,resizable");if(winemail!=null){if(idx!=null&&idx>0){_lastEmailAttemptID=idx}winemail.focus()}}function emailsuccess(){if(_lastEmailAttemptID!=null){try{itemClicked(_lastEmailAttemptID,"Result details emailed and saved to your search history.");_lastEmailAttemptID=null}catch(ignored){}}}function stripdotcom(str){var baseString=new String(str);while(baseString.length>6&&(baseString.length-baseString.lastIndexOf(".")<=4)){baseString=baseString.substring(0,baseString.indexOf("."))}if(baseString.toLowerCase()=="hotels"||baseString.toLowerCase()=="hotel"||baseString.toLowerCase()=="airfare"||baseString.toLowerCase()=="bedandbreakfast"||baseString.toLowerCase()=="booking"){return str}return baseString}var pinnedResultList=new Array();var displayPinnedItems=true;var _itemremove="<a class='padded' title='remove this result'  href=\"javascript:addAdt('remove');removeDisplay(";var justPinned=-1;function isPinned(idx){for(var i=0;i<pinnedResultList.length;i++){if(pinnedResultList[i].id==idx){return true}}return false}function getPinnedIDList(){var pinnedIDArray=new Array();for(var i=0;i<pinnedResultList.length;i++){pinnedIDArray.push(_r[pinnedResultList[i].id]._pid);if(_r[pinnedResultList[i].id]._pid!=_r[pinnedResultList[i].id]._id){pinnedIDArray.push(_r[pinnedResultList[i].id]._id)}}return pinnedIDArray.join(",")}function getPinnedItem(resultid){for(var i=0;i<pinnedResultList.length;i++){if(pinnedResultList[i].id==resultid){return pinnedResultList[i]}}return null}function storePinned(fieldlist){var client=new R9HTTPXml();if(!client.inprogress){client.init("/s/sparkle",fieldlist,null);try{client.asyncGET(null)}catch(ignored){}}}function addPinned(idx){pinnedResultList.push({id:idx});justPinned=idx;updateTable("pin_"+_r[idx]._id);justPinned=-1;try{document.getElementById("startsearchover").scrollIntoView(true)}catch(ignored){}var fields=getPinSaveFields(idx);fields+="&add=Y&action=pinneditem";storePinned(fields)}function removePinned(idx){for(var i=0;i<pinnedResultList.length;i++){if(pinnedResultList[i].id==idx){pinnedResultList.splice(i,1)}}if(document.getElementById("onlymapfavorites")!=null&&pinnedResultList.length==0){document.getElementById("onlymapfavorites").checked=false;onlyShowFavorites()}updateTable("unpin_"+_r[idx]._id);var fields=getPinSaveFields(idx);fields+="&add=N&action=pinneditem";storePinned(fields)}function removeDisplay(idx){_r[idx]._vs=-1;updateTable("remove_result")}function unpinAll(){while(pinnedResultList.length>0){var item=pinnedResultList.shift();var fields=getPinSaveFields(item.id);fields+="&add=N&action=pinneditem";storePinned(fields)}pinnedResultList=new Array();if(document.getElementById("onlymapfavorites")!=null){document.getElementById("onlymapfavorites").checked=false;onlyShowFavorites()}updateTable("unpin_all")}function togglePinned(doHide){displayPinnedItems=!displayPinnedItems;updateTable("display_pinned_"+displayPinnedItems)}function singleProvider(item){if(typeof document.resultUI.pvdflt!="undefined"){var singleprovider=getRadioValue(document.resultUI.pvdflt);if(singleprovider!=""){var pvdfound=false;for(var p=0;p<item._p.length;p++){if(item._p[p]._code==singleprovider){pvdfound=true;break}}if(!pvdfound){return false}}}return true}function togglesearchbox(forceclose){var row=document.getElementById("researchentry");var icon=document.getElementById("searchagainicon");if(row!=null&&icon!=null){if(row.style.display=="none"&&(forceclose==null)){if(typeof local_togglesearchbox=="function"){local_togglesearchbox()}showTableRow("researchentry");icon.src="/images/opencloseminus.gif"}else{hideTableRow("researchentry");icon.src="/images/opencloseplus.gif"}}}function setSortArrow(){if(_lastsortid!=null&&_lastsortid!=_currentsortid){setHTML(document,_lastsortid,"");jq("#hdr"+_lastsortid).removeClass("selected")}if(_currentsortid!=null){setHTML(document,_lastsortid=_currentsortid,sortImg(_lastdirection));jq("#hdr"+_lastsortid).addClass("selected")}}function setClickableSortArrow(clickHTML){if(_lastsortid!=null&&_lastsortid!=_currentsortid){setHTML(document,_lastsortid,"");jq("#hdr"+_lastsortid).removeClass("selected")}if(_currentsortid!=null){setHTML(document,_lastsortid=_currentsortid,clickHTML+sortImg(_lastdirection)+"</a>");jq("#hdr"+_lastsortid).addClass("selected")}}function getBorderColor(ispinned){return(ispinned&&!COLLABORATE.on)?"fc0":RESULT_BORDER_COLOR}function getTopOfResultsRow(colspan,colorcode,bgcolorcode,outerbgcolorcode){var sb=new StringBuilder();return getTopOfResultsRow_SB(sb,colspan,colorcode,bgcolorcode,outerbgcolorcode).toString()}function getTopOfResultsRow_SB(stringbuilder,colspan,colorcode,bgcolorcode,outerbgcolorcode){if(typeof colorcode=="undefined"){colorcode="ccc"}if(typeof bgcolorcode=="undefined"){bgcolorcode="fff"}if(typeof outerbgcolorcode=="undefined"){outerbgcolorcode="fff"}return stringbuilder.append("<tr class='bg").append(bgcolorcode).append("'><td class='bordercell'><img height='4' width='4' border='0' src='/images/corners/new/").append(outerbgcolorcode).append("-n-").append(colorcode).append("-tl.gif'></td><td class='bordercell' colspan='").append((colspan-2)).append("' style='background-image:url(/images/corners/new/n-").append(colorcode).append("-t.gif); background-repeat: repeat-x;'></td><td class='bordercell'><img border='0' height='4' width='4' src='/images/corners/new/").append(outerbgcolorcode).append("-n-").append(colorcode).append("-tr.gif'></td></tr>")}function getBottomOfResultsRow(colspan,colorcode,bgcolorcode,outerbgcolorcode){var sb=new StringBuilder();return getBottomOfResultsRow_SB(sb,colspan,colorcode,bgcolorcode,outerbgcolorcode).toString()}function getBottomOfResultsRow_SB(stringbuilder,colspan,colorcode,bgcolorcode,outerbgcolorcode){if(typeof colorcode=="undefined"){colorcode="ccc"}if(typeof bgcolorcode=="undefined"){bgcolorcode="fff"}if(typeof outerbgcolorcode=="undefined"){outerbgcolorcode="fff"}return stringbuilder.append("<tr class='bg").append(bgcolorcode).append("'><td class='bordercell'><img height='4' width='4' border='0' src='/images/corners/new/").append(outerbgcolorcode).append("-n-").append(colorcode).append("-bl.gif'></td><td class='bordercell' colspan='").append((colspan-2)).append("' style='background-image:url(/images/corners/new/n-").append(colorcode).append("-b.gif); background-repeat: repeat-x'></td><td class='bordercell'><img border='0' height='4' width='4' src='/images/corners/new/").append(outerbgcolorcode).append("-n-").append(colorcode).append("-br.gif'></td></tr>")}function getBottomOfResultsRowSquare(colspan,colorcode,bgcolorcode,outerbgcolorcode){var stringbuilder=new StringBuilder();if(typeof colorcode=="undefined"){colorcode="ccc"}if(typeof bgcolorcode=="undefined"){bgcolorcode="fff"}if(typeof outerbgcolorcode=="undefined"){outerbgcolorcode="fff"}return stringbuilder.append("<tr class='bg").append(bgcolorcode).append("'><td class='bordercell'><img height='4' width='4' border='0' src='/images/corners/new/").append(outerbgcolorcode).append("-n-").append(colorcode).append("-bls.gif'></td><td class='bordercell' colspan='").append((colspan-2)).append("' style='background-image:url(/images/corners/new/n-").append(colorcode).append("-b.gif); background-repeat: repeat-x'></td><td class='bordercell'><img border='0' height='4' width='4' src='/images/corners/new/").append(outerbgcolorcode).append("-n-").append(colorcode).append("-brs.gif'></td></tr>")}function getLeftOfResultsCell_SB(stringbuilder,colorcode,bgcolorcode){if(typeof colorcode=="undefined"){colorcode="ccc"}if(typeof bgcolorcode=="undefined"){bgcolorcode="fff"}return stringbuilder.append("<td class='repeaty' style='background-image:url(/images/corners/new/n-").append(colorcode).append("-l.gif)'></td>")}function getLeftOfResultsCell(colorcode,bgcolorcode){if(typeof colorcode=="undefined"){colorcode="ccc"}if(typeof bgcolorcode=="undefined"){bgcolorcode="fff"}return"<td class='repeaty' style='background-image:url(/images/corners/new/n-"+colorcode+"-l.gif)'></td>"}function getRightOfResultsCell_SB(stringbuilder,colorcode,bgcolorcode){if(typeof colorcode=="undefined"){colorcode="ccc"}if(typeof bgcolorcode=="undefined"){bgcolorcode="fff"}return stringbuilder.append("<td class='repeaty' style='background-image:url(/images/corners/new/n-").append(colorcode).append("-r.gif)'></td>")}function getRightOfResultsCell(colorcode,bgcolorcode){if(typeof colorcode=="undefined"){colorcode="ccc"}if(typeof bgcolorcode=="undefined"){bgcolorcode="fff"}return"<td class='repeaty' style='background-image:url(/images/corners/new/n-"+colorcode+"-r.gif)'></td>"}function filterSectionClick(sectionname,onlyopen,bgcolor){if(bgcolor==null){bgcolor="#eeeeee"}if(onlyopen==null){onlyopen=false}var contentelem=document.getElementById("fs_content_"+sectionname);if(contentelem==null){return}if(contentelem.style.display=="none"){jq("#fs_content_"+sectionname).slideDown();jq("#"+sectionname+"_fare").show();jq("#fs_outer_"+sectionname).css({"background-color":bgcolor});jq("#fs_arrow_"+sectionname).hide();jq("#fs_arrow_"+sectionname+"_open").show();jq("#fs_header_"+sectionname).addClass("filterSectionOpen")}else{if(!onlyopen){jq("#fs_content_"+sectionname).slideUp();jq("#"+sectionname+"_fare").hide();if(previousFilterTip==sectionname){clearToolTipColor(bgcolor);hideAllTT()}jq("#fs_arrow_"+sectionname+"_open").hide();jq("#fs_arrow_"+sectionname).show();jq("#fs_header_"+sectionname).removeClass("filterSectionOpen")}}}function filterSectionClickNeo(sectionname,onlyopen,bgcolor){if(bgcolor==null){bgcolor="#e4e4e4"}if(onlyopen==null){onlyopen=false}var contentelem=document.getElementById("fs_content_"+sectionname);var outerelem=document.getElementById("fs_outer_"+sectionname);var subtext=document.getElementById("fs_headertext_"+sectionname);var arrow=document.getElementById("fs_arrow_"+sectionname);if(contentelem==null){return}if(contentelem.style.display=="none"){contentelem.style.display="block";outerelem.style.backgroundColor=bgcolor;if(arrow!=null){arrow.src="/images/a-down-arrow.gif";arrow.style.display=""}}else{if(!onlyopen){contentelem.style.display="none";if(previousFilterTip==sectionname){clearToolTipColor(bgcolor);hideAllTT()}if(arrow!=null){arrow.src="/images/a-right-arrow.gif";arrow.style.display=""}}}}function setFilterSectionText(sectionname,newtext){var subtext=document.getElementById("fs_headertext_"+sectionname);if(subtext==null){return}subtext.innerHTML=newtext}function fsHeaderMOver(sectionname){var headerelem=document.getElementById("fs_outer_"+sectionname);var subtext=document.getElementById("fs_headertext_"+sectionname);if(headerelem==null){return}if(subtext.style.visibility=="hidden"){return}headerelem.style.backgroundColor="#ffffde"}function fsHeaderMOut(sectionname,color){if(color==null){color="#eee"}var headerelem=document.getElementById("fs_outer_"+sectionname);var subtext=document.getElementById("fs_headertext_"+sectionname);if(headerelem==null){return}if(subtext.style.visibility=="hidden"){return}headerelem.style.backgroundColor=color}function refreshResults(){window.location.reload()}var filterToolTips=null;var previousFilterTip=null;function localTTHidden(){clearToolTipColor();toggleFaderPane(false,null);jq("select").show()}function clearToolTipColor(bgcolor){if(bgcolor==null){bgcolor="#eeeeee"}if(previousFilterTip!=null){setFilterSectionColor([previousFilterTip],bgcolor)}}function setFilterSectionColor(sectionnameArray,color){return}function setFilterSectionColorObsolete(sectionnameArray,color){if(sectionnameArray!=null){for(var i=0;i<sectionnameArray.length;i++){try{var elem=document.getElementById("fs_outer_"+sectionnameArray[i]);elem.style.borderWidth="2px";elem.style.borderStyle="solid";elem.style.borderColor=color}catch(ignored){}}}}function showMainFilterToolTip(bgcolor){addAdt("luhy");showFilterToolTip(0,bgcolor)}function showFilterToolTip(idx,bgcolor){if(bgcolor==null){bgcolor="#eeeeee"}addAdt("ttip."+idx);if(filterToolTips==null){return}if(typeof idx=="undefined"){idx=0}var item=filterToolTips[idx];var outerelem;if(item.isfiltersection){outerelem=document.getElementById("fs_outer_"+item.sectionname)}else{outerelem=document.getElementById(item.sectionname)}if(outerelem==null){return}clearToolTipColor(bgcolor);if(item.isfiltersection&&typeof grow!="function"){previousFilterTip=item.sectionname;filterSectionClick(item.sectionname,true)}else{if(typeof grow=="function"){grow(outerelem)}}var maxtips=getFilterSectionTipCount();var priortip=getPriorFilterSectionTipIndex(idx);var _nexttip=getNextFilterSectionTipIndex(idx);var nexttip="<table class='filterTipsControls'><tr><td width='33%' align='left'><button "+((priortip<0)?"style='visibility: hidden'":"")+" onclick='showFilterToolTip("+(priortip)+")'>&laquo; Back</button></td><td width='33%' align='center'><a href='javascript: clearToolTipColor();hideAllTT()'><b>Close tips</b></a></td><td width='33%' align='right'><button "+((_nexttip>0)?"":"style='visibility: hidden'")+" onclick='showFilterToolTip("+_nexttip+")'>Next &raquo;</button></td></tr><tr><td>&nbsp;</td><td align='center'><div class='counter'>"+getFilterSectionTipIndex(idx)+" of "+maxtips+"</td><td></td></tr></table>";showTT(outerelem,document.getElementById(item.msgid).innerHTML+nexttip,item.position);if(item.isfiltersection&&item.sectionname!="flighttimes"){var sections=new Array();sections.push(item.sectionname);setFilterSectionColor(sections,"#ffffde")}try{if(typeof grow!="function"){if(item.position=="BL"){outerelem.scrollIntoView(false)}else{outerelem.scrollIntoView(true)}}}catch(ignored){}}function showFareChartTip(positionid){if(document.getElementById("no_chart_data_helptext")!=null&&document.getElementById(positionid)!=null){showTT(document.getElementById(positionid),document.getElementById("no_chart_data_helptext").innerHTML,"TL",null,true)}}function getFilterSectionTipIndex(idx){var result=0;for(var i=0;i<filterToolTips.length;i++){if(filterToolTips[i].isfiltersection&&i<=idx){result++}}return result}function getNextFilterSectionTipIndex(idx){var result=-1;for(var i=idx+1;i<filterToolTips.length;i++){if(filterToolTips[i].isfiltersection){result=i;break}}return result}function getPriorFilterSectionTipIndex(idx){var result=-1;for(var i=0;i<idx;i++){if(filterToolTips[i].isfiltersection){result=i}}return result}function getFilterSectionTipCount(){var result=0;for(var i=0;i<filterToolTips.length;i++){if(filterToolTips[i].isfiltersection){result++}}return result}function getFilterSectionsArray(){if(filterToolTips==null){return null}var returnArray=new Array();for(var i=0;i<filterToolTips.length;i++){if(filterToolTips[i].isfiltersection){returnArray.push(filterToolTips[i].sectionname)}}return returnArray}function showFilterUpsell(resultcount,productname){var msg=replaceArgs(RANDOM_UPSELL_MESSAGE,resultcount,'<a class="actionlink" href="javascript: showMainFilterToolTip()">',productname);window.setTimeout("_showFilterUpsell("+resultcount+",'"+productname+"')",100)}function _showFilterUpsell(resultcount,productname){var msg=replaceArgs(RANDOM_UPSELL_MESSAGE,resultcount,'<a class="actionlink" href="javascript: showMainFilterToolTip()">',productname);showMessageAboveResults(msg)}function updateInterimProviderList(){var src=document.getElementById("inlineProgressProviders");var dest=document.getElementById("displayProgressProviders");if(src!=null&&dest!=null){dest.innerHTML=src.innerHTML}}function getTopMessageRow(colspan,bordercolor,resultsbgcolor){if(resultsbgcolor==null){resultsbgcolor="fff"}return'<tr style="display: none" class="results_message_tr" align="left"><td id="aboveresultsmessagetd" style="padding-right:0px; padding-left:0px; background-color: #'+resultsbgcolor+';" colspan="'+colspan+'"><table class="roundedcorners" style="background-color: #ffffde" cellspacing="0" cellpadding="0">'+getTopOfResultsRow(1,bordercolor,null,resultsbgcolor)+"<tr>"+getLeftOfResultsCell(bordercolor)+'<td  width="100%"><span  class="aboveresultmessagetext">&nbsp;</span></td>'+getRightOfResultsCell(bordercolor)+"</tr>"+getBottomOfResultsRow(1,bordercolor,null,resultsbgcolor)+'</table></td></tr><tr style="display: none" class="results_message_tr_spacer" align="left"><td colspan="'+colspan+'" class="interimblankrow" style="padding: 0">&nbsp;</td></tr>'}function opacity(id,opacStart,opacEnd,millisec){var speed=Math.round(millisec/100);var timer=0;if(opacStart>opacEnd){for(i=opacStart;i>=opacEnd;i--){setTimeout("changeOpac("+i+",'"+id+"')",(timer*speed));timer++}}else{if(opacStart<opacEnd){for(i=opacStart;i<=opacEnd;i++){setTimeout("changeOpac("+i+",'"+id+"')",(timer*speed));timer++}}}}function changeOpac(opacity,id){var object=document.getElementById(id).style;object.opacity=(opacity/101);object.MozOpacity=(opacity/100);object.KhtmlOpacity=(opacity/100);object.visibility="visible"}function mkCurrency(amt){return _LEFT_CURSYMBOL+amt+_RIGHT_CURSYMBOL}function compareToKayak(){var form=document.comparesites;var popupsOK=true;var codeArray=new Array();if(typeof form.comparetosite!="undefined"){if(typeof form.comparetosite.length=="undefined"){if(form.comparetosite.checked){codeArray.push({code:form.comparetosite.value,url:form[form.comparetosite.value+"_url"].value})}}else{var codeInputs=form.comparetosite;for(var i=0;i<codeInputs.length;i++){if(codeInputs[i].checked){codeArray.push({code:codeInputs[i].value,url:form[codeInputs[i].value+"_url"].value,group:codeInputs[i].className})}}}codeArray=chkCompareToGroups(codeArray);for(var j=0;j<codeArray.length;j++){popupsOK=(popupsOK&&singlewindow(j,codeArray[j].code,codeArray[j].url,codeArray.length))}window.focus()}if(!popupsOK){document.getElementById("innerTableTTTL").style.width="800px";popupBlockerMsg(null);window.focus()}}function singlewindow(num,code,url,total){var windowname=code;if(code.indexOf("_")>0){windowname=code.substring(0,code.indexOf("_"))}var sWidth=800;var sHeight=600;if(screen.availWidth){sWidth=screen.availWidth;sHeight=screen.availHeight}else{if(document.all){sWidth=window.screen.availWidth;sHeight=window.screen.availHeight}}var width=Math.min(800,Math.floor(sWidth/total-10));try{var args=replaceArgs("height={0},width={1},top={2},left={3},menubar=1,location=1,resizable=1,scrollbars=1,toolbar=1",sHeight,width,0,Math.floor(width*num+10*num));var mywin=window.open(url,windowname,args);mywin.focus()}catch(ignored){return false}return true}function popupBlockerMsg(form){try{jq("select").hide()}catch(ignored){}toggleFaderPane(true,null);showTT(document.getElementById("popupTTIPPos"),document.getElementById("popupWarning").innerHTML,"TL");jq("#tooltipdivimageholder").empty().append("<img align='left' style='margin-right: 8px' src='/images/a-pop-up-ani.gif'>");window.focus()}function popupContinue(){toggleFaderPane(false,null);hideAllTT();try{jq("select").show()}catch(ignored){}}function makeResultsMessageArea(message,colspan,tbodyID,contentID,doDisplay,bgcolor,bordercolor,outerbgcolor){var innerRows=(colspan-2);var rowHTML=new Array();rowHTML[rowHTML.length]="<tbody id='"+tbodyID+"' style='background-color: "+bgcolor+"; "+(doDisplay?"":" display: none")+"'>"+getTopOfResultsRow(colspan,bordercolor,bgcolor,outerbgcolor);rowHTML[rowHTML.length]=getLeftOfResultsCell(bordercolor,outerbgcolor);rowHTML[rowHTML.length]="<td style='width:99%' id='"+contentID+"' colspan='"+innerRows+"'>"+message+"</td>";rowHTML[rowHTML.length]=getRightOfResultsCell(bordercolor,"fff");rowHTML[rowHTML.length]=getBottomOfResultsRow(colspan,bordercolor,bgcolor,outerbgcolor)+"</tbody>";rowHTML[rowHTML.length]='<tr id="'+tbodyID+'Spacer" style="'+(doDisplay?"":" display: none")+'"><td class="resultblankrow" colspan="'+colspan+'">&nbsp;</td></tr>';return rowHTML.join("")}function makeResultsMessageRow(message,colspan,contentID,bgcolor){var rowHTML=new Array();rowHTML[rowHTML.length]="<tr style='background-color:"+bgcolor+"'>";rowHTML[rowHTML.length]="<td style='width: 99%' id='"+contentID+"' colspan='"+colspan+"'>"+message+"</td>";rowHTML[rowHTML.length]="</tr>";return rowHTML.join("")}function makeTopOfResultsMessageArea(message,colspan,tbodyID,contentID,doDisplay,bgcolor,bordercolor,outerbgcolor){var innerSpan=(colspan-2);var rowHTML=new Array();rowHTML[rowHTML.length]="<tr class='topControls' id='"+tbodyID+"' style='"+(doDisplay?"":" display: none;")+"'>";rowHTML[rowHTML.length]=getLeftOfResultsCell(bordercolor,outerbgcolor);rowHTML[rowHTML.length]="<td id='"+contentID+"' colspan='"+innerSpan+"' >";rowHTML[rowHTML.length]="<div "+(doDisplay?"":"style='display:none' ")+">";rowHTML[rowHTML.length]=message;rowHTML[rowHTML.length]="</div>";rowHTML[rowHTML.length]="</td>";rowHTML[rowHTML.length]=getRightOfResultsCell(bordercolor,"fff");rowHTML[rowHTML.length]="</tr>";return rowHTML.join("")}function makeResultsMessageTableData(message,colspan,contentID,bgcolor){var rowHTML=new Array();rowHTML[rowHTML.length]="<td style='width: 99%' id='"+contentID+"' colspan='"+colspan+"'>"+message+"</td>";return rowHTML.join("")}function makeResultsMessageTableDataSlide(message,colspan,contentID,bgcolor){var rowHTML=new Array();rowHTML[rowHTML.length]="<td style='height:1px;' id='"+contentID+"' colspan='"+colspan+"'>";rowHTML[rowHTML.length]="<div style='display:none' class='slidedown' >";rowHTML[rowHTML.length]=message;rowHTML[rowHTML.length]="</div>";rowHTML[rowHTML.length]="</td>";return rowHTML.join("")}function priceExistsInShown(price){for(var i=0;i<_filtered.length;i++){if(isPinned(_filtered[i])){continue}if(_r[_filtered[i]]._p.length>0&&Math.round(_r[_filtered[i]]._p[0]._price)<=Math.round(price)){return true}}return false}function undoFilterMatchCriteria(){if(filterMatchCriteriaUndo!=null){eval(filterMatchCriteriaUndo);filterMatchCriteriaUndo=null}}function checkFilterPriceMatch(){if(filterMatchCriteriaPrice!=null){var displaying=priceExistsInShown(filterMatchCriteriaPrice);if(!displaying){undoFilterMatchCriteria();window.setTimeout('showMessageAboveResults("<span>'+getFiltersUndoneMessage(filterMatchCriteriaPrice)+'</span>")',3000);filterMatchCriteriaPrice=null;return false}}return true}function getCurrencyPriceLength(price,currencyChars){var priceStr=""+price;return(priceStr.length+currencyChars)}function getBookingPriceClass(price,currencyChars){var digits=getCurrencyPriceLength(price,currencyChars);if(digits>8){return"bookitlongestprice"}else{if(digits>5){return"bookitlongprice"}}return"bookitprice"}function isNumeric(vTestValue){var sField=""+vTestValue;if(sField.length==0){return false}else{if(sField.length==1&&(sField.charAt(0)=="."||sField.charAt(0)==","||(sField.charAt(0)=="-"))){return false}}for(var x=0;x<sField.length;x++){if((sField.charAt(x)>="0"&&sField.charAt(x)<="9")||sField.charAt(x)=="."||sField.charAt(x)==","||(sField.charAt(x)=="-"&&x==0)){}else{return false}}return true}function hideLinkCopy(){return toggleLinkCopy(false)}function toggleLinkCopy(show){if(show){toggleFaderPane(true,hideLinkCopy);var offset=jq("#linktopage").offset();var left=offset.left+jq("#linktopage").width()-jq("#linkcopyform").width();jq("#linkcopyform").css("left",left+"px");jq("#linkcopyform").show();jq("iframe").css("visibility","hidden");document.getElementById("linktosearch").value=document.getElementById("linktosearch").defaultValue;document.getElementById("linktosearch").select()}else{jq("iframe").css("visibility","visible");toggleFaderPane(false,null);jq("#linkcopyform").hide()}}function getLeaveBehindFilterCell(sectionName,undoJS){var _isIE=(((navigator.appVersion).indexOf("MSIE 6.")>-1)?true:false);var iconhtml=new Array();iconhtml[iconhtml.length]="<table cellspacing='0' cellpadding='0'  class='leaveBehindItem"+((_isIE)?" leaveBehindIE":"")+"'><tr>";iconhtml[iconhtml.length]="<td class='leftside'><img src='/images/1x1_blank.gif' width='5' /></td><td nowrap='nowrap' class='content'>";iconhtml[iconhtml.length]="<a href='javascript: "+undoJS+'; addAdt("leavebehind.'+sectionName+"\");'>"+sectionName+" <img border='0' src='/v287/images/close-x-77c.gif'/></a>";iconhtml[iconhtml.length]="</td><td class='rightside'><img src='/images/1x1_blank.gif' width='5' /></td></tr></table>";return iconhtml.join("")}function getLeaveBehindFilterReasons(){var content=new Array();var actionMap=new Object();var filterReasons=getFilteredOutReasons().reasons;for(var i=0;i<filterReasons.length;i++){var reason=filterReasons[i];if(actionMap[reason.heading]==null){if(i==0){content[content.length]="<table class='leaveBehind'><tr><td class='title' valign='top'>Filters Applied:</td><td valign='top'>"}content[content.length]=getLeaveBehindFilterCell(reason.heading,reason.action)+" ";actionMap[reason.heading]=true}}if(content.length>0){content[content.length]="</td></tr></table>";return content.join("")}return null}function collaborateStart(searchid){var mydata="action=shareresults&searchid="+searchid;jq.ajax({type:"POST",url:"/s/collabajax",data:mydata,dataType:"html",success:function(html){try{showTT(document.getElementById("shareresultstd"),"","DL");jq("#ttipDL").html(html)}catch(ignored){}},error:function(request,textStatus,error){alert(textStatus)},cache:false})}function setSliderToMinMax(selector,thumbCount){if(thumbCount==2){if(jQuery(selector).slider("values",0)!=jQuery(selector).slider("option","min")){jQuery(selector).slider("values",0,jQuery(selector).slider("option","min"))}if(jQuery(selector).slider("values",1)!=jQuery(selector).slider("option","max")){jQuery(selector).slider("values",1,jQuery(selector).slider("option","max"))}}if(thumbCount==1){if(jQuery(selector).slider("value")!=jQuery(selector).slider("option","max")){jQuery(selector).slider("value",jQuery(selector).slider("option","max"))}}}function captureState(){if(_ALLRESULTSLOADED){document.resultUI.lastfilteredlist.value=_filtered.join("|")}}function restoreStateFromObj(statevar){if(typeof statevar.flist!="undefined"){_filtered=document.resultUI.lastfilteredlist.value.split("|");if(document.resultUI.lastpagenum.value!=""){_currentPageNum=document.resultUI.lastpagenum.value}var newsortid="";if(typeof statevar.sortid!="undefined"){newsortid=statevar.sortid}updateTable();if(newsortid!=""){_currentsortid=newsortid;setSortArrow()}if(typeof restoreStateProduct=="function"){restoreStateProduct()}}}if(typeof jQuery.history!="undefined"){jQuery.history.callback=function(reinstate,cursor){if(typeof(reinstate)!="undefined"){restoreStateFromObj(reinstate)}}}function addHistory(){if(_ALLRESULTSLOADED&&typeof jQuery.history!="undefined"){var filterlist=_filtered.join("|");var state={type:"page",pagenum:_currentPageNum,sortdirection:_lastdirection,sortid:_lastsortid,flist:filterlist};jQuery.history(state)}};

var jsck_sparkle="v287";
// generation time: 16ms
