require( "scripts/style.lua" );
local DayButtonDisplacex = 30;

gCurScreen = 0;



function DisableAllButtons(  )
EnableWindow("b_dayF1D1",false);
EnableWindow("b_dayF1D2",false);
EnableWindow("b_dayF1D3",false);
EnableWindow("b_dayF1D4",false);
EnableWindow("b_dayF1D5",false);
EnableWindow("b_dayF1D7",false);
EnableWindow("b_dayF1D6",false);

EnableWindow("b_dayF2D1",false);
EnableWindow("b_dayF2D2",false);
EnableWindow("b_dayF2D3",false);
EnableWindow("b_dayF2D4",false);
EnableWindow("b_dayF2D5",false);
EnableWindow("b_dayF2D7",false);
EnableWindow("b_dayF2D6",false);

EnableWindow("b_dayF3D1",false);
EnableWindow("b_dayF3D2",false);
EnableWindow("b_dayF3D3",false);
EnableWindow("b_dayF3D4",false);
EnableWindow("b_dayF3D5",false);
EnableWindow("b_dayF3D7",false);
EnableWindow("b_dayF3D6",false);

EnableWindow("b_dayF4D1",false);
EnableWindow("b_dayF4D2",false);
EnableWindow("b_dayF4D3",false);
EnableWindow("b_dayF4D4",false);
EnableWindow("b_dayF4D5",false);
EnableWindow("b_dayF4D7",false);
EnableWindow("b_dayF4D6",false);

EnableWindow("b_dayF5D1",false);
EnableWindow("b_dayF5D2",false);
EnableWindow("b_dayF5D3",false);
EnableWindow("b_dayF5D4",false);
EnableWindow("b_dayF5D5",false);
EnableWindow("b_dayF5D7",false);
EnableWindow("b_dayF5D6",false);

--EnableWindow("lockedF2",false)
--EnableWindow("lockedF3",false)
--EnableWindow("lockedF4",false)
--EnableWindow("lockedF5",false)
end

function SetScreen( screen )

	if screen == 1 then
		EnableWindow("playF1",true);
		EnableWindow("playF2",false);
		EnableWindow("playF3",false);
		EnableWindow("playF4",false);
		EnableWindow("playF5",false);
		EnableWindow("playBit1",true);
		EnableWindow("playBit2",false);
		EnableWindow("playBit3",false);
		EnableWindow("playBit4",false);
		EnableWindow("playBit5",false);		
		WindowEnabled(1);
	end
	if screen == 2 then
		EnableWindow("playF1",false);
		EnableWindow("playF2",true);
		EnableWindow("playF3",false);
		EnableWindow("playF4",false);
		EnableWindow("playF5",false);
		EnableWindow("playBit1",false);
		EnableWindow("playBit2",true);
		EnableWindow("playBit3",false);
		EnableWindow("playBit4",false);
		EnableWindow("playBit5",false);		
		WindowEnabled(2);
	end
	if screen == 3 then
		EnableWindow("playF1",false);
		EnableWindow("playF2",false);
		EnableWindow("playF3",true);
		EnableWindow("playF4",false);
		EnableWindow("playF5",false);
		EnableWindow("playBit1",false);
		EnableWindow("playBit2",false);
		EnableWindow("playBit3",true);
		EnableWindow("playBit4",false);
		EnableWindow("playBit5",false);		
		WindowEnabled(3);
	end
	if screen == 4 then
		EnableWindow("playF1",false);
		EnableWindow("playF2",false);
		EnableWindow("playF3",false);
		EnableWindow("playF4",true);
		EnableWindow("playF5",false);
		EnableWindow("playBit1",false);
		EnableWindow("playBit2",false);
		EnableWindow("playBit3",false);
		EnableWindow("playBit4",true);
		EnableWindow("playBit5",false);		
		WindowEnabled(4);
	end
	if screen == 5 then
		EnableWindow("playF1",false);
		EnableWindow("playF2",false);
		EnableWindow("playF3",false);
		EnableWindow("playF4",false);
		EnableWindow("playF5",true);
		EnableWindow("playBit1",false);
		EnableWindow("playBit2",false);
		EnableWindow("playBit3",false);
		EnableWindow("playBit4",false);
		EnableWindow("playBit5",true);		
		WindowEnabled(5);
	end
	gCurScreen = screen ;
end

FamilyTextFont = {
	oldsansblackFont,
	15,
	Color(0,0,0,255),
};

House1StartButtonGraphics = {
	"gui/map/singletons_house",
	"gui/map/singletons_house",
	"gui/map/singletons_house",
};

