function setCheckInDate() {
 var f = document.hotForm; 
 var currDate = new Date();
 var checkInDay = f.checkInDay.value; 
 var checkInMonth = parseInt(f.checkInMonth.value)+1; 
 var checkInYear = currDate.getYear();
 if(checkInMonth<currDate.getMonth() || (checkInMonth==currDate.getMonth() && checkInDay < currDate.getDate())) {
  checkInYear++;
 } 
 f.checkin.value = checkInYear + "-" + zeroPrefix(checkInMonth) + "-" + zeroPrefix(checkInDay);
}

function setDefaultDate() {
 var f = document.hotForm; 
 var currDate = new Date(((new Date()).getTime() + 5*24*60*60*1000));
 f.checkInDay.options[currDate.getDate()-1].selected = true;
 f.checkInMonth.options[currDate.getMonth()].selected = true;
 f.aDate.value = currDate.getDate() + "-" + (currDate.getMonth()+1) + "-" + currDate.getYear();
}

function zeroPrefix(val) {
 if(val < 10)
  return "0" + val;
 else
  return val;
}