activityavailsubmitcount=0;

function activityavailvalidate (fob) {

	var f = fob;
	var c,m,v,numa,numc,numpax;
	var daysout = 1; // days of lead time required (from today)

    msg = "The activity date you have selected is not valid.";
    var cidate = CheckDate(f.activitydate1); // Check In Date
    if (!cidate) return abort(f.activitydate1, msg);

    var syyyy = cidate.getFullYear();
    var smm = 1 + cidate.getMonth();
    var sdd = cidate.getDate();

	msg = "Activity date must be at least "+daysout+" days in the future, please check it.";
	var startdaysout = days_in_future(syyyy, smm, sdd);
	if (startdaysout <daysout) return abort(f.activitydate1, msg);

	msg = "The maximum number of participants that can be booked at one time is six. If you have more people than that, please make additional bookings.";
    numa=nval(f.Num_Adults);
    numc=nval(f.Num_Children);
    numpax=numa + numc;
    if (numpax > 6) return abort(f.Num_Children, msg);

	if (VerifyChildren(f)) ; else return false;

    //Check for multiple clicking of submit button:
//    if (activityavailsubmitcount > 0) {
//       window.alert("We are in the process of checking availability for the activities you specified. Please be patient. If you cannot seem to get beyond this page, please reload this page and try again.");
//      return false;
// }
    ++activityavailsubmitcount;
    return true;
} // function activityavailvalidate