House1FinishButtonGraphics = {
	"gui/map/singletons_house",
	"gui/map/singletons_house",
	"gui/map/singletons_house",
};

House2StartButtonGraphics = {
	"gui/map/sagets_house",
	"gui/map/sagets_house",
	"gui/map/sagets_house",
};

House2FinishButtonGraphics = {
	"gui/map/sagets_house",
	"gui/map/sagets_house",
	"gui/map/sagets_house",
};

House3StartButtonGraphics = {
	"gui/map/barnes_house",
	"gui/map/barnes_house",
	"gui/map/barnes_house",
};

House3FinishButtonGraphics = {
	"gui/map/barnes_house",
	"gui/map/barnes_house",
	"gui/map/barnes_house",
};

House4StartButtonGraphics = {
	"gui/map/mendozas_house",
	"gui/map/mendozas_house",
	"gui/map/mendozas_house",
};

House4FinishButtonGraphics = {
	"gui/map/mendozas_house",
	"gui/map/mendozas_house",
	"gui/map/mendozas_house",
};

House5StartButtonGraphics = {
	"gui/map/nelsons_house",
	"gui/map/nelsons_house",
	"gui/map/nelsons_house",
};

House5FinishButtonGraphics = {
	"gui/map/nelsons_house",
	"gui/map/nelsons_house",
	"gui/map/nelsons_house",
};

DayButtonGraphics = {
	"gui/map/day_new_not_selected",
	"gui/map/day_new_selected",
	"gui/map/day_new_mouse_over",
	"gui/map/day_new_selected",
};

	NanniesDisplaceX = 140;
	NanniesDisplaceY = 8;
	
	PlayDisplaceX = -20;
	PlayDisplaceY = 0;
	
	NannySize = 0.6;
	
function SelectFamilyAux(family, day)
	SelectFamily(family, day);
	--[[
	while not NannyArrived() do
		Yield();
	end

	SwapToModal("scripts/familyintroduction.lua");
	--]]
	--[[
	if FirstDay() then
		SwapToModal("scripts/familyintroduction.lua");
	else
		SwapToModal("scripts/gamescreen.lua");
	end
	--]]
end


