// Change the visibility status of an id
function toggleDetail(idName,showHide){
	body=document.getElementById(idName);
	//body=document.getElementById('multiStopBookings');
	if (body){
		if (showHide == 'show')
		{
		try {
			body.style.visibility='visible';
				//body.style.display='table-row';
			} catch(e){
				//body.style.display = 'block';
			}
		} else {
				body.style.visibility='hidden';
				//body.style.display = 'none';
				}
		}
}
// function to remove a row from a table
function toggleDisplayRow(idName,showHide)
	{
	body=document.getElementById(idName);
	//body=document.getElementById(idName);
	if (body){
		if (showHide == 'show')
		{
		try {
				//body.style.visibility='visible';
				 body.style.display='table-row';
			} catch(e) {
				body.style.display = 'block';
			}
		} else {
				//body.style.visibility='hidden';
				 body.style.display = 'none';
				}
		}
	}

function multiStop(){
	// change display of row	
	toggleDisplayRow('multiStopRow','show');
	toggleDisplayRow('adultsRow','hide');
	toggleDisplayRow('childrenRow','hide');
	// change visibility
	toggleDetail('directFlightRow','hide');
	toggleDetail('returnDateRow','hide');
	toggleDetail('outDateRow','hide');
	toggleDetail('adultsRow','hide');
	toggleDetail('childrenRow','hide');
	toggleDetail('infantsRow','hide');


}
function returnFlighOption(){
	// change display of row
	toggleDisplayRow('multiStopRow','hide');
	toggleDisplayRow('adultsRow','show');
	toggleDisplayRow('childrenRow','show');
	// change visibility
	toggleDetail('outDateRow','hide');
	toggleDetail('directFlightRow','show');
	toggleDetail('returnDateRow','show');
	toggleDetail('outDateRow','show');
	toggleDetail('adultsRow','show');
	toggleDetail('childrenRow','show');
	toggleDetail('infantsRow','show');
}
function oneWayOption(){
		// change display of row
	toggleDisplayRow('multiStopRow','hide');
	toggleDisplayRow('adultsRow','show');
	toggleDisplayRow('childrenRow','show');	
	toggleDetail('returnDateRow','hide');
	// change visibility
	toggleDetail('directFlightRow','show');	
	toggleDetail('outDateRow','show');
	toggleDetail('adultsRow','show');
	toggleDetail('childrenRow','show');
	toggleDetail('infantsRow','show');
}