function GetChildAgeRoomDiv(room) {
  var template = '<div class="form_3_100">' + jQuery("#GetChildAgeRoomDiv_template").html() + '</div>';
  var result = '<div class="form_row"><div class="children_age_room_no"><div class="form_3_100b"><strong>Room #template</strong></div></div><div class="children_age_room_options">';
  result = result.replace("template", room);
  
  for (var i=1; i<=5; i++) {
    result += template.replace(/template/g, room + '_' + i.toString()).replace(/#ChildNo/g, i.toString());
  }
  
  return result + '</div></div>';
}

_monthsNames = {
  0 : 'Jan',
  1 : 'Feb',
  2 : 'Mar',
  3 : 'Apr',
  4 : 'May',
  5 : 'Jun',
  6 : 'Jul',
  7 : 'Aug',
  8 : 'Sep',
  9 : 'Oct',
  10 : 'Nov',
  11 : 'Dec'
};

function AttractionFormSubmit() {
  if (!$('form-check_in').value.match(/\d{2}\-[a-zA-Z]{3}\-\d{4}/)) {
    d = new Date();
    d.setDate(d.getDate() + 7);

    checkInDay = d.getDate();
    if (checkInDay < 10)
      checkInDay = '0' + checkInDay;
    $('form-check_in').value = checkInDay + '-' + _monthsNames[d.getMonth()]
        + '-' + d.getFullYear();

    d.setDate(d.getDate() + 1);
    checkOutDay = d.getDate();
    if (checkOutDay < 10)
      checkOutDay = '0' + checkOutDay;
    $('form-check_out').value = checkOutDay + '-' + _monthsNames[d.getMonth()]
        + '-' + d.getFullYear();
  }
}