MakeDialog
{
	Map
	{

align=kHAlignLeft + kVAlignTop,
		TextF1_x = 270,
		TextF1_y = 300,
		RotationAngleF1 = 0.0;
		
		TextF2_x = 520,
		TextF2_y = 300,
		RotationAngleF2 = 0.0;
		
		TextF3_x = 760,
		TextF3_y = 300,
		RotationAngleF3 = -3.0;
		
		TextF4_x = 320,
		TextF4_y = 538,
		RotationAngleF4 = -3.0;
		
		TextF5_x = 660,
		TextF5_y = 530,
		RotationAngleF5 = 0.0;
		
		PhoneF1_x = 270+47,
		PhoneF1_y = 300-50,
		
		PhoneF2_x = 520+47,
		PhoneF2_y = 300-50,
		
		PhoneF3_x = 760+47,
		PhoneF3_y = 300-50,
		
		PhoneF4_x = 320+47,
		PhoneF4_y = 538-65,
		
		PhoneF5_x = 660+47,
		PhoneF5_y = 538-65,
		
		name = "bg",
		image = "backgrounds/map",
		x = -144,
		y = -76,	
	Bitmap
		{
			name = "house1start",
			x = 153,
			y = 150,
			image = "gui/map/singletons_house",
			-- command =
			-- function()
				-- StartFamily();
			-- end
		},
		Bitmap
		{
			name = "house2start",
			x = 401,
			y = 150,
			image = "gui/map/sagets_house",
			-- command =
			-- function()
				-- StartFamily();
			-- end
		},
		Bitmap
		{
			name = "house3start",
			x = 639,
			y = 145,
			image = "gui/map/barnes_house",
			-- command =
			-- function()
				-- StartFamily();
			-- end
		},
		Bitmap
		{
			name = "house4start",
			x = 199,
			y = 387,
			image = "gui/map/mendozas_house",
			-- command =
			-- function()
				-- StartFamily();
			-- end
		},
		Bitmap
		{
			name = "house5start",
			x = 537,
			y = 380,
			image = "gui/map/nelsons_house",
			-- command =
			-- function()
				-- StartFamily();
			-- end
		},
		--Bitmap
		--{
			--name = "house1locked",
			--x = 153,
			--y = 150,
			--image = "gui/map/singletons_lock_house",
			-- command =
			-- function()
				-- StartFamily();
			-- end
		--},
		Bitmap
		{
			name = "house2locked",
			x = 401,
			y = 150,
			image = "gui/map/sagets_lock_house",
			-- command =
			-- function()
				-- StartFamily();
			-- end
		},
		Bitmap
		{
			name = "house3locked",
			x = 639,
			y = 145,
			image = "gui/map/barnes_lock_house",
			-- command =
			-- function()
				-- StartFamily();
			-- end
		},
		Bitmap
		{
			name = "house4locked",
			x = 199,
			y = 387,
			image = "gui/map/mendozas_lock_house",
			-- command =
			-- function()
				-- StartFamily();
			-- end
		},
		Bitmap
		{
			name = "house5locked",
			x = 537,
			y = 380,
			image = "gui/map/nelsons_lock_house",
			-- command =
			-- function()
				-- StartFamily();
			-- end
		},	
		--[[
		Text
		{
			name = "house1txt",
			label = "family1",
			x = 653,
			y = 549,
			w = 139,
			h = 35,
			font = FamilyTextFont,
			flags = kHAlignCenter+kVAlignCenter,
		},
		Text
		{
			name = "house2txt",
			label = "family2",
			x = 410,
			y = 580,
			w = 139,
			h = 35,
			font = FamilyTextFont,
			flags = kHAlignCenter+kVAlignCenter,
		},
		Text
		{
			name = "house3txt",
			label = "family3",
			x = 160,
			y = 544,
			w = 139,
			h = 35,
			font = FamilyTextFont,
			flags = kHAlignCenter+kVAlignCenter,
		},
		Text
		{
			name = "house4txt",
			label = "family4",
			x = 181,
			y = 355,
			w = 139,
			h = 35,
			font = FamilyTextFont,
			flags = kHAlignCenter+kVAlignCenter,
		},
		Text
		{
			name = "house5txt",
			label = "family5",
			x = 426,
			y = 334,
			w = 139,
			h = 35,
			font = FamilyTextFont,
			flags = kHAlignCenter+kVAlignCenter,
		},
		--]]
		SetStyle( MenuButtonStyle ),
		Button
		{
			name = "mapback",
			x=131,
			y=719,
			graphics = MediumButton2Graphics,
			MenuButtonLabel(0, 0, 152, 34, "back", oldsansblackFont, 24, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255)),
			command=
				function()
					SwapToModal("scripts/mainmenu.lua");
					--SwapToModal("scripts/map.lua");
				end
		},
		SetStyle( MenuButtonStyle ),
		Button
		{
			name = "playF1",
			x=192+PlayDisplaceX,
			y=136+PlayDisplaceY,
			graphics = MediumButton2Graphics,
			MenuButtonLabel(0, 0, 152, 34, "playgame", oldsansblackFont, 24, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255)),
			command=
				function()
					StartFamily();
				end
		},
		Bitmap
		{
			name = "playBit1",
			image = "gui/map/nanny.png",
			x=192+NanniesDisplaceX,
			y=136+NanniesDisplaceY,
			scale = NannySize,
		},
		SetStyle( MenuButtonStyle ),
		Button
		{
			name = "playF2",
			x=443+PlayDisplaceX,
			y=137+PlayDisplaceY,
			graphics = MediumButton2Graphics,
			MenuButtonLabel(0, 0, 152, 34, "playgame", oldsansblackFont, 24, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255)),
			command=
				function()
					StartFamily();
				end
		},
		Bitmap
		{
			name = "playBit2",
			image = "gui/map/nanny.png",
			x=443+NanniesDisplaceX,
			y=137+NanniesDisplaceY,
			scale = NannySize,
		},
		SetStyle( MenuButtonStyle ),
		Button
		{
			name = "playF3",
			x=681+PlayDisplaceX,
			y=137+PlayDisplaceY,
			graphics = MediumButton2Graphics,
			MenuButtonLabel(0, 0, 152, 34, "playgame", oldsansblackFont, 24, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255)),
			command=
				function()
					StartFamily();
				end
		},
		Bitmap
		{
			name = "playBit3",
			image = "gui/map/nanny.png",
			x=681+NanniesDisplaceX,
			y=137+NanniesDisplaceY,
			scale = NannySize,
		},		
		SetStyle( MenuButtonStyle ),
		Button
		{
			name = "playF4",
			x=239+PlayDisplaceX,
			y=374+PlayDisplaceY,
			graphics = MediumButton2Graphics,
			MenuButtonLabel(0, 0, 152, 34, "playgame", oldsansblackFont, 24, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255)),
			command=
				function()
					StartFamily();
				end
		},
		Bitmap
		{
			name = "playBit4",
			image = "gui/map/nanny.png",
			x=239+NanniesDisplaceX,
			y=374+NanniesDisplaceY,
			scale = NannySize,
		},
		SetStyle( MenuButtonStyle ),
		Button
		{
			name = "playF5",
			x=574+PlayDisplaceX,
			y=371+PlayDisplaceY,
			graphics = MediumButton2Graphics,
			MenuButtonLabel(0, 0, 152, 34, "playgame", oldsansblackFont, 24, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255)),
			command=
				function()
					StartFamily();
				end
		},
		Bitmap
		{
			name = "playBit5",
			image = "gui/map/nanny.png",
			x=574+NanniesDisplaceX,
			y=371+NanniesDisplaceY,
			scale = NannySize,
		},		
	Window{
			name = "windowF1",
			x = 128,
			y = 318,
			fit = true,
			BeginGroup(),
			SetStyle(MenuButtonStyle),
			Button
			{
				name = "b_dayF1D1",
				x = DayButtonDisplacex,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day1txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(1,1);
					SetScreen( 1 );
				end
			},
			Button
			{
				name = "b_dayF1D2",
				x = DayButtonDisplacex*2,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day2txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(1,3);
					SetScreen( 1 );
				end
			},
			Button
			{
				name = "b_dayF1D3",
				x = DayButtonDisplacex*3,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day3txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(1,5);
					SetScreen( 1 );
				end
			},
			Button
			{
				name = "b_dayF1D4",
				x = DayButtonDisplacex*4,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day4txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(1,7);
					SetScreen( 1 );
				end
			},
			Button
			{
				name = "b_dayF1D5",
				x = DayButtonDisplacex*5,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day5txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(1,9);
					SetScreen( 1 );
				end
			},
			Button
			{
				name = "b_dayF1D6",
				x = DayButtonDisplacex*6,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day6txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(1,11);
					SetScreen( 1 );
				end
			},
			Button
			{
				name = "b_dayF1D7",
				x = DayButtonDisplacex*7,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day7txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(1,13);
					SetScreen( 1 );
				end
			},
		},
