function checkPkgInputs( form )
{  
	var errs = "";

  errs += checkString( "From", form.From.value, "X", 56, "Y" );
  errs += checkString( "Destination", form.To.value, "X", 56, "Y" );
  
  var out = checkDate( "Departure date", form.DepDate.value );
  errs += out.error;

  var ret = checkDate( "Return date", form.RetDate.value );
  errs += ret.error;

  if ( out.ffDate > ret.ffDate )
    errs += "- Return date is before departure date\n";

  var roomcount = form.Rooms.value
  var agecount  = 0
                                                                    
  for (var i=1 ; i<= roomcount ; i++)
  {
    var adt = parseInt(document.getElementById("Room-" + i + "-Adt").value)
    var chd = parseInt(document.getElementById("Room-" + i + "-Chd").value)
   
    if ((adt + chd) == 0)
      errs += "- Occupancy of room " + i + " is mandatory\n"
      
    agecount += chd
    
    if ((adt == 0) && (chd > 0))
      errs += "- Children cannot occupy a room without an adult\n"
  } 
  
  if (agecount > 0)
    for (var i=1 ; i<= agecount ; i++)
    {
      var age = document.getElementById("ChildAges-ChAg" + i ).value
      if (age == "")
        errs += "- Age " + i + " is mandatory\n"
    }
      
	if (errs != "")
	{
		alert( "Please note the following:\n" + errs );
		return false;
	}
	
  showWait()
	  
	return true; 
}

