function showChild()
{
	//alert('hello');
	if(document.getElementById('selNoOfCnn').value=="Select")
	{
		document.getElementById('trChildAges').style.visibility = "hidden";
		for(i=1; i<=5; i++)
		{
			document.getElementById('selNoOfCNN' + i).style.visibility="hidden";
		}
		return false;
	}//end of if children not present
	else
	{
		document.getElementById('trChildAges').style.visibility = "visible";
		for(i=1; i<=5; i++)
		{
			document.getElementById('selNoOfCNN' + i).style.visibility="hidden";
		}
		var noOfCnn = parseInt(document.getElementById('selNoOfCnn').value);
		for(i=1; i<=noOfCnn; i++)
		{
			document.getElementById('selNoOfCNN' + i).style.visibility="visible";
		}
		return false;
	}//end of else children present
}//end of function showChild

function ValidateSS(pageNo)
{
	if(document.getElementById('ddlCountry').value=="Select")
	{
		alert('Please select country');
		document.getElementById('ddlCountry').focus();
		return false;
	}
	else if(document.getElementById('ddlCity').value=="Select")
	{
		alert('Please select city');
		document.getElementById('ddlCity').focus();
		return false;
	}
	try
	{
		var selDate = document.getElementById('txtDepDate').value.split('/');
		var selDate1 = new Date(selDate[1]+"/"+selDate[0]+"/"+selDate[2]);
		
		if(isNaN(selDate1) || selDate1 < 0)
		{
			alert('Invalid Date');
			document.getElementById('txtDepDate').focus();
			return false;
		}

		var today = new Date();
		var todayplus2 = new Date(eval(today.getMonth()+1)+"/"+eval(today.getDate()+2)+"/"+today.getFullYear());
		var todayplus2yrs = new Date(eval(today.getMonth()+1)+"/"+eval(today.getDate()-1)+"/"+eval(today.getFullYear()+2));
		
		if(selDate1 < todayplus2)
		{
			alert('Date should be atleast 2 days from today');
			document.getElementById('txtDepDate').focus();
			return false;
		}
		else if(selDate1 > todayplus2yrs)
		{
			alert('Bookings can only be made for 2 years from today');
			document.getElementById('txtDepDate').focus();
			return false;
		}
	}
	catch (e)
	{
		alert('Invalid Date');
		document.getElementById('txtDepDate').focus();
		return false;
	}
	
	if(pageNo=='1')
	{
		var NoOfAdt=0;
		if(document.getElementById('selNoOfAdt').value=="Select")
		{
			alert('Please select atleast one adult');
			document.getElementById('selNoOfAdt').focus();
			return false;
		}
		else
		{
			NoOfAdt = parseInt(document.getElementById('selNoOfAdt').value);
		}
		var NoOfCnn=0;
		if(document.getElementById('selNoOfCnn').value!="Select")
		{
			NoOfCnn = parseInt(document.getElementById('selNoOfCnn').value);
			for(var i=1; i<=NoOfCnn; i++)
			{
				if(document.getElementById('selNoOfCnn' + i).value=="Select")
				{
					alert('Please enter all child ages');
					document.getElementById('selNoOfCnn' + i).focus();
					return false;
				}
			}			
		}
		
		if(eval(NoOfAdt+NoOfCnn) > 9)
		{
			alert('The maximum number of passengers allowed is 9');
			document.getElementById('selNoOfAdt').focus();
			return false;
		}
	}
	return true;
}//end of function ValidateSS