var oLED = new Date() function getTommorow(S) { oS = makeDate(S["day"], S["month"], S["year"]); oLED = new Date(); oLED.setTime(oS.getTime() + 86400000); return oLED; } function makeDate(d,m,y) { // alert(d + "\n" + m + "\n" + y) oS = new Date(); oS.setDate(d); oS.setMonth(m - 1); oS.setYear(y); // alert(oS.getTime()) return oS; } function makeFDate(sDI) { oF = document.forms["fsearch"]; return makeDate(1+oF.elements[sDI + "_Day"].selectedIndex, 1+oF.elements[sDI + "_Month"].selectedIndex, oF.elements[sDI + "_Year"].options[oF.elements[sDI + "_Year"].selectedIndex].value); } function setFDate(sDI, oD) { oF = document.forms["fsearch"]; setFOption(oF, sDI+"_Day", oD.getDate()); setFOption(oF, sDI+"_Month", oD.getMonth()+1); setFOption(oF, sDI+"_Year", oD.getFullYear()); } function setFOption(oF,sDI,iV) { oE = oF.elements[sDI]; for(i=0;i'; for (i=iS; i' + ((i<10 && bLZ)?"0"+i:i) + ''; } HT += ''; return HT; } function checkSearch(oF) { SGL = getOptionVal(oF,"SGL"); DBL = getOptionVal(oF,"DBL"); adults = getOptionVal(oF,"adults"); if ((1*SGL + 2*DBL)!=adults) { alert("Number of adults, doesn't fit to the number of (" + (1*SGL+2*DBL) + ") bed(s)!"); return false; } if ((Number(SGL)+Number(DBL))>3) { window.open("popup_more_rooms.php", "popup_more_rooms", "width=300,height=350,scrollbars=no,status=no"); return false; } return true; } function getOptionVal(oF,sN) { oE = oF.elements[sN]; return oE.options[oE.selectedIndex].value; }