function validateClientSearchFlight(theForm)
{

 var citycodeformat = /^(([A-Z]|[a-z]){3,3})$/;

  var citycode = theForm.citycode;
  if (checkTextEmpty(citycode,"叫恶糶カ"))
  {
    return false;
  }
   if (!citycodeformat.test(citycode.value) )
  {
     alert("Please enter 3 characters city code!");
     return false;
  }

  var rdTrip = theForm.rdTrip;
  if (checkRadioEmpty(rdTrip,"叫匡拒︽祘贺摸"))
  {
    return false;
  }

  var rdTripValue = getRadioValue(rdTrip);

  var departureDate = theForm.departureDate;
	if(!chkDate(departureDate,"叫匡拒祇ら戳",1))
		return false;

  var returnDate = theForm.returnDate;
  if (rdTripValue == "1")
  {
	  if(!chkDate(returnDate,"叫匡拒祘ら戳",1))
		  return false;

  	if(!chkBothDay(departureDate, returnDate, "祇ら戳ぃ祘ら戳ぇ"))
	    return false;

  }
  else if(rdTripValue == "0")
  {
    returnDate.value = "";
  }

	if(!chkCurrentDay(departureDate, currentDay, "祇ら戳ぃタ絋"))
	    return false;

  var rdClass = theForm.rdClass;
  if (checkRadioEmpty(rdClass,"叫匡拒康"))
  {
    return false;
  }

  return true;
}

function validateClientSearchFlightEN(theForm)
{

 var citycodeformat = /^(([A-Z]|[a-z]){3,3})$/;

  var citycode = theForm.citycode;
  if (checkTextEmpty(citycode,"Please input City"))
  {
    return false;
  }

  if (!citycodeformat.test(citycode.value) )
  {
     alert("Please enter 3 characters city code!");
     return false;
  }
/*
  if (citycode.value.length != 3)
  {
     alert("Please enter 3 characters city code!");
     return false;
  }
*/
  var rdTrip = theForm.rdTrip;
  if (checkRadioEmpty(rdTrip,"Please select Trip Type"))
  {
    return false;
  }

  var rdTripValue = getRadioValue(rdTrip);

  var departureDate = theForm.departureDate;
	if(!chkDate(departureDate,"Please select Departure Date",1))
		return false;

  var returnDate = theForm.returnDate;
  if (rdTripValue == "1")
  {
	  if(!chkDate(returnDate,"Please select Return Date",1))
		  return false;

  	if(!chkBothDay(departureDate, returnDate, "Return Date should be after Departure Date"))
	    return false;

  }
  else if(rdTripValue == "0")
  {
    returnDate.value = "";
  }

	if(!chkCurrentDay(departureDate, currentDay, "Departure Date is invalid"))
	    return false;

  var rdClass = theForm.rdClass;
  if (checkRadioEmpty(rdClass,"Please select the class"))
  {
    return false;
  }

  return true;
}

function validateClientSearchFlightGB(theForm)
{

var citycodeformat = /^(([A-Z]|[a-z]){3,3})$/;

  var citycode = theForm.citycode;
  if (checkTextEmpty(citycode,"请填写城市"))
  {
    return false;
  }


   if (!citycodeformat.test(citycode.value) )
  {
     alert("Please enter 3 characters city code!");
     return false;
  }

  var rdTrip = theForm.rdTrip;
  if (checkRadioEmpty(rdTrip,"请选择行程种类"))
  {
    return false;
  }

  var rdTripValue = getRadioValue(rdTrip);

  var departureDate = theForm.departureDate;
	if(!chkDate(departureDate,"请选择出发日期",1))
		return false;

  var returnDate = theForm.returnDate;
  if (rdTripValue == "1")
  {
	  if(!chkDate(returnDate,"请选择回程日期",1))
		  return false;

  	if(!chkBothDay(departureDate, returnDate, "出发日期不可以在回程日期之后"))
	    return false;

  }
  else if(rdTripValue == "0")
  {
    returnDate.value = "";
  }

	if(!chkCurrentDay(departureDate, currentDay, "出发日期不正确"))
	    return false;

  var rdClass = theForm.rdClass;
  if (checkRadioEmpty(rdClass,"请选择客舱"))
  {
    return false;
  }

  return true;
}
