function catcalc(cal, pfield) {
        var date = cal.date;
        // use the _other_ field
        var testDate1 = new Date ();
        var testDate2 = new Date ();
        testDate2.setDate(testDate2.getDate()+2);
        if (new Date (date) <= testDate1){
        	alert("Arrival date must be after today\'s date");
		var field = document.getElementById(pfield.id);
        	field.value = "";
	} else if (new Date (date) <= testDate2){
        	alert("For bookings less than two days from today please call 01803 847100");
		var field = document.getElementById(pfield.id);
        	field.value = "";
	}

}



    Calendar.setup({
        inputField     :    "f_date_a",   // id of the input field
		button         :    "f_date_a_but",   // id of the button to trigger calendar
        ifFormat       :    "%A, %B %d, %Y",       // format of the input field
        onUpdate       :    catcalc
    });
    Calendar.setup({
        inputField     :    "f_calcdate",
		button         :    "f_calcdate_but",   // id of the button to trigger calendar
        ifFormat       :    "%A, %B %d, %Y",
        onUpdate       :    catcalc
    });
    Calendar.setup({
        inputField     :    "f_date_b",   // id of the input field
		button         :    "f_date_b_but",   // id of the button to trigger calendar
        ifFormat       :    "%A, %B %d, %Y",       // format of the input field
        onUpdate       :    catcalc
    });
    Calendar.setup({
        inputField     :    "f_date_c",   // id of the input field
		button         :    "f_date_c_but",   // id of the button to trigger calendar
        ifFormat       :    "%A, %B %d, %Y",       // format of the input field
        onUpdate       :    catcalc
    });
    Calendar.setup({
        inputField     :    "f_date_d",   // id of the input field
		button         :    "f_date_d_but",   // id of the button to trigger calendar
        ifFormat       :    "%A, %B %d, %Y",       // format of the input field
        onUpdate       :    catcalc
    });
    Calendar.setup({
        inputField     :    "f_date_e",   // id of the input field
		button         :    "f_date_e_but",   // id of the button to trigger calendar
        ifFormat       :    "%A, %B %d, %Y",       // format of the input field
        onUpdate       :    catcalc
    });
