function showMenu(which, x, y, strCheckinDate, intDepartureDay, strDepartureMonthYear, strReturnDate, intReturnDay, strReturnMonthYear, intDuration, strAirportFrom, strAirportTo)
{
	document.getElementById('deal_box').style.left = x;
	document.getElementById('deal_box').style.top = y;
	document.getElementById('deal_box').style.display = "";
	
	document.dealsForm.intNoAdults.focus();
	document.dealsForm.strCheckinDate.value = strCheckinDate;
	document.dealsForm.intDepartureDay.value = intDepartureDay;
	document.dealsForm.strDepartureMonthYear.value = strDepartureMonthYear;
	document.dealsForm.strReturnDate.value = strReturnDate;
	document.dealsForm.intReturnDay.value = intReturnDay;
	document.dealsForm.strReturnMonthYear.value = strReturnMonthYear;
	document.dealsForm.strAirportFrom.value = strAirportFrom;
	document.dealsForm.strAirportTo.value = strAirportTo;
}

function hideMenu(which)
{
   document.getElementById('deal_box').style.display = "none";
} 

function checkDealsForm(thisForm)
{
	if (thisForm.intNoAdults.value == "" || isNaN(thisForm.intNoAdults.value) || parseInt(thisForm.intNoAdults.value) <= 0)
	{
		alert ("Please enter the no. of adults");
		thisForm.intNoAdults.focus();
		
		return false;
	}
	
	if (thisForm.intNoChildren.value == "")
	{
		thisForm.intNoChildren.value = 0;
	}

	if (thisForm.intNoInfants.value == "")
	{
		thisForm.intNoInfants.value = 0;
	}

	if (isNaN(thisForm.intNoChildren.value) || parseInt(thisForm.intNoChildren.value) < 0)
	{
		alert ("Please enter the no. of children");
		thisForm.intNoChildren.focus();
		
		return false;
	}

	if (isNaN(thisForm.intNoInfants.value) || parseInt(thisForm.intNoInfants.value) < 0)
	{
		alert ("Please enter the no. of infants");
		thisForm.intNoInfants.focus();
		
		return false;
	}	
	
	return true;
}