<!--
function setCurrentDate() {
  // changes the date selector menus to the current date
  var usaDay = 1000 * 60 * 60 * 24
  var currentDate = new Date().getTime();
  var currentDate = new Date(currentDate + (usaDay * 2));
 
  document.search.CheckInYear.selectedIndex = 0;
  document.search.CheckInMonth.selectedIndex = currentDate.getMonth();
 
  setDays();  
  document.search.CheckInDay.selectedIndex = currentDate.getDate() - 1;
}
 
function setDays() {
 
  var y = document.search.CheckInYear.options[document.search.CheckInYear.selectedIndex].value;
  var m = document.search.CheckInMonth.selectedIndex;
  var d;
 
  // find number of days in current month
  if ( (m == 3) || (m == 5) || (m == 8) || (m == 10) ) {
    days = 30;
  }
  else if (m == 1) {
    // check for leapyear - Any year divisible by 4, except those divisible by 100 (but NOT 400)
    if ( (Math.floor(y/4) == (y/4)) && ((Math.floor(y/100) != (y/100)) || (Math.floor(y/400) == (y/400))) )
      days = 29
    else
      days = 28
  }
  else {
    days = 31;
  }
 
 
  // if (days in new month > current days) then we must add the extra days
  if (days > document.search.CheckInDay.length) {
    for (i = document.search.CheckInDay.length; i < days; i++) {
      document.search.CheckInDay.length = days;
      document.search.CheckInDay.options[i].text = i + 1;
      document.search.CheckInDay.options[i].value = i + 1;
    }
  }
 
  
  // if (days in new month < current days) then we must delete the extra days
  if (days < document.search.CheckInDay.length) {
    document.search.CheckInDay.length = days;
    if (document.search.CheckInDay.selectedIndex == -1) 
      document.search.CheckInDay.selectedIndex = days - 1;
  }
 
}

//-->

