function onLoadForm(){if(document.awardFlightSearchForm!=null){var showOneWay=showOrHideReturnDate();var returnDateId="returnDate";var returnDateLabelId="returnDateLabel";if(showOneWay){showHide(returnDateId,showOneWay);showHide(returnDateLabelId,showOneWay);}calcTotalNoOfPsgrs();document.getElementById("non_revenue1").style.display="block";}}function calcTotalNoOfPsgrs(){var numPsgrs=0;numPsgrs=parseInt(document.awardFlightSearchForm.adultPassengerCount.value)+parseInt(document.awardFlightSearchForm.seniorPassengerCount.value)+parseInt(document.awardFlightSearchForm.childPassengerCount.value)+parseInt(document.awardFlightSearchForm.infantPassengerCount.value);if(numPsgrs>6){numPsgrs=6;document.awardFlightSearchForm.adultPassengerCount.value=6;document.awardFlightSearchForm.seniorPassengerCount.value=0;document.awardFlightSearchForm.childPassengerCount.value=0;document.awardFlightSearchForm.infantPassengerCount.value=0;}document.awardFlightSearchForm.numberOfPassengers.value=numPsgrs;}function calcAdultPsgrs(){var numPsgrs=0;var adultPsgrs=0;numPsgrs=document.awardFlightSearchForm.numberOfPassengers.value;adultPsgrs=numPsgrs;document.awardFlightSearchForm.adultPassengerCount.value=adultPsgrs;document.awardFlightSearchForm.seniorPassengerCount.value=0;document.awardFlightSearchForm.childPassengerCount.value=0;document.awardFlightSearchForm.infantPassengerCount.value=0;}function collapseExpand(bSwapForm){var id="commonTripPreferancesOld";var psgrId="passenger";var advancedSearchId="advancedSearchOld";var awardid="awardTripPreferancesOld";var awardAdvancedSearch="awardAdvancedSearchText";var awardCabinClassOptions="awardCabinClassOptions";var displayTripPrefsid=awardid;var cabinClassOptionsid=awardCabinClassOptions;var advSearchTextid=awardAdvancedSearch;if(document.getElementById){if((!bSwapForm&&document.getElementById(id).style.display=="none")||(bSwapForm&&document.getElementById(id).style.display=="block")){document.getElementById(id).style.display="block";document.getElementById(displayTripPrefsid).style.display="block";document.getElementById(cabinClassOptionsid).style.display="block";document.getElementById(psgrId).style.display="none";document.getElementById(advancedSearchId).style.display="none";}else{document.getElementById(id).style.display="none";document.getElementById(awardid).style.display="none";document.getElementById(cabinClassOptionsid).style.display="none";document.getElementById(psgrId).style.display="block";document.getElementById(advancedSearchId).style.display="block";calcTotalNoOfPsgrs();}}else{if(document.layers){if(document.id.display=="none"){document.getElementById(id).style.display="block";document.getElementById(displaytripprefsid).style.display="block";document.getElementById(cabinClassOptions).style.display="block";document.getElementById(psgrId).style.display="none";document.getElementById(advancedSearchId).style.display="none";document.getElementById(awardAdvancedSearch).style.display="none";document.getElementById(revAdvancedSearch).style.display="none";}else{document.getElementById(id).style.display="none";document.getElementById(awardid).style.display="none";document.getElementById(revenueid).style.display="none";document.getElementById(cabinClassOptions).style.display="none";document.getElementById(awardCabinClassOptions).style.display="none";document.getElementById(psgrId).style.display="block";document.getElementById(advancedSearchId).style.display="block";document.getElementById(advSearchText).style.display="block";calcTotalNoOfPsgrs();}}else{if(document.all.id.style.display=="none"){document.getElementById(id).style.display="block";document.getElementById(displaytripprefsid).style.display="block";document.getElementById(cabinClassOptions).style.display="block";document.getElementById(psgrId).style.display="none";document.getElementById(advancedSearchId).style.display="none";document.getElementById(awardAdvancedSearch).style.display="none";document.getElementById(revAdvancedSearch).style.display="none";}else{document.getElementById(id).style.display="none";document.getElementById(awardid).style.display="none";document.getElementById(revenueid).style.display="none";document.getElementById(cabinClassOptions).style.display="none";document.getElementById(awardCabinClassOptions).style.display="none";document.getElementById(psgrId).style.display="block";document.getElementById(advancedSearchId).style.display="block";document.getElementById(advSearchText).style.display="block";calcTotalNoOfPsgrs();}}}}function showHide(showId,bHide){if(document.getElementById){if(!bHide&&document.getElementById(showId).style.visibility=="hidden"){document.getElementById(showId).style.visibility="visible";}else{if(bHide){document.getElementById(showId).style.visibility="hidden";}}}else{if(document.layers){if(bHide&&document.showId.visibility=="hidden"){document.showId.visibility="visible";}else{if(!bHide){document.showId.visibility="hidden";}}}else{if(bHide&&document.all.showId.style.visibility=="hidden"){document.all.showId.style.visibility="visible";}else{if(!bHide){document.all.showId.style.visibility="hidden";}}}}}function removeElement(displayId,bDisplay){if(document.getElementById){if(bDisplay&&document.getElementById(displayId).style.display=="none"){document.getElementById(displayId).style.display="block";}else{if(!bDisplay){document.getElementById(displayId).style.display="none";}}}else{if(document.layers){if(bDisplay&&document.displayId.display=="none"){document.displayId.display="block";}else{if(!bDisplay){document.displayId.display="none";}}}else{if(bDisplay&&document.all.displayId.style.display=="none"){document.all.displayId.style.display="block";}else{if(!bDisplay){document.all.displayId.style.display="none";}}}}}function swapSearchCriteria(displayId,removeId){if(document.getElementById){document.getElementById(displayId).style.display="block";document.getElementById(removeId).style.display="none";}else{if(document.layers){if(document.displayId.display=="none"){document.getElementById(displayId).style.display="block";document.getElementById(removeId).style.display="none";}}else{if(document.all.displayId.style.display=="none"){document.getElementById(displayId).style.display="block";document.getElementById(removeId).style.display="none";}}}}function showOrHideReturnDate(){var showOneWay=false;for(var i=0;i<document.awardFlightSearchForm.tripType.length;i++){if(document.awardFlightSearchForm.tripType[i].checked){var selVal=document.awardFlightSearchForm.tripType[i].value;if(selVal=="oneWay"){showOneWay=true;}}}return showOneWay;}
