-- TextBannerSet
function TextBannerSet(self,param)
	local Title=self:GetChild("Title");
	local Subtitle=self:GetChild("Subtitle");
	local Artist=self:GetChild("Artist");
	-- no Subtitle
	if Subtitle:GetText() == "" then
		(cmd(zoom,0.9;maxwidth,200;y,-8))(Title);
		(cmd(visible,false))(Subtitle);
		(cmd(zoom,0.6;maxwidth,266;y,8))(Artist);
	-- yes Subtitle
	else
		(cmd(zoom,0.9;maxwidth,200;y,-8;))(Title);
		(cmd(visible,true;zoom,0.5;maxwidth,300))(Subtitle);
		(cmd(zoom,0.6;maxwidth,266;y,10))(Artist);
	end
end

-- Get common info for SelectMode:

-- GetNumStagesAvailable - Return number of available stages.
function GetNumStagesAvailable()
	if PREFSMAN:GetPreference("EventMode") then return "Unlimited Stages";
	else
		if PREFSMAN:GetPreference("SongsPerPlay") > 1 then
			return PREFSMAN:GetPreference("SongsPerPlay") .. " Stages";
		else
			return PREFSMAN:GetPreference("SongsPerPlay") .. " Stage";
		end;
	end;
end;

-- GetNumCoursesAvailable - Return number of available courses.
function GetNumCoursesAvailable(ct)
	-- ct is Course Type and should be an enum but it's not, lick my dick SM
	if not ct then return; end;
	
	local courses = SONGMAN:GetAllCourses(true);
	local count = 0;
	
	for i=1,table.getn(courses) do
		--Trace("S DEBUG: course name = " .. courses[i]:GetDisplayFullTitle() .. " / type = " .. courses[i]:GetCourseType());
		if courses[i]:GetCourseType() == ct then
			count = count + 1;
		end;
	end;
	
	local coursesText = count > 1 and " Courses" or " Course";
	
	return count .. coursesText;
end;

-- code by Synikal of the Destined