var seperator='-';var enableDateFrom=new Date();var enableDateTo=new Date();enableDateFrom.setDate(enableDateFrom.getDate()-1);enableDateTo.setFullYear(enableDateTo.getFullYear()+1);function getObj(objID)
{if(document.getElementById){return document.getElementById(objID);}
else if(document.all){return document.all[objID];}
else if(document.layers){return document.layers[objID];}}
function checkClick(e){e?evt=e:evt=event;CSE=evt.target?evt.target:evt.srcElement;if(getObj('fc'))
if(!isChild(CSE,getObj('fc')))
getObj('fc').style.display='none';}
function isChild(s,d){while(s){if(s==d)
return true;s=s.parentNode;}
return false;}
function Left(obj)
{var curleft=0;if(obj.offsetParent)
{while(obj.offsetParent)
{curleft+=obj.offsetLeft
obj=obj.offsetParent;}}
else if(obj.x)
curleft+=obj.x;return curleft;}
function Top(obj)
{var curtop=0;if(obj.offsetParent)
{while(obj.offsetParent)
{curtop+=obj.offsetTop
obj=obj.offsetParent;}}
else if(obj.y)
curtop+=obj.y;return curtop;}
document.write('<table id="fc" style="position:absolute;top:10px;left:100px;border-collapse:collapse;background:#FFFFFF;border:1px solid #ABABAB;z-index:999;display:none" cellpadding=2>');document.write('<tr><td style="cursor:pointer" onclick="csubm()"><img src="http://www.visitkievukraine.com/images/css/arrowleftmonth.gif"></td><td colspan=5 id="mns" align="center" style="font:bold 13px Arial"></td><td align="right" style="cursor:pointer" onclick="caddm()"><img src="http://www.visitkievukraine.com/images/css/arrowrightmonth.gif"></td></tr>');document.write('<tr><td align=center style="background:#ABABAB;font:12px Arial">S</td><td align=center style="background:#ABABAB;font:12px Arial">M</td><td align=center style="background:#ABABAB;font:12px Arial">T</td><td align=center style="background:#ABABAB;font:12px Arial">W</td><td align=center style="background:#ABABAB;font:12px Arial">T</td><td align=center style="background:#ABABAB;font:12px Arial">F</td><td align=center style="background:#ABABAB;font:12px Arial">S</td></tr>');for(var kk=1;kk<=6;kk++){document.write('<tr>');for(var tt=1;tt<=7;tt++){num=7*(kk-1)-(-tt);document.write('<td id="v'+num+'" style="width:18px;height:18px">&nbsp;</td>');}
document.write('</tr>');}
document.write('</table>');document.all?document.attachEvent('onclick',checkClick):document.addEventListener('click',checkClick,false);var now=new Date;var sccm=now.getMonth();var sccy=now.getFullYear();var ccm=now.getMonth();var ccy=now.getFullYear();var updobj;function lcs(ielem){updobj=ielem;var calendarTable=document.getElementById("fc");calendarTable.style.top=parseInt((Top(ielem)+22))+"px";calendarTable.style.left=Left(ielem)+"px";getObj('fc').style.left=Left(ielem);getObj('fc').style.top=Top(ielem)+ielem.offsetHeight;getObj('fc').style.display='';curdt=ielem.value;curdtarr=curdt.split(seperator);isdt=true;for(var k=0;k<curdtarr.length;k++){if(isNaN(curdtarr[k]))
isdt=false;}
if(isdt&(curdtarr.length==3)){ccm=curdtarr[1]-1;ccy=curdtarr[0];prepcalendar(curdtarr[2],curdtarr[1]-1,curdtarr[0]);}}
function evtTgt(e)
{var el;if(e.target)el=e.target;else if(e.srcElement)el=e.srcElement;if(el.nodeType==3)el=el.parentNode;return el;}
function EvtObj(e){if(!e)e=window.event;return e;}
function cs_over(e){evtTgt(EvtObj(e)).style.background='#FFCC66';}
function cs_out(e){evtTgt(EvtObj(e)).style.background='#C4D3EA';}
function cs_click(e){updobj.value=calvalarr[evtTgt(EvtObj(e)).id.substring(1,evtTgt(EvtObj(e)).id.length)];getObj('fc').style.display='none';}
var mn=new Array('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');var mnn=new Array('31','28','31','30','31','30','31','31','30','31','30','31');var mnl=new Array('31','29','31','30','31','30','31','31','30','31','30','31');var calvalarr=new Array(42);function f_cps(obj){obj.style.background='#C4D3EA';obj.style.font='10px Arial';obj.style.color='#333333';obj.style.textAlign='center';obj.style.textDecoration='none';obj.style.border='1px solid #6487AE';obj.style.cursor='pointer';}
function f_cpps(obj){obj.style.background='#C4D3EA';obj.style.font='10px Arial';obj.style.color='#ABABAB';obj.style.textAlign='center';obj.style.textDecoration='line-through';obj.style.border='1px solid #6487AE';obj.style.cursor='default';}
function f_hds(obj){obj.style.background='#FFF799';obj.style.font='bold 10px Arial';obj.style.color='#333333';obj.style.textAlign='center';obj.style.border='1px solid #6487AE';obj.style.cursor='pointer';}
function prepcalendar(hd,cm,cy){now=new Date();sd=now.getDate();td=new Date();td.setDate(1);td.setFullYear(cy);td.setMonth(cm);cd=td.getDay();getObj('mns').innerHTML=mn[cm]+' '+cy;marr=((cy%4)==0)?mnl:mnn;for(var d=1;d<=calvalarr.length;d++){f_cps(getObj('v'+parseInt(d)));if((d>=(cd-(-1)))&&(d<=cd-(-marr[cm]))){var currentDate=new Date(cy,cm,d-cd);dip=!((currentDate>=enableDateFrom)&&(currentDate<=enableDateTo));htd=((hd!='')&&(d-cd==hd));if(dip)
{f_cpps(getObj('v'+parseInt(d)));}
else if(htd)
{f_hds(getObj('v'+parseInt(d)));}
else
{f_cps(getObj('v'+parseInt(d)));}
getObj('v'+parseInt(d)).onmouseover=(dip)?null:cs_over;getObj('v'+parseInt(d)).onmouseout=(dip)?null:cs_out;getObj('v'+parseInt(d)).onclick=(dip)?null:cs_click;getObj('v'+parseInt(d)).innerHTML=d-cd;calvalarr[d]=''+cy+seperator+(cm-(-1))+seperator+(d-cd);}
else{getObj('v'+d).innerHTML='&nbsp;';getObj('v'+parseInt(d)).onmouseover=null;getObj('v'+parseInt(d)).onmouseout=null;getObj('v'+parseInt(d)).style.cursor='default';}}}
prepcalendar('',ccm,ccy);function caddm(){marr=((ccy%4)==0)?mnl:mnn;ccm+=1;if(ccm>=12){ccm=0;ccy++;}
prepcalendar(0,ccm,ccy);}
function csubm(){marr=((ccy%4)==0)?mnl:mnn;ccm-=1;if(ccm<0){ccm=11;ccy--;}
prepcalendar(0,ccm,ccy);}
function cdayf(){if((ccy>sccy)|((ccy==sccy)&&(ccm>=sccm)))
return;else{ccy=sccy;ccm=sccm;cfd=scfd;}}
function slideDate()
{var enteredCheckin=document.getElementById('hotelCheckin').value;if(isDate(enteredCheckin))
{enableDateFrom=new Date(enteredCheckin.replace(/-/g,"/"));if(enableDateFrom.getMonth==11)
{enableDateTo=new Date(enableDateFrom.getFullYear()+2,0,enableDateFrom.getDate());}
else
{enableDateTo=new Date(enableDateFrom.getFullYear()+1,enableDateFrom.getMonth()+1,enableDateFrom.getDate());}}}
function isDate(dateStr){var datePat=/^(\d{4})(\-)(\d{1,2})(\-)(\d{1,2})$/;var matchArray=dateStr.match(datePat);if(matchArray==null){return false;}
year=matchArray[1];month=matchArray[3];day=matchArray[5];if(month<1||month>12){return false;}
if(day<1||day>31){return false;}
if((month==4||month==6||month==9||month==11)&&day==31){return false;}
if(month==2){var isleap=(year%4==0&&(year%100!=0||year%400==0));if(day>29||(day==29&&!isleap)){return false;}}
return true;}
function setupCal(checkin,checkout,checkinId,checkoutId,checkinCalId,checkoutCalId,numOfCal)
{var theMindate=new Date();var min_date=theMindate.getDate();var min_month=theMindate.getMonth();min_month++;var min_year=theMindate.getFullYear();theMindate=min_month+"/"+min_date+"/"+min_year;var theMaxdate=min_month+"/"+min_date+"/"+(min_year+1);var earlyMindate=new Date();earlyMindate.setDate(min_date-1);var early_month=earlyMindate.getMonth();early_month++;earlyMindate=early_month+"/"+earlyMindate.getDate()+"/"+earlyMindate.getFullYear();if(checkin==null||checkout==null)
{checkin=dateFormat(min_month)+"/"+dateFormat(min_date)+"/"+min_year;checkout=checkin;}
var checkinSelection=document.getElementById(checkinId).value==0?checkout:reFormatDate(document.getElementById(checkinId).value);var checkoutSelection=document.getElementById(checkoutId).value==0?checkout:reFormatDate(document.getElementById(checkoutId).value);var checkinCalPage=checkin.substr(0,2)+checkin.substr(5,5);var checkoutCalPage=checkout.substr(0,2)+checkout.substr(5,5);var checkinCal=new YAHOO.widget.CalendarGroup("checkinCal",checkinCalId,{pages:numOfCal,mindate:earlyMindate,maxdate:theMaxdate,navigator:true});checkinCal.cfg.setProperty("pagedate",checkinCalPage,false);checkinCal.cfg.setProperty("selected",checkinSelection+", "+checkoutSelection,false);checkinCal.cfg.setProperty("MONTHS_LONG",monthsLong);checkinCal.cfg.setProperty("WEEKDAYS_SHORT",weekdaysShort);checkinCal.cfg.setProperty("MY_LABEL_YEAR_POSITION",myLabelYearPosition);checkinCal.cfg.setProperty("MY_LABEL_MONTH_POSITION",myLabelMonthPosition);checkinCal.cfg.setProperty("MY_LABEL_YEAR_SUFFIX",myLabelYearSuffix);checkinCal.cfg.setProperty("MY_LABEL_MONTH_SUFFIX",myLabelMonthSuffix);checkinCal.render();var checkinShow=document.getElementById(checkinId);YAHOO.util.Event.addListener(checkinShow,"click",checkinCal.show,checkinCal,true);checkinCal.selectEvent.subscribe(checkinHandleSelect,checkinCal,true);checkinCal.hide();function checkinHandleSelect(type,args,obj){var dates=args[0];var date=dates[0];var year=date[0],month=dateFormat(date[1]),day=dateFormat(date[2]);var checkinDate=year+"-"+month+"-"+day;checkinSelection=month+"/"+day+"/"+year;document.getElementById(checkinId).value=checkinDate;document.getElementById("checkinValue").value=checkinDate;document.getElementById("checkoutValue").value=document.getElementById(checkoutId).value;checkinCal.hide();checkinCalPage=date[1]+"/"+year;checkoutCal.cfg.setProperty("pagedate",checkinCalPage,false);if(document.getElementById(checkoutId).value!=0)
{checkoutSelection=reFormatDate(document.getElementById(checkoutId).value);}
checkinCal.cfg.setProperty("selected",checkinSelection+", "+checkoutSelection,false);checkoutCal.cfg.setProperty("selected",checkinSelection+", "+checkoutSelection,false);checkinCal.render();checkoutCal.render();}
var checkoutCal=new YAHOO.widget.CalendarGroup("checkoutCal",checkoutCalId,{pages:numOfCal,mindate:theMindate,maxdate:theMaxdate,navigator:true});checkoutCal.cfg.setProperty("pagedate",checkoutCalPage,false);checkoutCal.cfg.setProperty("selected",checkinSelection+", "+checkoutSelection,false);checkoutCal.cfg.setProperty("MONTHS_LONG",monthsLong);checkoutCal.cfg.setProperty("WEEKDAYS_SHORT",weekdaysShort);checkoutCal.cfg.setProperty("MY_LABEL_YEAR_POSITION",myLabelYearPosition);checkoutCal.cfg.setProperty("MY_LABEL_MONTH_POSITION",myLabelMonthPosition);checkoutCal.cfg.setProperty("MY_LABEL_YEAR_SUFFIX",myLabelYearSuffix);checkoutCal.cfg.setProperty("MY_LABEL_MONTH_SUFFIX",myLabelMonthSuffix);checkoutCal.render();var checkoutShow=document.getElementById(checkoutId);YAHOO.util.Event.addListener(checkoutShow,"click",checkoutCal.show,checkoutCal,true);checkoutCal.selectEvent.subscribe(checkoutHandleSelect,checkoutCal,true);checkoutCal.hide();function checkoutHandleSelect(type,args,obj){var dates=args[0];var date=dates[0];var year=date[0],month=dateFormat(date[1]),day=dateFormat(date[2]);var checkoutDate=year+"-"+month+"-"+day;checkoutSelection=month+"/"+day+"/"+year;document.getElementById(checkoutId).value=checkoutDate;document.getElementById("checkinValue").value=document.getElementById(checkinId).value;document.getElementById("checkoutValue").value=checkoutDate;if(document.getElementById(checkinId).value!=0)
{checkinSelection=reFormatDate(document.getElementById(checkinId).value);}
checkinCal.cfg.setProperty("selected",checkinSelection+", "+checkoutSelection,false);checkoutCal.cfg.setProperty("selected",checkinSelection+", "+checkoutSelection,false);checkinCal.render();checkoutCal.render();checkoutCal.hide();}
function hideDiv(e){var target=(e?e.target:event.srcElement);var checkinCalDiv=document.getElementById(checkinCalId);var checkinDiv=document.getElementById(checkinId);var checkoutCalDiv=document.getElementById(checkoutCalId);var checkoutDiv=document.getElementById(checkoutId);if(checkinCalDiv!=null&&checkinDiv!=null&&checkoutCalDiv!=null&&checkoutDiv!=null)
{(isChild(target,checkinCalDiv)||target==checkinDiv)?null:checkinCalDiv.style.display='none';(isChild(target,checkoutCalDiv)||target==checkoutDiv)?null:checkoutCalDiv.style.display='none';}
if(document.getElementById("detailTabCheckin")!=null||document.getElementById("rateTabCheckin")!=null)
{hideHotelDiv(e)
hideRateDiv(e)}}
document.onclick=hideDiv}
function reFormatDate(date)
{var year=date.substr(0,4);var month=date.substr(5,2);var day=date.substr(8,2);return month+"/"+day+"/"+year;}
function dateFormat(date)
{return date.toString().length==1?"0"+date:date;}
function isChild(child,parent){while(child){if(child==parent)
return true;child=child.parentNode;}
return false;}
function hideHotelDiv(e){var target=(e?e.target:event.srcElement);var checkinCalDiv=document.getElementById("CheckinCalContainer");var checkinDiv=document.getElementById("hotelCheckin");var checkoutCalDiv=document.getElementById("CheckoutCalContainer");var checkoutDiv=document.getElementById("hotelCheckout");if(checkinCalDiv!=null&&checkinDiv!=null&&checkoutCalDiv!=null&&checkoutDiv!=null)
{(isChild(target,checkinCalDiv)||target==checkinDiv)?null:checkinCalDiv.style.display='none';(isChild(target,checkoutCalDiv)||target==checkoutDiv)?null:checkoutCalDiv.style.display='none';}}
function hideRateDiv(e){var target=(e?e.target:event.srcElement);var checkinCalDiv=document.getElementById("rateTabCheckinCalContainer");var checkinDiv=document.getElementById("rateTabCheckin");var checkoutCalDiv=document.getElementById("rateTabCheckoutCalContainer");var checkoutDiv=document.getElementById("rateTabCheckout");if(checkinCalDiv!=null&&checkinDiv!=null&&checkoutCalDiv!=null&&checkoutDiv!=null)
{(isChild(target,checkinCalDiv)||target==checkinDiv)?null:checkinCalDiv.style.display='none';(isChild(target,checkoutCalDiv)||target==checkoutDiv)?null:checkoutCalDiv.style.display='none';}}
function DoSearch(languageCode,target,affiliateId,city,domain,brandId,customData){var redirection;var affiliateParam;var brandParam;var host;if(document.getElementById('hotelCheckin')!=null)
{if(document.getElementById('hotelCheckin').value==0||document.getElementById('hotelCheckout').value==0)
{alert(typeof(JavaScriptEnterCheckinCheckout)=='undefined'?'Please enter your checkin and checkout date.':JavaScriptEnterCheckinCheckout)
return false}
else
{document.getElementById("checkinValue").value=document.getElementById("hotelCheckin").value;document.getElementById("checkoutValue").value=document.getElementById("hotelCheckout").value;}}
if(!ValidateDates())
return false
city=escape(city)
if(typeof(brandId)=='undefined'||brandId=="0"||brandId=="")
{brandParam='';}
else
{brandParam='&brandId='+brandId}
if(affiliateId==null||affiliateId=='')
{affiliateParam='';host='';}
else
{affiliateParam='&a_aid='+affiliateId;if(typeof(domain)=='undefined'||domain=='')
{host='http://www.hotelscombined.com'}
else
{host='http://'+domain;}}
var defaultSort=GetQSVal("sort");if(defaultSort.length>0)
{defaultSort="&sort="+defaultSort;}
if(document.getElementById("selectedFileName").value==null||document.getElementById("selectedFileName").value==""){if(city==null||city.length<3){alert(typeof(JavaScriptEnterCityName)=='undefined'?'Please enter a city name that is at least 3 characters in length':JavaScriptEnterCityName);return false;}
redirection="/Search.aspx?search="+city+"&checkin="+document.getElementById("checkinValue").value+"&checkout="+document.getElementById("checkoutValue").value+"&languageCode="+languageCode+affiliateParam+brandParam+defaultSort;if(document.getElementById("M_C_SearchResultCity")!=null)
{var currency=document.getElementById("M_C_currencies");redirection+=currency==null?"":"&currencyCode="+currency.options[currency.selectedIndex].id;if(document.getElementById("M_C_LowRate")!=null)
{if(document.getElementById("M_C_LowRate").value!=null&&document.getElementById("M_C_LowRate").value!=0)
{redirection+="&lowRate="+escape(document.getElementById("M_C_LowRate").value);}}
if(document.getElementById("M_C_HighRate")!=null)
{if(document.getElementById("M_C_HighRate").value!=null&&document.getElementById("M_C_HighRate").value!=0)
{redirection+="&highRate="+escape(document.getElementById("M_C_HighRate").value);}}
redirection+=GetStarValue(redirection,document.getElementById("M_C_Star5"),"star5");redirection+=GetStarValue(redirection,document.getElementById("M_C_Star4"),"star4");redirection+=GetStarValue(redirection,document.getElementById("M_C_Star3"),"star3");redirection+=GetStarValue(redirection,document.getElementById("M_C_Star2"),"star2");redirection+=GetStarValue(redirection,document.getElementById("M_C_Star1"),"star1");redirection+="&cityName="+city;if(document.getElementById("M_C_HotelName")!=null)
{if(document.getElementById("M_C_HotelName").value!=null&&document.getElementById("M_C_HotelName").value!=0)
{redirection+="&hotelName="+escape(document.getElementById("M_C_HotelName").value);}}
if(document.getElementById("M_C_ShowSoldOut")!=null){redirection+=document.getElementById("M_C_ShowSoldOut").checked?"":"&showSoldOut=false";}
if(document.getElementById("M_C_ShowOnRequest")!=null){redirection+=document.getElementById("M_C_ShowOnRequest").checked?"":"&showOnRequest=false";}}}else{redirection="/SearchResults.aspx?fileName="+document.getElementById("selectedFileName").value+"&checkin="+document.getElementById("checkinValue").value+"&checkout="+document.getElementById("checkoutValue").value+"&languageCode="+languageCode+affiliateParam+brandParam+defaultSort;}
redirection+=document.getElementById("guestValue")==null?"":"&Adults="+document.getElementById("guestValue").value;redirection+=document.getElementById("roomValue")==null?"":"&Rooms="+document.getElementById("roomValue").value;if(document.getElementById("M_C_HotelFacility1")!=null){var facility="";for(var i=1;i<=11;i++){if(document.getElementById("M_C_HotelFacility"+i).checked){facility+=i+',';}}
if(facility!=""){var strLen=facility.length;facility=facility.slice(0,strLen-1);redirection+="&facilities="+facility;}}
if(customData!=""){customData="&label="+customData;}
redirection=host+redirection+customData;switch(target)
{case"_blank":window.open(redirection).focus();break;case"_parent":window.parent.location=redirection;break;case"_top":window.top.location=redirection;break;default:window.location=redirection;}
return false;}
function DoHotelSearch(languageCode,target,affiliateId,hotelFileName,domain,brandId,customData){var affiliateParam;var host;var brandParam;if(document.getElementById('hotelCheckin')!=null)
{if(document.getElementById('hotelCheckin').value==0||document.getElementById('hotelCheckout').value==0)
{alert(typeof(JavaScriptEnterCheckinCheckout)=='undefined'?'Please enter your checkin and checkout date.':JavaScriptEnterCheckinCheckout)
return false}
else
{document.getElementById("checkinValue").value=document.getElementById("hotelCheckin").value;document.getElementById("checkoutValue").value=document.getElementById("hotelCheckout").value;}}
if(typeof(brandId)=='undefined'||brandId=="0"||brandId=="")
{brandParam='';}
else
{brandParam='&brandId='+brandId}
if(customData!=""){customData="&label="+customData;}
if(affiliateId==null||affiliateId=='')
{affiliateParam='';host='';}
else
{affiliateParam='&a_aid='+affiliateId;if(typeof(domain)=='undefined'||domain=='')
{host='http://www.hotelscombined.com'}
else
{host='http://'+domain;}}
var guest=document.getElementById('guestValue')==null?"":"&Adults="+document.getElementById("guestValue").value;var room=document.getElementById('roomValue')==null?"":"&Rooms="+document.getElementById('roomValue').value;var redirection=host+"/Hotel.aspx?tabId=Rates&fileName="+hotelFileName+"&checkin="+document.getElementById("checkinValue").value+"&checkout="+document.getElementById("checkoutValue").value+"&languageCode="+languageCode+affiliateParam+brandParam+guest+room+customData;switch(target)
{case"_blank":window.open(redirection).focus();break;case"_parent":window.parent.location=redirection;break;case"_top":window.top.location=redirection;break;default:window.location=redirection;}
return false;}
function GetStarValue(qString,starElement,starName)
{if(starElement==null||starElement.checked)
{return"";}else
{return"&"+starName+"=false";}}
function ValidateDates(){var inDate=getDate(document.getElementById("checkinValue").value)
var outDate=getDate(document.getElementById("checkoutValue").value)
var currentDate=new Date();if((outDate-inDate)/86400000>=31){alert(typeof(JavaScriptPeriodOfStay)=='undefined'?'Your period of stay should be no longer than 30 nights.':JavaScriptPeriodOfStay)
return false}
if(outDate-inDate<=0){alert(typeof(JavaScriptEnsureCheckoutAfterCheckin)=='undefined'?'Please ensure that the check-out date is after the check-in date.':JavaScriptEnsureCheckoutAfterCheckin)
return false}
if((outDate-currentDate)/86400000>=363){alert(typeof(JavaScriptBookWithinOneYear)=='undefined'?'You cannot book more than 1 year in advance.':JavaScriptBookWithinOneYear)
return false;}
return true}
function getDate(dateString){var year=dateString.substr(0,4)
var month=dateString.substr(5,2)-1
var day=dateString.substr(8,2)
return new Date(year,month,day)}
function GetQSVal(qsName){try
{var qsPair
var i
var qString=location.search.substr(1)
if(qString==null||qString.length==0)
qString=query;var arrNameVal=qString.split('&')
for(i=0;i<arrNameVal.length;i++){qsPair=arrNameVal[i].split('=')
if(URLDecode(qsPair[0]).toLowerCase()==qsName.toLowerCase())return URLDecode(qsPair[1])}}
catch(e)
{}
return""}
function setRoomValue(select,isAffiliate)
{if(select.value=="5"&&isAffiliate==false)
{select.selectedIndex=0;var r=confirm(typeof(JavaScriptSearchMoreRoom)=='undefined'?'We only support searching for up to four rooms at once, would you like to use our partner site Hotelplanner.com to search for more rooms?':JavaScriptSearchMoreRoom);if(r==true)
{var qString="?sc=HotelsCombined";city="",checkin="",checkout="";if(document.getElementById("M_C_SearchResultCity")!=null&&document.getElementById("M_C_SearchResultCity").value!=0)
{city=document.getElementById("M_C_SearchResultCity").value;}
else
{if(document.getElementById("cityNameValue")!=null&&document.getElementById("cityNameValue").value!=0)
{city=document.getElementById("cityNameValue").value;}}
if((document.getElementById("hotelCheckin")!=null&&document.getElementById("hotelCheckin").value!=0)||(document.getElementById("detailTabCheckin")!=null&&document.getElementById("detailTabCheckin").value!=0)||(document.getElementById("rateTabCheckin")!=null&&document.getElementById("rateTabCheckin").value!=0))
{var checkinDom=document.getElementById("checkinValue");checkin=checkinDom==null?"":checkinDom.value==0?"":reFormatDate(checkinDom.value);}
if((document.getElementById("hotelCheckout")!=null&&document.getElementById("hotelCheckout").value!=0)||(document.getElementById("detailTabCheckout")!=null&&document.getElementById("detailTabCheckout").value!=0)||(document.getElementById("rateTabCheckout")!=null&&document.getElementById("rateTabCheckout").value!=0))
{var checkoutDom=document.getElementById("checkoutValue");checkout=checkoutDom==null?"":checkoutDom.value==0?"":reFormatDate(checkoutDom.value);}
qString+=city==""?"":"&City="+city;qString+=checkin==""?"":"&Checkin="+checkin;qString+=checkout==""?"":"&Checkout="+checkout;window.open("/ProviderRedirect.aspx?key=2.HPL.EN.USD.0.0.0&url="+escape("http://www.hotelplanner.com"+qString),"_self");return false;}}
else
{document.getElementById('roomValue').value=select.options[select.selectedIndex].value;}
return false;}
function setGuestValue(select)
{document.getElementById('guestValue').value=select.options[select.selectedIndex].value;return false;}<!--
function hasClass(obj){var result=false;if(obj.getAttributeNode("class")!=null){result=obj.getAttributeNode("class").value;}
return result;}
function stripe(id){var even=false;var evenColor=arguments[1]?arguments[1]:"#fff";var oddColor=arguments[2]?arguments[2]:"#fafafa";var table=document.getElementById(id);if(!table){return;}
var tbodies=table.getElementsByTagName("tbody");for(var h=0;h<tbodies.length;h++){var trs=tbodies[h].getElementsByTagName("tr");for(var i=0;i<trs.length;i++){if(!hasClass(trs[i])&&!trs[i].style.backgroundColor){var tds=trs[i].getElementsByTagName("td");for(var j=0;j<tds.length;j++){var mytd=tds[j];if(!hasClass(mytd)&&!mytd.style.backgroundColor){mytd.style.backgroundColor=even?evenColor:oddColor;}}}
even=!even;}}}