//for the homepage and searches
//dynamically displays kid age dropdowns depending on number of kids selected
		
		//to display dropdown for ages or not
		function changedrops()
			{
				var childage=document.all.childageframe;
				var chil=document.SearchForm.PassengerChildCount.value;
				var max=3;

				if (0==chil){                    
					childage.style.visibility="hidden";
					childage.style.display="none";
			    }
				else{                
					ShowAges(chil,max);

					if(childage.style.display=="none"){
						childage.style.visibility="hidden";
						childage.style.display="inline";
					}
					
                    childage.style.visibility="visible";
                    LapChild();
                }                        
			}
		
		//which age dropdowns to show when
		function ShowAges(c,m)
			{
				for(var i=0;i< m;i++)
				{
				if(i< c) d="visible";
				else d="hidden";
				eval("document.all.cages"+parseInt(i)+".style.visibility='"+d+"'");
				eval("document.all.label"+parseInt(i)+".style.visibility='"+d+"'");
				if (document.all.disclaimer)
				{
					eval("document.all.disclaimer.style.visibility='hidden'");
				}
				}			
			}
		
		//if the child is under 1 then display a message
		function LapChild()
			{
				var m = 3;
				for(var i=0;i< m;i++)
				  {
					var lapchild = eval("document.all.childAge_"+parseInt(i+1)+".value")

					if (document.all.disclaimer)
					{
						if (lapchild == 0)
								{
								eval("document.all.disclaimer.style.display='block'");
								break;
								}
							else if (lapchild == 1)
								{
								eval("document.all.disclaimer.style.display='block'");
								break;
								}
							//else if (lapchild == -1)
							//	{
							//	eval("document.all.disclaimer.style.display='block'");
							//	break;
							//	}
							else
								{
								eval("document.all.disclaimer.style.display='none'");
								}
						}
				  }
			}



//This function reDisplays the Child Drop downs if the user clicks the back button.
function reDisplayChildDropDowns() {

if (document.SearchForm.PassengerChildCount.value > 0) {
									childageframe.style.display="inline";
									
									if (document.SearchForm.PassengerChildCount.value == 2) {
										cages2.style.display="none";
										label2.style.display="none";
									}
									if (document.SearchForm.PassengerChildCount.value == 1) {
										cages1.style.display="none";
										label1.style.display="none";
										cages2.style.display="none";
										label2.style.display="none";
									}

								}
}
			