  var inday = new Date(); inday.setDate(inday.getDate()+1) // initial check-in tomorrow
  var outday = new Date(); outday.setDate(outday.getDate()+4) // check-out day after 3 nights

function selectdate(form) {
  document.resform.date11.selectedIndex = inday.getDate()-1  // runs from 1 to last day in month
  document.resform.date12.selectedIndex = inday.getMonth()   // runs from 0 to 11
  document.resform.date13.selectedIndex = inday.getYear()-2007
  document.resform.date21.selectedIndex =outday.getDate()-1
  document.resform.date22.selectedIndex =outday.getMonth()
  document.resform.date23.selectedIndex =outday.getYear()-2007
}

function adjustdate(form) { 
  inday.setYear(document.resform.date13.selectedIndex+2007)
  inday.setMonth(document.resform.date12.selectedIndex)
  inday.setDate(document.resform.date11.selectedIndex+1)
  if (outday.getTime() <= inday.getTime()) 
  {
  	outday.setTime(inday.getTime())
  	outday.setDate(outday.getDate()+1)
  }

  document.resform.date11.selectedIndex = inday.getDate()-1
  document.resform.date12.selectedIndex = inday.getMonth()
  document.resform.date13.selectedIndex = inday.getYear()-2007
  document.resform.date21.selectedIndex =outday.getDate()-1
  document.resform.date22.selectedIndex =outday.getMonth()
  document.resform.date23.selectedIndex =outday.getYear()-2007
}

function adjustoutdt(form) { 
  outday.setYear(document.resform.date23.selectedIndex+2007)
  outday.setMonth(document.resform.date22.selectedIndex)
  outday.setDate(document.resform.date21.selectedIndex+1)
  document.resform.date21.selectedIndex =outday.getDate()-1
  document.resform.date22.selectedIndex =outday.getMonth()
  document.resform.date23.selectedIndex =outday.getYear()-2007
}

function emailtest(email) {
  if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email.value)){ return true; }
  else {
    alert("Ungueltige Emailadresse!\r" + email.value + " \rBitte neu eingeben.");
    email.focus(); email.select();
    return false;
  }
}
function nametest(reqr) {
  if (reqr.value != '') { return true; }
  else {
    alert("Bitte geben Sie Ihren Namen ein.")
    reqr.focus(); reqr.select();
    return false;
  }
}
