require "scripts/style.lua"

SetPlantingHireValues();

reDoWindow = function()
	redisplayWindow("change_blend");
end;

hirePrice = GetHiringPriceViniculture();

if	hirePrice > availableMoney then
	hireFunction = function()
		PopModal("hireWindow");
		DisplayDialog({"scripts/ok.lua", body="nomoneyhire", title="nomoney_title", x = kCenter, y = kCenter, action = reDoWindow});
	end;
else
	hireFunction = function()
		HireChangeBlend();
		EnableWindow("hireWindow", false)
		DisplayDialog({"scripts/hireviniculture.lua"});
		EnableWindow("hireWindow", true)
	end;
end;

DisplayDialog{
	"scripts/proceed.lua",
	start=function()
			StartChangeBlend();
	   end,
	hire=hireFunction,
	title = "changeblend_title",
	body = "changeblend_body",
	name = "hireWindow";
};