--JANELA DOIS!!!!!!!!!!!!!
	Window{
			name = "windowF2",
			x = 378,
			y = 318,
			fit = true,
			BeginGroup(),
			SetStyle(MenuButtonStyle),
			Button
			{
				name = "b_dayF2D1",
				x = DayButtonDisplacex,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day1txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(2,1);
					SetScreen( 2 );
				end
			},
			Button
			{
				name = "b_dayF2D2",
				x = DayButtonDisplacex*2,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day2txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(2,3);
					SetScreen(2);
				end
			},
			Button
			{
				name = "b_dayF2D3",
				x = DayButtonDisplacex*3,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day3txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(2,5);
					SetScreen( 2 );
				end
			},
			Button
			{
				name = "b_dayF2D4",
				x = DayButtonDisplacex*4,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day4txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(2,7);
					SetScreen( 2 );
				end
			},
			Button
			{
				name = "b_dayF2D5",
				x = DayButtonDisplacex*5,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day5txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(2,9);
					SetScreen( 2 );
				end
			},
			Button
			{
				name = "b_dayF2D6",
				x = DayButtonDisplacex*6,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day6txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(2,11);
					SetScreen( 2 );
				end
			},
			Button
			{
				name = "b_dayF2D7",
				x = DayButtonDisplacex*7,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day7txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(2,13);
					SetScreen( 2 );
				end
			},
		},
--FIM JANELA 2
--JANELA TRES!!!!!!!!!!!!!
	Window{
			name = "windowF3",
			x = 620,
			y = 311,
			fit = true,
			BeginGroup(),
			SetStyle(MenuButtonStyle),
			Button
			{
				name = "b_dayF3D1",
				x = DayButtonDisplacex,
				y = 6,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day1txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(3,1);
					SetScreen( 3 );
				end
			},
			Button
			{
				name = "b_dayF3D2",
				x = DayButtonDisplacex*2,
				y = 5,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day2txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(3,3);
					SetScreen( 3 );
				end
			},
			Button
			{
				name = "b_dayF3D3",
				x = DayButtonDisplacex*3,
				y = 4,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day3txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(3,5);
					SetScreen( 3 );
				end
			},
			Button
			{
				name = "b_dayF3D4",
				x = DayButtonDisplacex*4,
				y = 3,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day4txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(3,7);
					SetScreen( 3 );
				end
			},
			Button
			{
				name = "b_dayF3D5",
				x = DayButtonDisplacex*5,
				y = 2,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day5txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(3,9);
					SetScreen( 3 );
				end
			},
			Button
			{
				name = "b_dayF3D6",
				x = DayButtonDisplacex*6,
				y = 1,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day6txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(3,11);
					SetScreen( 3 );
				end
			},
			Button
			{
				name = "b_dayF3D7",
				x = DayButtonDisplacex*7,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day7txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(3,13);
					SetScreen( 3 );
				end
			},
		},
