timestr="<option value=''>Anytime</option><option value='07:00:00'>7:00</option><option value='09:00:00'>9:00</option><option value='11:00:00'>11:00</option><option value='13:00:00'>13:00</option><option value='15:00:00'>15:00</option><option value='17:00:00'>17:00</option><option value='19:00:00'>19:00</option><option value='21:00:00'>21:00</option><option value='23:00:00'>23:00</option>";

function checkPassNum(form){
	var adultnum = form.adultNum.options[form.adultNum.selectedIndex].value;
	var childnum = form.childNum.options[form.childNum.selectedIndex].value;
	var babynum = form.babyNum.options[form.babyNum.selectedIndex].value;
	var totalpnum = parseInt(adultnum,10)+parseInt(childnum,10);
	if(totalpnum>9){
	   alert("Your maximum selections of air tickets is 9!");
	   form.adultNum.value = '1';
	   form.childNum.value = '0';
	   form.babyNum.value = '0';
	   return;
	 }
	if(eval(babynum)>eval(adultnum)){
	   alert("Sorry, 1 adult can only carry 1 enfant ");
	   form.adultNum.selectedIndex = '1';
	   form.childNum.selectedIndex = '0';
	   form.babyNum.selectedIndex = '0';
	   return;
	}
}

function OpenWindow(htmurl,tops,lefts,widths,heights)
{
   var paramet = 'toolbar=no,resizable=yes,scrollbars=yes,top='+ tops + ',left='+ lefts + ',width='+ widths + ',height=' + heights;
   newWindow = window.open(htmurl,"viewfilm",paramet);
   newWindow.focus();
}

function triptypeselect(rowid)
{   var textobj=document.getElementById(rowid);
    	if(rowid==null)
    	 return;
    	if (rowid=="trip-type-01")
		{ 
		    textobj=document.getElementById("trip-type-01");
    	    if(textobj==null)
    	       return;	
    	    textobj.style.display=""; 
			textobj=document.getElementById("trip-type-02");
    	    if(textobj==null)
    	       return;
    	    textobj.style.display="none"; 
			textobj=document.getElementById("trip-type-03");
    	    if(textobj==null)
    	       return;
    	    textobj.style.display="none"; 
    	    return; 
    	 }
		 
		 if (rowid=="trip-type-02")
		{ 
		    textobj=document.getElementById("trip-type-01");
    	    if(textobj==null)
    	       return;	
    	    textobj.style.display="none"; 
			textobj=document.getElementById("trip-type-02");
    	    if(textobj==null)
    	       return;
    	    textobj.style.display=""; 
			textobj=document.getElementById("trip-type-03");
    	    if(textobj==null)
    	       return;
    	    textobj.style.display="none"; 
    	    return; 
    	 }
		 
		 if (rowid=="trip-type-03")
		{ 
		    textobj=document.getElementById("trip-type-01");
    	    if(textobj==null)
    	       return;	
    	    textobj.style.display="none"; 
			textobj=document.getElementById("trip-type-02");
    	    if(textobj==null)
    	       return;
    	    textobj.style.display="none"; 
			textobj=document.getElementById("trip-type-03");
    	    if(textobj==null)
    	       return;
    	    textobj.style.display=""; 
    	    return; 
    	 }
    	textobj.style.display="none"; 
}
