function ibeWidgetSubmitFunction(options)
{
  document.getElementById("dayField").value = options.checkinDate.getDate();
  document.getElementById("monthField").value = options.checkinDate.getMonth() + 1;
  document.getElementById("depart_dayField").value = options.checkoutDate.getDate();
  document.getElementById("depart_monthField").value = options.checkoutDate.getMonth() + 1;
  
  //get the distribution of adults/children among the rooms
  var oRoomDistribution = distributeGuestsInRooms(options.roomsFieldValue, options.adultsFieldValue, options.childrenFieldValue);
  
  //place the values for the distribution in the hidden fields
  for (var i = 0; i < oRoomDistribution.roomAdults.length; i++)
  {
    var field = document.getElementById("nadult"+(i+1)+"Field");
    if (field)
    {
      field.value = oRoomDistribution.roomAdults[i];
    }
  }
  for (var i = 0; i < oRoomDistribution.roomChildren.length; i++)
  {
    var field = document.getElementById("nchild"+(i+1)+"Field");
    if (field)
    {
      field.value = oRoomDistribution.roomChildren[i];
    }    
  }
  
  if (options.webTrendsCustomerDeliveredFlag == true)
  {
    try {
      dcsMultiTrack('DCSext.ecommercedelivery', 'Customers Delivered to Booking Engine', 'DCSext.ecommercecompleted', 'Customers Delivered to Booking Engine');
    } catch (err) {
      //don't do anything
    }
  }
  
  IBEWidgetAttachGoogleAnalyticsTrackingCookiesToAction(options.form);
}