ConfigureVarSys()
{

	CreateInteger("race.count",1);
	SetIntegerRange("race.count", 1, 4);

                   CreateInteger("race2.count",1);
	SetIntegerRange("race2.count", 1, 4);
	
                    CreateInteger("end.end",0);        
	SetIntegerRange("end.end", 0,1);
	
	CreateInteger("chaos.count",0);
        SetIntegerRange("chaos.count",0,2);
}

CreateControl("INFO", "STATIC")
{

	Geom("HCENTRE", "VCENTRE");


	Size(768, 675);


	BorderSize(0);
	BevelSize(0);


	TabSize(300, 23);

	Style("OUTLINE", "INERT");

	Title("Choose your race and enemy");
	ColorGroup("LISTBOX");
	TitleFont("MEDIUM");

	CreateControl("Image1", "Static")
	{
		ColorGroup("WHITE");
		Geom("Top", "Left");
		Size(765, 672);
		Pos(2, 2);
		Image("one.bmp",  0, 0, 512, 450);
	}

	CreateControl("ScionButt", "BUTTON")
	{
		Pos(60, 107);
		Size(113, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		Text("SCION");
		ColorGroup("LISTBOX");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("race.count");
		Value(1);
		NotifyParent("Button::Select", "Scion");
	}

	CreateControl("EDFButt", "BUTTON")
	{
		Pos(60, 144);
		Size(113, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		ColorGroup("LISTBOX");
		Text("EDF");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(2);
		UseVar("race.count");

		NotifyParent("Button::Select", "EDF");
	}

	CreateControl("HadeanButt", "BUTTON")
	{
		Pos(60, 182);
		Size(113, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		ColorGroup("LISTBOX");
		Text("HADEAN");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(3);
		UseVar("race.count");

		NotifyParent("Button::Select", "Hadean");
	}

CreateControl("Cerbeributt", "BUTTON")
	{
		Pos(60, 225);
		Size(113, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		ColorGroup("LISTBOX");
		Text("Cerberi");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(4);
		UseVar("race.count");

		NotifyParent("Button::Select", "Cerberi");
	}
	CreateControl("ReturnButt", "BUTTON")
	{
		Pos(342, 587);
		Size(83, 23);
		BorderSize(8);
		BevelSize(8);
		ColorGroup("LISTBOX");
		Font("SMALL");
		Text("START");
		Style("ROLLOVER","RADIO","OUTLINE");
		NotifyParent("Button::Select", "Return");
	}


	OnEvent("Scion")
	{
//		Cmd("end.end 0");
		Deactivate("|Start");
		Deactivate("|EDF");
		Deactivate("|Hadean");
		Cmd("race.count 1");
		Cmd("images.models fvscout_skel.xsi");	
		Activate("|Scion");
	}

	OnEvent("EDF")
	{
//		Cmd("end.end 0");
		Deactivate("|Start");
		Deactivate("|Scion");
		Deactivate("|Hadean");
		Cmd("race.count 2");
		Cmd("images.models ivscout00.xsi");	
		Activate("|EDF");
	}

	OnEvent("Hadean")
	{
//		Cmd("end.end 0");
		Deactivate("|Start");
		Deactivate("|Scion");
		Deactivate("|EDF");
		Cmd("race.count 3");	
		Cmd("images.models evscout00.xsi");	
		Activate("|Hadean");
	}

	OnEvent("Cerberi")
	{
//		Cmd("end.end 0");
		Deactivate("|Start");
		Deactivate("|Scion");
		Deactivate("|EDF");
                                        Deactivate("|Hadean");
		Cmd("race.count 4");	
		Cmd("images.models evscout00.xsi");	
		Activate("|Cerberi");
	}

CreateControl("chaosButt", "BUTTON")
	{
		Pos(192, 587);
		Size(83, 23);
		BorderSize(8);
		BevelSize(8);
		ColorGroup("LISTBOX");
		Font("SMALL");
		Text("CHAOS");
		Style("ROLLOVER","RADIO","OUTLINE");
                UseVar("chaos.count");
                Value(1);
		NotifyParent("Button::Select", "chaos");
	}

CreateControl("chaos2Butt", "BUTTON")
	{
		Pos(192, 450);
		Size(83, 23);
		BorderSize(8);
		BevelSize(8);
		ColorGroup("LISTBOX");
		Font("SMALL");
		Text("Norm");
		Style("ROLLOVER","RADIO","OUTLINE");
                UseVar("chaos.count");
                Value(0);
		NotifyParent("Button::Select", "chaos2");
	}

CreateControl("chaos3Butt", "BUTTON")
	{
		Pos(192, 510);
		Size(83, 23);
		BorderSize(8);
		BevelSize(8);
		ColorGroup("LISTBOX");
		Font("SMALL");
		Text("3way");
		Style("ROLLOVER","RADIO","OUTLINE");
                UseVar("chaos.count");
                Value(2);
		NotifyParent("Button::Select", "chaos3");
	}

CreateControl("Scion2Butt", "BUTTON")
	{
		Pos(600, 107);
		Size(113, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		Text("SCION");
		ColorGroup("LISTBOX");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("race2.count");
		Value(1);
		NotifyParent("Button::Select", "Scion2");
	}

	CreateControl("EDF2Butt", "BUTTON")
	{
		Pos(600, 144);
		Size(113, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		ColorGroup("LISTBOX");
		Text("EDF");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(2);
		UseVar("race2.count");

		NotifyParent("Button::Select", "EDF2");
	}

	CreateControl("Hadean2Butt", "BUTTON")
	{
		Pos(600, 182);
		Size(113, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		ColorGroup("LISTBOX");
		Text("HADEAN");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(3);
		UseVar("race2.count");

		NotifyParent("Button::Select", "Hadean2");
	}

CreateControl("Cerberi2butt", "BUTTON")
	{
		Pos(600, 225);
		Size(113, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		ColorGroup("LISTBOX");
		Text("Cerberi");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(4);
		UseVar("race2.count");

		NotifyParent("Button::Select", "Cerberi2");
	}
	


	OnEvent("Scion2")
	{
//		Cmd("end.end 0");
		Deactivate("|Start");
		Deactivate("|EDF2");
		Deactivate("|Hadean2");
		Cmd("race2.count 1");
		Cmd("images.models fvscout_skel.xsi");	
		Activate("|Scion2");
	}

	OnEvent("EDF2")
	{
//		Cmd("end.end 0");
		Deactivate("|Start");
		Deactivate("|Scion2");
		Deactivate("|Hadean2");
		Cmd("race2.count 2");
		Cmd("images.models ivscout00.xsi");	
		Activate("|EDF2");
	}

	OnEvent("Hadean2")
	{
//		Cmd("end.end 0");
		Deactivate("|Start");
		Deactivate("|Scion2");
		Deactivate("|EDF2");
		Cmd("race2.count 3");	
		Cmd("images.models evscout00.xsi");	
		Activate("|Hadean2");
	}

	OnEvent("Cerberi2")
	{
//		Cmd("end.end 0");
		Deactivate("|Start");
		Deactivate("|Scion2");
		Deactivate("|EDF2");
                                        Deactivate("|Hadean2");
		Cmd("race2.count 4");	
		Cmd("images.models evscout00.xsi");	
		Activate("|Cerberi2");
	}


	OnEvent("Return")
	{

		Cmd("end.end 1");	
	
	}

        OnEvent("chaos")         
	{

		Cmd("chaos.count 1");	
	        Activate("|chaos");
	}	

        OnEvent("chaos2")         
	{

		Cmd("chaos.count 0");	
	        Deactivate("|chaos");
	}	

	OnEvent("Control::Activate")
	{
		Cmd("race.count 0");
		Cmd("end.end 0");
		Activate("|Start");
	}

		OnEvent("Control::Deactivate")
	{
		
		Deactivate("|Start");
		Deactivate("|Scion");
		Deactivate("|EDF");
		Deactivate("|Hadean");
                                        Deactivate("|Cerberi");
	}
}

CreateControl("Start", "STATIC")
{
	Geom("HCENTRE", "VCENTRE");
	Pos(225, 630);
	Size(768, 675);
	Style("OUTLINE");
	BevelSize(0);




	

	}



}


