	function validate()
	{
		var frm = document.frmBooking;
		var tDate = ((new Date()).getMonth()+1) + '/' + (new Date()).getDate() + '/' + (new Date()).getYear();
		
		if(!validateField(frm.txtName, 1, 50, '', 'your name')) return;
		if(!validateField(frm.txtEmail, 6, 100, 'email', 'your email')) return;
		if(!validateField(frm.txtHCity, 1, 100, '', 'hotel city')) return;

		if(frm.cmbHCategory.selectedIndex==0)
		{
			alert('Please select HOTEL CATEGORY.');
			frm.cmbHCategory.focus();
			return;
		}

		if(!validateField(frm.txtEmail, 6, 100, 'email', 'your email')) return;
		
		if(frm.cmbCInDate.selectedIndex==0)
		{
			alert('Please select CHECK-IN DATE.');
			frm.cmbCInDate.focus();
			return;
		}
		if(frm.cmbCInMonth.selectedIndex==0)
		{
			alert('Please select CHECK-IN MONTH.');
			frm.cmbCInMonth.focus();
			return;
		}
		
		if(!validateField(frm.txtCInYear, 2, 4, 'integer', 'check-in year')) return;
		
		frm.txtCInDate.value = frm.cmbCInMonth.selectedIndex + '/' + frm.cmbCInDate.selectedIndex + '/' + frm.txtCInYear.value;
		
		if(!validateField(frm.txtCInDate, 6, 10, 'date', 'check-in date')) return;
		
		if(DateDiff(frm.txtCInDate.value, tDate, 'd', true)>0)
		{
			alert('CHECK-IN DATE cannot be less than CURRENT DATE.');
			frm.cmbCInDate.focus();
			return;
		}
		
		if(frm.cmbCOutDate.selectedIndex==0)
		{
			alert('Please select CHECK-OUT DATE.');
			frm.cmbCOutDate.focus();
			return;
		}
		if(frm.cmbCOutMonth.selectedIndex==0)
		{
			alert('Please select CHECK-OUT MONTH.');
			frm.cmbCOutMonth.focus();
			return;
		}

		if(!validateField(frm.txtCOutYear, 2, 4, 'integer', 'check-out year')) return;
		
		frm.txtCOutDate.value = frm.cmbCOutMonth.selectedIndex + '/' + frm.cmbCOutDate.selectedIndex + '/' + frm.txtCOutYear.value;
		
		if(!validateField(frm.txtCOutDate, 6, 10, 'date', 'check-Out date')) return;
		
		if(DateDiff(frm.txtCOutDate.value, frm.txtCInDate.value, 'd', true)>0)
		{
			alert('CHECK-OUT DATE cannot be less than CHECK-IN DATE.');
			frm.cmbCOutDate.focus();
			return;
		}

		if(frm.cmbSingle.selectedIndex==0 && frm.cmbDouble.selectedIndex==0 && frm.cmbTriple.selectedIndex==0)
		{
			alert('Please select NUMBER OF ROOMS required.');
			frm.cmbSingle.focus();
			return;
		}
		
		frm.submit();
	}
