
var now=new Date();now.setDate(now.getDate()-1);function getDateString(y_obj,m_obj,d_obj)
{var y=y_obj.options[y_obj.selectedIndex].value;var m=m_obj.options[m_obj.selectedIndex].value;m=m-1;var d=d_obj.options[d_obj.selectedIndex].value;if(y==""||m==""){return null;}
if(d==""){d=1;}
m=Number(m)+1;return str=y+'-'+m+'-'+d;}
var cal10=new CalendarPopup();cal10.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal10.setReturnFunction("setMultipleValues4");function setMultipleValues4(y,m,d)
{var checkoutDay=d+1;var nextMonth=m;var checkoutYear=y;if(leapYearCheck(y)){monthDays[1]="29";}else{monthDays[1]="28";}
if(leapYearCheck(y)&&m==2){addDays(document.searchform.strCheckindate,m-1);addDays(document.searchform.strCheckoutdate,m-1);}
if(document.searchform.strCheckinmonth.options.length!=monthDays[m-1]){addDays(document.searchform.strCheckindate,m-1);addDays(document.searchform.strCheckoutdate,m-1);}
if(checkoutDay>monthDays[m-1]){nextMonth=m+1;if(nextMonth>12){nextMonth=1;checkoutYear+=1;}
addDays(document.searchform.strCheckoutdate,nextMonth-1);checkoutDay=checkoutDay-monthDays[m-1];}
if(d>monthDays[m-1]){d=monthDays[m-1];checkoutDay=1;}
document.searchform.strCheckinyear.value=y;document.searchform.strCheckinmonth.value=m;document.searchform.strCheckindate.value=d;document.searchform.strCheckoutyear.value=checkoutYear;document.searchform.strCheckoutmonth.value=nextMonth;document.searchform.strCheckoutdate.value=checkoutDay;}
function getmonth()
{var month1=Number(document.searchform.strCheckinmonth);return month1;}
var cal11=new CalendarPopup();cal11.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal11.setReturnFunction("setMultipleValues5");function setMultipleValues5(y,m,d)
{if(leapYearCheck(y)){monthDays[1]="29";}else{monthDays[1]="28";}
var checkoutdate=d;addDays(document.searchform.strCheckoutdate,m-1);if(checkoutdate>document.searchform.strCheckoutdate.options.length){document.searchform.strCheckoutdate.value=document.searchform.strCheckoutdate.options.length;}else{document.searchform.strCheckoutdate.value=checkoutdate;}
document.searchform.strCheckoutyear.value=y;document.searchform.strCheckoutmonth.value=m;document.searchform.strCheckoutdate.value=d;}
function getmonthout()
{var month1=Number(document.searchform.strCheckoutmonth)+1;return month1;}
var cal12=new CalendarPopup();cal12.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal12.setReturnFunction("setMultipleValues6");function setMultipleValues6(y,m,d)
{document.searchform[0].CheckInYear.value=y;document.searchform[0].CheckInMonth.value=m;document.searchform[0].CheckInDate.value=d;}
function getmonth0()
{var month1=Number(document.searchform[0].CheckInMonth);return month1;}
var cal13=new CalendarPopup();cal13.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal13.setReturnFunction("setMultipleValues7");function setMultipleValues7(y,m,d)
{document.searchform[0].CheckOutYear.value=y;document.searchform[0].CheckOutMonth.value=m;document.searchform[0].CheckOutDate.value=d;}
function getmonthout0()
{var month1=Number(document.searchform[0].CheckOutMonth)+1;return month1;}
var cal21=new CalendarPopup();cal21.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal21.setReturnFunction("setMultipleValues8");function setMultipleValues8(y,m,d)
{document.searchform[1].CheckInYear.value=y;document.searchform[1].CheckInMonth.value=m;document.searchform[1].CheckInDate.value=d;}
function getmonth1()
{var month1=Number(document.searchform[1].CheckInMonth);return month1;}
var cal22=new CalendarPopup();cal22.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal22.setReturnFunction("setMultipleValues9");function setMultipleValues9(y,m,d)
{document.searchform[1].CheckOutYear.value=y;document.searchform[1].CheckOutMonth.value=m;document.searchform[1].CheckOutDate.value=d;}
function getmonthout1()
{var month1=Number(document.searchform[1].CheckOutMonth)+1;return month1;}
var cal23=new CalendarPopup();cal23.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal23.setReturnFunction("setMultipleValues10");function setMultipleValues10(y,m,d)
{document.searchform[2].CheckInYear.value=y;document.searchform[2].CheckInMonth.value=m;document.searchform[2].CheckInDate.value=d;}
function getmonth2()
{var month1=Number(document.searchform[2].CheckInMonth);return month1;}
var cal24=new CalendarPopup();cal24.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal24.setReturnFunction("setMultipleValues11");function setMultipleValues11(y,m,d)
{document.searchform[2].CheckOutYear.value=y;document.searchform[2].CheckOutMonth.value=m;document.searchform[2].CheckOutDate.value=d;}
function getmonthout2()
{var month1=Number(document.searchform[2].CheckOutMonth)+1;return month1;}
var cal25=new CalendarPopup();cal25.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal25.setReturnFunction("setMultipleValues12");function setMultipleValues12(y,m,d)
{document.searchform[3].CheckInYear.value=y;document.searchform[3].CheckInMonth.value=m;document.searchform[3].CheckInDate.value=d;}
function getmonth3()
{var month1=Number(document.searchform[3].CheckInMonth);return month1;}
var cal26=new CalendarPopup();cal26.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal26.setReturnFunction("setMultipleValues13");function setMultipleValues13(y,m,d)
{document.searchform[3].CheckOutYear.value=y;document.searchform[3].CheckOutMonth.value=m;document.searchform[3].CheckOutDate.value=d;}
function getmonthout3()
{var month1=Number(document.searchform[3].CheckOutMonth)+1;return month1;}
var cal27=new CalendarPopup();cal27.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal27.setReturnFunction("setMultipleValues14");function setMultipleValues14(y,m,d)
{document.searchform[4].CheckInYear.value=y;document.searchform[4].CheckInMonth.value=m;document.searchform[4].CheckInDate.value=d;}
function getmonth4()
{var month1=Number(document.searchform[4].CheckInMonth);return month1;}
var cal28=new CalendarPopup();cal28.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal28.setReturnFunction("setMultipleValues15");function setMultipleValues15(y,m,d)
{document.searchform[4].CheckOutYear.value=y;document.searchform[4].CheckOutMonth.value=m;document.searchform[4].CheckOutDate.value=d;}
function getmonthout4()
{var month1=Number(document.searchform[4].CheckOutMonth)+1;return month1;}
var cal29=new CalendarPopup();cal29.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal29.setReturnFunction("setMultipleValues16");function setMultipleValues16(y,m,d)
{document.searchform[5].CheckInYear.value=y;document.searchform[5].CheckInMonth.value=m;document.searchform[5].CheckInDate.value=d;}
function getmonth5()
{var month1=Number(document.searchform[5].CheckInMonth);return month1;}
var cal30=new CalendarPopup();cal30.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal30.setReturnFunction("setMultipleValues17");function setMultipleValues17(y,m,d)
{document.searchform[5].CheckOutYear.value=y;document.searchform[5].CheckOutMonth.value=m;document.searchform[5].CheckOutDate.value=d;}
function getmonthout5()
{var month1=Number(document.searchform[5].CheckOutMonth)+1;return month1;}
var cal31=new CalendarPopup();cal31.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal31.setReturnFunction("setMultipleValues18");function setMultipleValues18(y,m,d)
{document.searchform[6].CheckInYear.value=y;document.searchform[6].CheckInMonth.value=m;document.searchform[6].CheckInDate.value=d;}
function getmonth6()
{var month1=Number(document.searchform[6].CheckInMonth);return month1;}
var cal32=new CalendarPopup();cal32.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal32.setReturnFunction("setMultipleValues19");function setMultipleValues19(y,m,d)
{document.searchform[6].CheckOutYear.value=y;document.searchform[6].CheckOutMonth.value=m;document.searchform[6].CheckOutDate.value=d;}
function getmonthout6()
{var month1=Number(document.searchform[6].CheckOutMonth)+1;return month1;}
var cal33=new CalendarPopup();cal33.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal33.setReturnFunction("setMultipleValues20");function setMultipleValues20(y,m,d)
{document.carsearchform.strCheckinyear0.value=y;document.carsearchform.strCheckinmonth0.value=m;document.carsearchform.strCheckindate0.value=d;}
function getmonthin7()
{var month1=Number(document.carsearchform.CheckInMonth0)+1;return month1;}
var cal34=new CalendarPopup();cal34.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal34.setReturnFunction("setMultipleValues21");function setMultipleValues21(y,m,d)
{document.carsearchform.strCheckinyear1.value=y;document.carsearchform.strCheckinmonth1.value=m;document.carsearchform.strCheckindate1.value=d;}
function getmonthin8()
{var month1=Number(document.carsearchform.strCheckinmonth1)+1;return month1;}
var cal35=new CalendarPopup();cal35.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal35.setReturnFunction("setMultipleValues22");function setMultipleValues22(y,m,d)
{document.carsearchform.strCheckinyear2.value=y;document.carsearchform.strCheckinmonth2.value=m;document.carsearchform.strCheckindate2.value=d;}
function getmonthin9()
{var month1=Number(document.carsearchform.strCheckinmonth2)+1;return month1;}
var cal50=new CalendarPopup();cal50.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal50.setReturnFunction("setMultipleValues23");var days;function setMultipleValues23(y,m,d)
{document.carBookingForm.arrYY[days].value=y;document.carBookingForm.arrMM[days].value=m;document.carBookingForm.arrDD[days].value=d;}
var cal52=new CalendarPopup();cal52.addDisabledDates(null,formatDate(now,"yyyy-MM-dd"));cal52.setReturnFunction("setMultipleValues52");function setMultipleValues52(y,m,d)
{document.AvailRequester.returnMonth.value=m;document.AvailRequester.returnDay.value=d;}
