// JavaScript Document

<!--
  function initializeDates(){
	  var d = new Date();
	  d.setMonth(d.getMonth(), d.getDate()+14);
	  
		document.forms['myForm'].elements['dateField'].value = getFormattedMonth(d.getMonth()) + "/" + getFormattedDay(d.getDate()) + "/" + d.getFullYear();
	  
  }
  
  function travelNowize() {
	  // travelnow provided this code which takes the "dateField" and "numberOfNights" and does the math
	  // to get a checkin and checkout date

	  var intNight = document.forms['myForm'].numberOfNights.value;
	  var dt = new Date(document.forms['myForm'].dateField.value);
		var adt = new Date(dt.getFullYear(), dt.getMonth(), dt.getDate()+(document.forms['myForm'].numberOfNights.selectedIndex+1) );

	  document.forms['myForm'].departureDay.value = adt.getDate();
	  document.forms['myForm'].departureMonth.value = adt.getMonth();
	  document.forms['myForm'].arrivalDay.value = dt.getDate();
	  document.forms['myForm'].arrivalMonth.value = dt.getMonth();
  }
   

  function group() {
	  if (document.myForm.numberOfRooms.selectedIndex == 8) {
		  window.location="http://book.bcplacehotels.com/index.jsp?pageName=groups&cid=326231&locale=en";
		  return false;
	  } else {
		  travelNowize();
		  return true;
	  }
  }
  //-->
