var caption="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">					   <tr class=\"text\"><td height=\"50\" colspan=\"5\">If you have Children travelling with you please enter thier ages:<br> (so we can determine if you are eligible for discounts, etc.) </td></tr></table>";

var no_child = 0;
var no_infant = 0;

function infantAge(no_inf){
	this.no_infant = no_inf;
	var x = '';
	if(no_inf >0){
		document.getElementById("child_caption").innerHTML = caption;
		x+= '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr class="text">';
		for(var i=1;i<=no_inf;i++){
			x+='<td width="59">Infant '+i+'</td>';
			x+='<br>';
            x+='<td height="35"><select name="infantAgeSlt[]" class="dropdwn"><option selected value="0">--</option><option value="0">With Seat</option><option value="1">With Out Seat</option></select></td>';
		}
			x+='</tr></table>';
	}
	iscaption();
	document.getElementById("infant_div").innerHTML = x;
}

function childAge(no_chi){
	this.no_child = no_chi;
	var x = '';
	if(no_chi >0){
		document.getElementById("child_caption").innerHTML = caption;
		x+= '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr class="text">';
		for(var i=1;i<=no_chi;i++){
			x+='<td width="59">Child '+i+'</td>';
			x+='<br>';
            x+='<td height="35"><select name="childAgeSlt[]" class="dropdwn"><option selected value="0">--</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option></select></td>';
		}
			x+='</tr></table>';
	}
	iscaption();
	document.getElementById("child_div").innerHTML = x;
}

function iscaption(){
	if(this.no_child == 0 && this.no_infant == 0)
		document.getElementById("child_caption").innerHTML = '';
}