private function XMLDataFilters(item:Object):Boolean {
//Stops and Refundable Filter
if (oneStop.selected == false && Number(item..onWardStops) == 1)
return false;
if (twoStops.selected == false && Number(item..onWardStops) == 2)
return false;
if (twoPlusStop.selected == false && Number(item..onWardStops) > 2)
return false;
if (zeroStops.selected == false && Number(item..onWardStops) == 0)
return false;
if (chkRef.selected == false && item..refundable == "YES")
return false;
if (chkNonRef.selected == false && item..refundable == "NO")
return false;
//Time Filter
if ((Number(item..departingHour) < sldepTimeFilter.values[0]) || (Number(item..departingHour) > sldepTimeFilter.values[1]))
return false;
// Fare Filter
if ((Number(item..finalFare) < slider.values[0]) || (Number(item..finalFare) > slider.values[1]))
return false;
return true;
}
|