	function fn_Sendto(month, year)
	{
		document.frm_ChangeMonth.guest.value = document.frm_AvailabilityCalendar.cmb_GuestNumber.value ;

		document.frm_ChangeMonth.month.value=month;
		document.frm_ChangeMonth.year.value=year;
		document.frm_ChangeMonth.dtstart.value = document.frm_AvailabilityCalendar.cmb_StartYear.value + "-" + document.frm_AvailabilityCalendar.cmb_StartMonth.value + "-" + document.frm_AvailabilityCalendar.cmb_StartDay.value;

		document.frm_ChangeMonth.dtend.value = document.frm_AvailabilityCalendar.cmb_EndYear.value + "-" + document.frm_AvailabilityCalendar.cmb_EndMonth.value + "-" + document.frm_AvailabilityCalendar.cmb_EndDay.value;

		document.frm_ChangeMonth.submit();
	}
		function fn_ValidateAvailabilityCalendar(frm)
		{
			if(frm.cmb_StartMonth.value == "")
			{
				alert("Please Select Month for Check In date of booking period.");
				frm.cmb_StartMonth.focus();
				return false;
			}
			if(frm.cmb_StartDay.value == "")
			{
				alert("Please Select Day for Check In date of booking period.");
				frm.cmb_StartDay.focus();
				return false;
			}
			if(frm.cmb_EndMonth.value == "")
			{
				alert("Please Select Month for Check Out date of booking period.");
				frm.cmb_EndMonth.focus();
				return false;
			}
			if(frm.cmb_EndDay.value == "")
			{
				alert("Please Select Day for Check Out date of booking period.");
				frm.cmb_EndDay.focus();
				return false;
			}
			
			start = frm.cmb_StartYear.value + "-" + frm.cmb_StartMonth.value + "-" + frm.cmb_StartDay.value;
			end = frm.cmb_EndYear.value + "-" + frm.cmb_EndMonth.value + "-" + frm.cmb_EndDay.value;
			// check if the start date is greater than end date of the duration selected
			if(start>end)
			{
				alert("Please check the Check In date and Check Out date.\n Check Out date can't be less than Check In date.");
				return false;
			}

			// check if the start date is less than today's date
			if(start < today)
			{
				
				alert("Please check the Check In date.\n Check In date can't be less than today's date.");
				return false;
			}
			return true;
		}

					var whose_turn = "in";
			// this function is not defined here it is present in the generation of the clendar which will inturn will get in effect with the help of this funciton in the run time.
			function fn_DateEnter(day, month, year)
			{
				if(whose_turn == "in")
				{
					// set the values of the elements of these compbos as per the passed values. For Check in Date
					document.frm_AvailabilityCalendar.cmb_StartDay.value=day;
					document.frm_AvailabilityCalendar.cmb_StartMonth.value=month;
					document.frm_AvailabilityCalendar.cmb_StartYear.value=year;
					whose_turn = "out";
				}
				else
				{
					// set the values of the elements of these compbos as per the passed values. For Check out date
					document.frm_AvailabilityCalendar.cmb_EndDay.value=day;
					document.frm_AvailabilityCalendar.cmb_EndMonth.value=month;
					document.frm_AvailabilityCalendar.cmb_EndYear.value=year;
					whose_turn = "in";
				}
			}