--FIM JANELA 3
--JANELA QUATRO!!!!!!!!!!!!!
	Window{
			name = "windowF4",
			x = 176,
			y = 555,
			fit = true,
			BeginGroup(),
			SetStyle(MenuButtonStyle),
			Button
			{
				name = "b_dayF4D1",
				x = DayButtonDisplacex,
				y = 6,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day1txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(4,1);
					SetScreen( 4 );
				end
			},
			Button
			{
				name = "b_dayF4D2",
				x = DayButtonDisplacex*2,
				y = 5,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day2txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(4,3);
					SetScreen( 4 );
				end
			},
			Button
			{
				name = "b_dayF4D3",
				x = DayButtonDisplacex*3,
				y = 4,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day3txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(4,5);
					SetScreen( 4 );
				end
			},
			Button
			{
				name = "b_dayF4D4",
				x = DayButtonDisplacex*4,
				y = 3,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day4txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(4,7);
					SetScreen( 4 );
				end
			},
			Button
			{
				name = "b_dayF4D5",
				x = DayButtonDisplacex*5,
				y = 2,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day5txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(4,9);
					SetScreen( 4 );
				end
			},
			Button
			{
				name = "b_dayF4D6",
				x = DayButtonDisplacex*6,
				y = 1,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day6txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(4,11);
					SetScreen( 4 );
				end
			},
			Button
			{
				name = "b_dayF4D7",
				x = DayButtonDisplacex*7,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day7txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(4,13);
					SetScreen( 4 );
				end
			},
		},
--FIM JANELA 4
--JANELA CINCO!!!!!!!!!!!!!
	Window{
			name = "windowF5",
			x = 518,
			y = 548,
			fit = true,
			BeginGroup(),
			SetStyle(MenuButtonStyle),
			Button
			{
				name = "b_dayF5D1",
				x = DayButtonDisplacex,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day1txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(5,1);
					SetScreen( 5 );
				end
			},
			Button
			{
				name = "b_dayF5D2",
				x = DayButtonDisplacex*2,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day2txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(5,3);
					SetScreen( 5 );
				end
			},
			Button
			{
				name = "b_dayF5D3",
				x = DayButtonDisplacex*3,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day3txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(5,5);
					SetScreen( 5 );
				end
			},
			Button
			{
				name = "b_dayF5D4",
				x = DayButtonDisplacex*4,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day4txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(5,7);
					SetScreen( 5 );
				end
			},
			Button
			{
				name = "b_dayF5D5",
				x = DayButtonDisplacex*5,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day5txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(5,9);
					SetScreen( 5 );
				end
			},
			Button
			{
				name = "b_dayF5D6",
				x = DayButtonDisplacex*6,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day6txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(5,11);
					SetScreen( 5 );
				end
			},
			Button
			{
				name = "b_dayF5D7",
				x = DayButtonDisplacex*7,
				y = 0,
				fit = true,
				Text
				{
					font = FamilyTextFont,
					x=13,
					y=10,
					w=20,
					h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "day7txt",
				},
				type = kRadio,
				graphics = DayButtonGraphics,
				command =
				function()
					SelectFamilyAux(5,13);
					SetScreen( 5 );
				end
			},
		},
--FIM JANELA 5,
	Bitmap
	{
		name = "lockedF2",
		image = "gui/locked",
		x = 466,
		y = 186,
		scale = 1.00
	},
	Bitmap
	{
		name = "lockedF3",
		image = "gui/locked",
		x = 717,
		y = 183,
		scale = 1.00
	},
	Bitmap
	{
		name = "lockedF4",
		image = "gui/locked",
		x = 265,
		y = 424,
		scale = 1.00
	},
	Bitmap
	{
		name = "lockedF5",
		image = "gui/locked",
		x = 608,
		y = 421,
		scale = 1.00
	}
	}
}
