function ChooseBattleFormation(%formation)
{
   switch$ (%formation)
   {
      case "line":
         bc_formation.SetText("Line");      
         $battleformation = "line";
         canvas.popdialog(formation);
      case "skirmishline":
         bc_formation.SetText("Skirmish Line");      
         $battleformation = "skirmishline";
      case "heaviesfirst":
         bc_formation.SetText("Heavy First");      
         $battleformation = "heavyfirst";
      case "lightfirst":
         bc_formation.SetText("Light First");      
         $battleformation = "lightfirst";
      case "box":      
         bc_formation.SetText("Box");      
         $battleformation = "box";
   }

   canvas.popdialog(formation);   
}

function formation::OnWake()
{
   InitFormation();   
}

function InitFormation()
{
   formationdesc.setText("You can optionally choose the formaton your vehicles will start in. Hold the cursor over the formation to get more information about it.");   
}