// Dec 5, 2007 Yu Liu Updated to hide/show Select a Departure time when there is no departure time if(!ajaxObj){ var ajaxObj = new XMLHTTP("/include/ajax/mybic_server.php"); } function getTripTimes( tripID, tripDate, fldName, default_value, doOnChange, tdName){// Modified by Yu Liu //Use AJAX to retieve all the trip times for the given tripID on the given tripDate if(document.getElementById('alternateTripsList')) { document.getElementById('alternateTripsList').style.height='1px'; document.getElementById('alternateTripsList').style.overflow="hidden"; document.getElementById('alternateTripsList').style.visibility = "hidden"; } document.getElementById('dateinfo').style.visibility = "visible"; ajaxObj.method="POST"; dateFld=findSelectionField(fldName); //Try to reset the form //if(resetForm) resetForm(dateFld.form.name); dateFld.options[0] = new Option('Loading..', '1'); //w= document.getElementById(tdName); //w.style.visibility = 'hidden'; ajaxObj.call("action=getTripTimes_helper&tripID="+encodeURIComponent(tripID)+"&trip_date="+encodeURIComponent(tripDate)+"&fld_name="+encodeURIComponent(fldName)+"&tdName="+encodeURIComponent(tdName)+"&default_value="+encodeURIComponent(default_value)+"&doOnChange="+doOnChange, displayTripTimes); } function MM_findObj(n, d) { //v4.0 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i