'S&B Faremaster
'C 2018 Christian Rolle
				
{trigger:ticketprinter_getticket}
		-1 (S.L.Faremaster_Smenu_select)
		99 (S.L.Faremaster_Mode)
		-1 (S.L.ticketprinter_ticket_selection) (S.L.Faremaster_Ticket) (S.L.GivenTicket)
		0 (S.L.ticketprinter_ticket_pos) (S.L.faremaster_ticket_pos)
		(T.L.ev_ticketsale_giveticket)
{end}

{trigger:cp_Faremaster_Mainklick}
	1 (S.L.Faremaster_Mainklick)
{end}

{trigger:cp_Faremaster_Keypad0}
	0 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad1}
	1 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad2}
	2 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad3}
	3 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad4}
	4 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad5}
	5 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad6}
	6 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad7}
	7 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad8}
	8 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad9}
	9 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad_OK}
	80 (M.L.Faremaster_Keypad)
{end}

{trigger:cp_Faremaster_Keypad_DEL}
	90 (M.L.Faremaster_Keypad)
{end}


{trigger:cp_Faremaster_MainMenu_1}
		
	(L.$.Faremaster_Keypad_suffix) (S.$.Faremaster_Keypad)
				
	1 (M.L.Faremaster_Mainmenu)
{end}

{trigger:cp_Faremaster_MainMenu_2}
		
	(L.$.Faremaster_Keypad_suffix) (S.$.Faremaster_Keypad)
				
	2 (M.L.Faremaster_Mainmenu)
{end}

{trigger:cp_Faremaster_MainMenu_3}
		
	(L.$.Faremaster_Keypad_suffix) (S.$.Faremaster_Keypad)
				
	3 (M.L.Faremaster_Mainmenu)
{end}

{trigger:cp_Faremaster_MainMenu_4}
		
	(L.$.Faremaster_Keypad_suffix) (S.$.Faremaster_Keypad)
				
	4 (M.L.Faremaster_Mainmenu)
{end}

{trigger:cp_Faremaster_MainMenu_5}
		
	(L.$.Faremaster_Keypad_suffix) (S.$.Faremaster_Keypad)
				
	5 (M.L.Faremaster_Mainmenu)
{end}

{trigger:cp_Faremaster_MainMenu_6}
	(L.$.Faremaster_Keypad) (S.$.Faremaster_Keypad_suffix)
	"" (S.$.Faremaster_Keypad)
	6 (M.L.Faremaster_Mainmenu)
{end}

{trigger:cp_Faremaster_UMenu_1}
	1 (M.L.Faremaster_UMenu)
{end}

{trigger:cp_Faremaster_UMenu_2}
	2 (M.L.Faremaster_UMenu)
{end}

{trigger:cp_Faremaster_UMenu_3}
	3 (M.L.Faremaster_UMenu)
{end}

{trigger:cp_Faremaster_UMenu_4}
	4 (M.L.Faremaster_UMenu)
{end}

{trigger:cp_Faremaster_UMenu_5}
	5 (M.L.Faremaster_UMenu)
{end}

{trigger:cp_Faremaster_UMenu_6}
	6 (M.L.Faremaster_UMenu)
{end}

{trigger:cp_Faremaster_SMenu_0}
	1 (M.L.Faremaster_SMenu)
{end}

{trigger:cp_Faremaster_SMenu_1}
	2 (M.L.Faremaster_SMenu)
{end}

{trigger:cp_Faremaster_SMenu_2}
	3 (M.L.Faremaster_SMenu)
{end}

{trigger:cp_Faremaster_SMenu_3}
	4 (M.L.Faremaster_SMenu)
{end}

{trigger:cp_Faremaster_SMenu_4}

(L.L.Faremaster_Mode) 99 =
{if}
	1 (S.L.Faremaster_Verkaufsseite)
{endif}

	5 (M.L.Faremaster_SMenu)
{end}

{trigger:cp_Faremaster_SMenu_5}

	(L.L.Faremaster_Mode) 99 =
	(L.L.Faremaster_Verkaufsseite) (L.L.Faremaster_Verkaufsseite_max) < &&
	{if}
		(L.L.Faremaster_Verkaufsseite) 1 + (S.L.Faremaster_Verkaufsseite)
		(L.L.Faremaster_Verkaufsseite) (L.L.Faremaster_Verkaufsseite_max) =
		{if}
			(L.L.Faremaster_Verkaufsseite_max) (S.L.Faremaster_Verkaufsseite)
		{endif}
	{endif}

	6 (M.L.Faremaster_SMenu)
{end}

{trigger:cp_Faremaster_SMenu_6}
	7 (M.L.Faremaster_SMenu)
{end}

{trigger:cp_Faremaster_SMenu_7}

(L.L.Faremaster_Mode) 99 =
{if}
	(L.L.Faremaster_Verkaufsseite) 1 - (S.L.Faremaster_Verkaufsseite)
	(L.L.Faremaster_Verkaufsseite) 1 =
	{if}
		1 (S.L.Faremaster_Verkaufsseite)
	{endif}
{endif}

	8 (M.L.Faremaster_SMenu)
{end}

{trigger:cp_Faremaster_SMenu_8}
	9 (M.L.Faremaster_SMenu)
{end}

{trigger:cp_Faremaster_SMenu_9}
	10 (M.L.Faremaster_SMenu)
{end}

{trigger:IBIS_rueck}
	1 (S.L.cp_Faremaster_Stop_Up)
	1 (S.L.Faremaster_HSTMode)
{end}

{trigger:IBIS_rueck_off}
	0 (S.L.cp_Faremaster_Stop_Up)
	0 (S.L.Faremaster_HSTMode)
{end}

{trigger:cp_Faremaster_Stop_Up}
	1 (S.L.Faremaster_HSTMode)
{end}

{trigger:cp_Faremaster_Stop_Up_off}
	0 (S.L.Faremaster_HSTMode)
{end}

{trigger:cp_Faremaster_Stop_Down}
	2 (S.L.Faremaster_HSTMode)
{end}

{trigger:cp_Faremaster_Stop_Down_off}
	0 (S.L.Faremaster_HSTMode)
{end}

{trigger:cp_Faremaster_Settings_light_1}
	1 (S.L.Faremaster_Light)
{end}

{trigger:cp_Faremaster_Settings_light_2}
	2 (S.L.Faremaster_Light)
{end}

{trigger:cp_Faremaster_Settings_light_3}
	3 (S.L.Faremaster_Light)
{end}

'######################################
'### Tickets sind Verkausseiten-Abhaengig
'######################################

{trigger:cp_Faremaster_Ticket_1}

	(L.L.Faremaster_Verkaufsseite) 1 =
	{if}
		0 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 2 =
	{if}
		6 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 3 =
	{if}
		12 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 4 =
	{if}
		18 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 5 =
	{if}
		24 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 6 =
	{if}
		30 (S.L.Faremaster_Ticket)
	{endif}

{end}

{trigger:cp_Faremaster_Ticket_2}

	(L.L.Faremaster_Verkaufsseite) 1 =
	{if}
		1 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 2 =
	{if}
		7 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 3 =
	{if}
		13 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 4 =
	{if}
		19 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 5 =
	{if}
		25 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 6 =
	{if}
		31 (S.L.Faremaster_Ticket)
	{endif}

{end}

{trigger:cp_Faremaster_Ticket_3}

	(L.L.Faremaster_Verkaufsseite) 1 =
	{if}
		2 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 2 =
	{if}
		8 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 3 =
	{if}
		14 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 4 =
	{if}
		20 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 5 =
	{if}
		26 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 6 =
	{if}
		32 (S.L.Faremaster_Ticket)
	{endif}

{end}

{trigger:cp_Faremaster_Ticket_4}

	(L.L.Faremaster_Verkaufsseite) 1 =
	{if}
		3 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 2 =
	{if}
		9 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 3 =
	{if}
		15 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 4 =
	{if}
		21 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 5 =
	{if}
		27 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 6 =
	{if}
		33 (S.L.Faremaster_Ticket)
	{endif}
	
{end}

{trigger:cp_Faremaster_Ticket_5}

	(L.L.Faremaster_Verkaufsseite) 1 =
	{if}
		4 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 2 =
	{if}
		10 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 3 =
	{if}
		16 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 4 =
	{if}
		22 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 5 =
	{if}
		28 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 6 =
	{if}
		34 (S.L.Faremaster_Ticket)
	{endif}

{end}

{trigger:cp_Faremaster_Ticket_6}

	(L.L.Faremaster_Verkaufsseite) 1 =
	{if}
		5 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 2 =
	{if}
		11 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 3 =
	{if}
		17 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 4 =
	{if}
		23 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 5 =
	{if}
		29 (S.L.Faremaster_Ticket)
	{endif}

	(L.L.Faremaster_Verkaufsseite) 6 =
	{if}
		35 (S.L.Faremaster_Ticket)
	{endif}

{end}


'----------------------
'	Init
'----------------------

{macro:Fare_init}

1 (S.L.CTI_RBL)
3 (S.L.CTI_Innenanzeige)
0 (S.L.CTI_entwerter)

'################################################
'### Pfad für Druckertexturen wird festgelegt ###
'################################################

"..\..\Urbino_II\texture\" (S.$.Pfad_Urbino)
"..\..\Urbino_II\texture\Lawo\Boot.dds" (S.$.Infotainment_Base)
"..\..\Urbino_II\texture\SU_II_Kasse_DVB.dds" (S.$.Faremaster_SU_II_Kasse_DVB)
"..\..\Urbino_II\texture\Faremaster\SU_II_dummy.dds" (S.$.Faremaster_SU_II_dummy)
"..\..\Urbino_II\texture\Displaytext.tga" (S.$.Faremaster_Displaytext)
"..\..\Urbino_II\texture\SU18_II_glas_misc.dds" (S.$.Faremaster_SU18_II_glas_misc)
"..\..\Urbino_II\texture\SU_II_Ticket.dds" (S.$.Faremaster_SU_II_Ticket)

'################################################

0 (S.L.Faremaster_Mode)
1 (S.L.Faremaster_Mainmenu_select)
"" (S.$.Faremaster_Header)
"" (S.$.Faremaster_Keypad)
0 (S.L.Faremaster_BusStop)
3 (S.L.Faremaster_Light)
-1 (S.L.Faremaster_RouteIndex)
-1 (S.L.Faremaster_Ticket)
"" (S.$.IAZ_Terminus_Buffer)

'### Tickets initialisieren

	1 (S.L.Faremaster_Verkaufsseite_max)
	0 (S.L.Faremaster_Verkaufsseite)

	0 (M.V.GetTicketName) "" $>
	{if}	
		0 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname0)
		1 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname1)
		2 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname2)
		3 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname3)
		4 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname4)
		5 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname5)
		1 (S.L.Faremaster_Verkaufsseite_max)
	{endif}

	6 (M.V.GetTicketName) "" $>
	{if}	
		6 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname6)
		7 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname7)
		8 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname8)
		9 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname9)
		10 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname10)
		11 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname11)
		(L.L.Faremaster_Verkaufsseite_max) 1 + (S.L.Faremaster_Verkaufsseite_max)
	{endif}

	12 (M.V.GetTicketName) "" $>
	{if}	
		12 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname12)
		13 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname13)
		14 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname14)
		15 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname15)
		16 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname16)
		17 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname17)
		(L.L.Faremaster_Verkaufsseite_max) 1 + (S.L.Faremaster_Verkaufsseite_max)
	{endif}		

	18 (M.V.GetTicketName) "" $>
	{if}	
		18 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname18)
		19 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname19)
		20 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname20)
		21 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname21)
		22 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname22)
		23 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname23)
		(L.L.Faremaster_Verkaufsseite_max) 1 + (S.L.Faremaster_Verkaufsseite_max)
	{endif}		

	18 (M.V.GetTicketName) "" $>
	{if}	
		24 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname24)
		25 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname25)
		26 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname26)
		27 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname27)
		28 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname28)
		29 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname29)
		(L.L.Faremaster_Verkaufsseite_max) 1 + (S.L.Faremaster_Verkaufsseite_max)
	{endif}

	30 (M.V.GetTicketName) "" $>
	{if}	
		30 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname30)
		31 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname31)
		32 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname32)
		33 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname33)
		34 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname34)
		35 (M.V.GetTicketName) (M.L.Ticket_CapitalizeString) (S.$.Faremaster_Ticketname35)
		(L.L.Faremaster_Verkaufsseite_max) 1 + (S.L.Faremaster_Verkaufsseite_max)
	{endif}
	
{end}


'----------------------
'	Frame
'----------------------

{macro:Fare_frame}

'############################
'### fOcUs04 - Mod Anfang ###
'############################
		
(L.L.AI) !
(L.L.KI-Mode) ! &&
{if}

	(L.L.elec_busbar_main)
	{if}

		(L.L.door_0) (S.L.door0)
		(L.L.Faremaster_Mode) 3 <
		{if}
			0 (S.L.Login_done)
		{else}
			1 (S.L.Login_done)
		{endif}

		(L.L.Faremaster_Umschalt_int) 1 =
		(L.L.Login_done) 1 = &&
		{if}

			(L.L.Faremaster_Mode) 99 <
			(L.L.Faremaster_Mode) 99 > || 
			{if}
				(L.L.Faremaster_Mode) (S.L.Faremaster_Mode_gemerkt)
			{endif}	


			(L.L.door_0) 0.5 >
			(L.L.door_1) 0.5 > ||
			(L.L.Velocity) 4 < &&
			(L.L.Firstrun_umschalt) ! &&
			{if}
				99 (S.L.Faremaster_Mode)
				1 (S.L.Firstrun_umschalt)
			{else}
				(L.L.Velocity) 1 >
				(L.L.Velocity) 3 < &&
				{if}
					(L.L.Faremaster_Mode_gemerkt) (S.L.Faremaster_Mode)
					0 (S.L.Firstrun_umschalt)
				{endif}
			{endif}
		{endif}
	{endif}
{endif}


'############################
'###  fOcUs04 - Mod Ende  ###
'############################

'Automatische Weiterschaltung:

'Unterscheidung zwischen Fahrplan und Normal:

	(L.L.schedule_active)
	{if}
		(L.L.Faremaster_BusStop) 1 + (M.V.GetTTBusstopCount) =
		{if}


			(L.L.Stop_Timer) (L.S.Timegap) + (S.L.Stop_Timer)
			(L.L.Stop_Timer) 1 >
			(L.L.Stop_Timer) 3 < &&
			{if}
				(M.V.GetTTBusstopIndex) (M.V.GetTTBusstopName) (S.$.Fare_IFIS_CurrentStop)
				1 (S.L.Fare_Weiterschaltung)
				0 (S.L.Stop_Timer)
			{endif}
		{else}
			(M.V.GetTTBusstopIndex) (M.V.GetTTBusstopName) (L.$.Fare_IFIS_CurrentStop) $= !
			{if}

				(L.L.Stop_Timer) (L.S.Timegap) + (S.L.Stop_Timer)
				(L.L.Stop_Timer) 1 >
				(L.L.Stop_Timer) 3 < &&
				{if}
					(M.V.GetTTBusstopIndex) (M.V.GetTTBusstopName) (S.$.Fare_IFIS_CurrentStop)
					1 (S.L.Fare_Weiterschaltung)
					0 (S.L.Stop_Timer)
				{endif}
			{endif}
		{endif}
	{endif}

	(L.L.faremaster_druckt)
	{if}
		(L.L.faremaster_ticket_pos) (L.S.Timegap) 1 * + (S.L.faremaster_ticket_pos)
		1 >
		{if}
			(L.L.Faremaster_Ticket) (S.L.GivenTicket)
			0 (S.L.faremaster_druckt)
		{endif}
	{endif}
	
	(L.L.faremaster_druckt) !
	(L.L.GivenTicket) 0 < &&
	(L.L.faremaster_ticket_pos) 1 >= &&
	{if}
		0 (S.L.faremaster_ticket_pos)
		-1 (S.L.Faremaster_Ticket) 
		(T.L.ev_ticketsale_giveticket)
	{endif}

	(L.L.elec_busbar_main)
	(L.L.CTI_RBL) 1 = &&
	{if}
		(L.L.Faremaster_Mode) !
		{if}
			(M.L.Faremaster_Boot)
		{else}
			(L.L.Faremaster_RouteIndex) (L.L.Faremaster_BusStop) (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) (S.L.IBIS_busstop_index)
			(L.L.Faremaster_RouteIndex) (S.L.IBIS_RouteIndex)
			(L.L.Faremaster_BusStop) (S.L.IBIS_busstop)
			
'Vor:
			(L.L.cp_microphone_sw) 1 =
			(L.L.Fare_Weiterschaltung) 1 = ||
			(L.L.Faremaster_HSTMode) 2 = ||
			(L.L.Faremaster_Stop_Lock) ! &&
			{if}	
				(L.L.Faremaster_BusStop) 1 + (L.L.Faremaster_BusStopCount) =
				{if}
					(L.L.IBIS_Route) s0
					1.5 <
					{if}
						2 s1
					{else}
						l0 2.5 <
						{if}
							1 s1
						{endif}
					{endif}
				
					(L.L.IBIS_LinieKurs) 100 * l1 + (M.V.GetRouteIndex) 0 >=
					{if}
						1 (S.L.Faremaster_RouteDir)
						(L.L.IBIS_LinieKurs) 100 * l1 + (M.V.GetRouteIndex) (S.L.Faremaster_RouteIndex)
						(M.L.Faremaster_SetRoute)
						l1 (S.L.IBIS_Route)
						(M.V.GetTTBusstopIndex) (M.V.GetTTBusstopName) (S.$.Fare_IFIS_CurrentStop)
						(L.L.IBIS_LinieKurs)
					{endif}
					1 (S.L.Faremaster_Stop_Lock)
				{else}
					(L.L.Faremaster_BusStop) 1 + (S.L.Faremaster_BusStop)
					1 (S.L.Faremaster_Stop_Lock)
				{endif}
				(M.L.Faremaster_PlayAnnouncement)
				0 (S.L.Fare_Weiterschaltung)
			{endif}
'Rück:
			(L.L.Faremaster_HSTMode) 1 =
			(L.L.Faremaster_Stop_Lock) ! &&
			{if}	
				(L.L.Faremaster_BusStop) 1 - 0 =
				{if}
					(L.L.IBIS_Route) s0
					l0 2 =
					{if}
						1 s1
					{endif}
					l0 1 =
					{if}
						2 s1
					{endif}
					
					(L.L.IBIS_LinieKurs) 100 * l1 + (M.V.GetRouteIndex) 0 >=
					{if}
						0 (S.L.Faremaster_RouteDir)
						(L.L.IBIS_LinieKurs) 100 * l1 + (M.V.GetRouteIndex) (S.L.Faremaster_RouteIndex)
						(M.L.Faremaster_SetRoute)
						l1 (S.L.IBIS_Route)
						(L.L.IBIS_LinieKurs)
					{endif}
					1 (S.L.Faremaster_Stop_Lock)
				{else}
					(L.L.Faremaster_BusStop) 1 - 0 max (S.L.Faremaster_BusStop)
					1 (S.L.Faremaster_Stop_Lock)
				{endif}
				(M.L.Faremaster_PlayAnnouncement)
			{endif}

			(L.L.cp_microphone_sw) !
			(L.L.Faremaster_HSTMode) ! &&
			{if}
				0 (S.L.Faremaster_Stop_Lock)
			{endif}
			
			(M.L.Faremaster_Header)
		
			(L.L.Faremaster_Mode) 1 =
			{if}
				"" (S.$.Faremaster_Ticket)
				0 (S.L.Faremaster_SMenu_active) (S.L.Faremaster_UMenu_active)
				0 (S.L.Faremaster_Keypad_active)
				0 (S.L.Faremaster_MainMenu_1) (S.L.Faremaster_MainMenu_2) (S.L.Faremaster_MainMenu_3) (S.L.Faremaster_MainMenu_4) (S.L.Faremaster_MainMenu_5) (S.L.Faremaster_MainMenu_6)
				(L.$.Pfad_Urbino) "Faremaster\Main.dds" $+ (S.$.Faremaster_Maintexture)
				(L.L.Faremaster_Mainklick)
				{if}
					2 (S.L.Faremaster_Mode)
					0 (S.L.Faremaster_Mainklick)
				{endif}
			{endif}
			(L.L.Faremaster_Mode) 2 =
			{if}
				"" (S.$.Faremaster_Ticket)
				0 (S.L.Faremaster_SMenu_active) (S.L.Faremaster_UMenu_active)
				1 (S.L.Faremaster_Keypad_active)
				1 (S.L.Faremaster_MainMenu_2)
				0 (S.L.Faremaster_MainMenu_1) (S.L.Faremaster_MainMenu_3) (S.L.Faremaster_MainMenu_4) (S.L.Faremaster_MainMenu_5) (S.L.Faremaster_MainMenu_6)
				(L.$.Pfad_Urbino) "Faremaster\Login.dds" $+ (S.$.Faremaster_Maintexture)
				(M.L.Keypad_Frame)
			{endif}
			(L.L.Faremaster_Mode) 3 =
			{if}
				"" (S.$.Faremaster_Ticket)
				1 (S.L.Faremaster_SMenu_active) (S.L.Faremaster_UMenu_active)
				(M.L.Keypad_Frame)
				1 (S.L.Faremaster_Keypad_active)
				1 (S.L.Faremaster_MainMenu_1) (S.L.Faremaster_MainMenu_2) (S.L.Faremaster_MainMenu_3) (S.L.Faremaster_MainMenu_4) (S.L.Faremaster_MainMenu_5) (S.L.Faremaster_MainMenu_6)
				(L.$.Pfad_Urbino) "Faremaster\Mainmenu_" $+ (L.L.Faremaster_Mainmenu_select) 1 max $IntToStr $+ ".dds" $+ (S.$.Faremaster_Maintexture)
			{endif}
			(L.L.Faremaster_Mode) 4 =
			{if}
				"" (S.$.Faremaster_Ticket)
'				(M.L.Keypad_Frame)
				1 (S.L.Faremaster_SMenu_active) (S.L.Faremaster_UMenu_active)
				"" (S.$.Faremaster_Login) (S.$.Faremaster_Keypad_V)
				0 (S.L.Faremaster_Keypad_active)
				0 (S.L.Faremaster_MainMenu_1) (S.L.Faremaster_MainMenu_2) (S.L.Faremaster_MainMenu_3) (S.L.Faremaster_MainMenu_4) (S.L.Faremaster_MainMenu_5) (S.L.Faremaster_MainMenu_6)
				(L.$.Pfad_Urbino) "Faremaster\Stops.dds" $+ (S.$.Faremaster_Maintexture)
'				"Test@Test" (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) 
'				(L.L.Faremaster_BusStopCount)
				(L.L.schedule_active)
				{if}
					(L.L.Faremaster_BusStop) 1 =
					{if}
						" @ " (S.$.Faremaster_Stop1)
						(L.L.IBIS_RouteIndex) 1 (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ 
						1 (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
						1 (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop2)
						(L.L.IBIS_RouteIndex) 2 (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
						2 (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
						2 (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop3)
						(L.L.IBIS_RouteIndex) 3 (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
						3 (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
						3 (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop4)
						(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStopCount) 1 - (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
						(L.L.Faremaster_BusStopCount) 1 - (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
						(L.L.Faremaster_BusStopCount) 1 - (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop5)
					{else}
						(L.L.Faremaster_BusStopCount) (L.L.Faremaster_BusStop) - 2 >
						{if}
							(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
							(L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
							(L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop1)
							(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
							(L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
							(L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop2)
							(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 1 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
							(L.L.Faremaster_BusStop) 1 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
							(L.L.Faremaster_BusStop) 1 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop3)
							(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 2 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
							(L.L.Faremaster_BusStop) 2 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
							(L.L.Faremaster_BusStop) 2 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop4)
						{else}
							(L.L.Faremaster_BusStopCount) (L.L.Faremaster_BusStop) - 1 >
							{if}	
								(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
								(L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
								(L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop1)
								(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
								(L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
								(L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop2)
								(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 1 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
								(L.L.Faremaster_BusStop) 1 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
								(L.L.Faremaster_BusStop) 1 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop3)
								"" "@" $+ (S.$.Faremaster_Stop4)
							{else}
								(L.L.Faremaster_BusStopCount) (L.L.Faremaster_BusStop) - 0 >
								{if}
									(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
									(L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
									(L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop1)
									(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
									(L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
									(L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetTTBusstopDep) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop2)
									"" "@" $+ (S.$.Faremaster_Stop3)
									"" "@" $+ (S.$.Faremaster_Stop4)							
								{endif}
							{endif}						
						{endif}
						(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStopCount) 1 - (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+
						(L.L.Faremaster_BusStopCount) 1 - (M.V.GetTTBusstopArr) 3600 / s0 trunc s1 "02" $IntToStrEnh $+ ":" $+
						(L.L.Faremaster_BusStopCount) 1 - (M.V.GetTTBusstopArr) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh $+ (S.$.Faremaster_Stop5)
					{endif}					
				{else}
					(L.L.Faremaster_BusStop) 1 =
					{if}
						" @ " (S.$.Faremaster_Stop1)
						(L.L.IBIS_RouteIndex) 1 (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop2)
						(L.L.IBIS_RouteIndex) 2 (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop3)
						(L.L.IBIS_RouteIndex) 3 (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop4)
						(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStopCount) 1 - (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop5)
					{else}
						(L.L.Faremaster_BusStopCount) (L.L.Faremaster_BusStop) - 2 >
						{if}
							(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop1)
							(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop2)
							(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 1 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop3)
							(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 2 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop4)
						{else}
							(L.L.Faremaster_BusStopCount) (L.L.Faremaster_BusStop) - 1 >
							{if}	
								(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop1)
								(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop2)
								(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 1 + (L.L.Faremaster_BusStopCount) 1 - min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop3)
								"" "@" $+ (S.$.Faremaster_Stop4)
							{else}
								(L.L.Faremaster_BusStopCount) (L.L.Faremaster_BusStop) - 0 >
								{if}
									(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) 1 - 0 max (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop1)
									(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) (L.L.Faremaster_BusStopCount) min (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop2)
									"" "@" $+ (S.$.Faremaster_Stop3)
									"" "@" $+ (S.$.Faremaster_Stop4)							
								{endif}
							{endif}						
						{endif}
						(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStopCount) 1 - (M.V.GetRouteBusstopIdent) (M.V.GetBusstopIndex) 3 (M.V.GetBusstopString) "@" $+ (S.$.Faremaster_Stop5)
					{endif}					
				{endif}
			{endif}
			(L.L.Faremaster_Mode) 90 =
			{if}
				0 (S.L.Faremaster_SMenu_active) 
				1 (S.L.Faremaster_UMenu_active)
				"" (S.$.Faremaster_Login) (S.$.Faremaster_Keypad_V)
				0 (S.L.Faremaster_Keypad_active)
				0 (S.L.Faremaster_MainMenu_1) (S.L.Faremaster_MainMenu_2) (S.L.Faremaster_MainMenu_3) (S.L.Faremaster_MainMenu_4) (S.L.Faremaster_MainMenu_5) (S.L.Faremaster_MainMenu_6)
				"" (S.$.Faremaster_Stop1) (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) (S.$.Faremaster_Stop5)			
				(L.$.Pfad_Urbino) "Faremaster\Settings_" $+ (L.L.Faremaster_Light) $IntToStr $+ ".dds" $+ (S.$.Faremaster_Maintexture)
				"" (S.$.Faremaster_Ticket)
				(L.L.Faremaster_Light) s0
				l0 1 =
				{if}
					0.6 (S.L.Faremaster_Dim)
				{endif}
				l0 2 =
				{if}
					0.3 (S.L.Faremaster_Dim)					
				{endif}
				l0 3 =
				{if}
					0 (S.L.Faremaster_Dim)					
				{endif}
			{endif}
			(L.L.Faremaster_Mode) 91 =
			{if}
				1 (S.L.Faremaster_SMenu_active) 
				1 (S.L.Faremaster_UMenu_active)
				"" (S.$.Faremaster_Login) (S.$.Faremaster_Keypad_V)
				0 (S.L.Faremaster_Keypad_active)
				0 (S.L.Faremaster_MainMenu_1) (S.L.Faremaster_MainMenu_2) (S.L.Faremaster_MainMenu_3) (S.L.Faremaster_MainMenu_4) (S.L.Faremaster_MainMenu_5) (S.L.Faremaster_MainMenu_6)
				"" (S.$.Faremaster_Stop1) (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) (S.$.Faremaster_Stop5)			
				(L.$.Pfad_Urbino) "Faremaster\visctrl.dds" $+ (S.$.Faremaster_Maintexture)
				"" (S.$.Faremaster_Ticket)
			{endif}
			(L.L.Faremaster_Mode) 92 =
			{if}
				1 (S.L.Faremaster_SMenu_active) 
				1 (S.L.Faremaster_UMenu_active)
				"" (S.$.Faremaster_Login) (S.$.Faremaster_Keypad_V)
				0 (S.L.Faremaster_Keypad_active)
				0 (S.L.Faremaster_MainMenu_1) (S.L.Faremaster_MainMenu_2) (S.L.Faremaster_MainMenu_3) (S.L.Faremaster_MainMenu_4) (S.L.Faremaster_MainMenu_5) (S.L.Faremaster_MainMenu_6)
				"" (S.$.Faremaster_Stop1) (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) (S.$.Faremaster_Stop5)			
				(L.$.Pfad_Urbino) "Faremaster\message.dds" $+ (S.$.Faremaster_Maintexture)
				"" (S.$.Faremaster_Ticket)
			{endif}
			(L.L.Faremaster_Mode) 99 =
			{if}
				(L.L.Faremaster_Verkaufsseite) 0 =
				{if}
					1 (S.L.Faremaster_Verkaufsseite)
				{endif}
				(L.L.Faremaster_Verkaufsseite) $IntToStr (S.$.Faremaster_Verkaufsseite)
				(L.L.Faremaster_Verkaufsseite_max) $IntToStr (S.$.Faremaster_Verkaufsseite_max)
				1 (S.L.Faremaster_SMenu_active) 
				0 (S.L.Faremaster_UMenu_active)
				"" (S.$.Faremaster_Login) (S.$.Faremaster_Keypad_V)
				0 (S.L.Faremaster_Keypad_active)
				0 (S.L.Faremaster_MainMenu_1) (S.L.Faremaster_MainMenu_2) (S.L.Faremaster_MainMenu_3) (S.L.Faremaster_MainMenu_4) (S.L.Faremaster_MainMenu_5) (S.L.Faremaster_MainMenu_6)
				"" (S.$.Faremaster_Stop1) (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) (S.$.Faremaster_Stop5)			
'				(L.$.Pfad_Urbino) "Faremaster\VK.dds" $+ (S.$.Faremaster_Maintexture)
				"DD-Mod\Urbino_II\Faremaster\VK_" (L.$.Faremaster_Verkaufsseite) $+ (L.$.Faremaster_Verkaufsseite_max) $+ ".dds" $+ (S.$.Faremaster_Maintexture)
				
'##############################################################				
'###	Erweiterte Ticketauswahl @fOcUs04 @cooper
'##############################################################	

'### Verkaufsseite 1

				(L.L.Faremaster_Verkaufsseite) 1 =
				{if}

					0 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname0)
					{endif}
					"@" $+

					1 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname1) $+
					{endif}
					"@" $+

					2 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname2) $+
					{endif}
					"@" $+

					3 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname3) $+
					{endif}
					"@" $+
	
					4 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname4) $+
					{endif}
					"@" $+

					5 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname5) $+
					{endif}	
				{endif}

'### Verkaufsseite 2

				(L.L.Faremaster_Verkaufsseite) 2 =
				{if}

					6 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname6)
					{endif}
					"@" $+

					7 (M.V.GetTicketName) "" $>
					{if} 
						(L.$.Faremaster_Ticketname7) $+
					{endif}
					"@" $+

					8 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname8) $+
					{endif}
					"@" $+

					9 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname9) $+
					{endif}
					"@" $+

					10 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname10) $+
					{endif}
					"@" $+

					11 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname11) $+
					{endif}
				{endif}
				
'### Verkaufsseite 3

				(L.L.Faremaster_Verkaufsseite) 3 =
				{if}

					12 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname12)
					{endif}
					"@" $+

					13 (M.V.GetTicketName) "" $>
					{if} 
						(L.$.Faremaster_Ticketname13) $+
					{endif}
					"@" $+

					14 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname14) $+
					{endif}
					"@" $+

					15 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname15) $+
					{endif}
					"@" $+

					16 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname16) $+
					{endif}
					"@" $+

					17 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname17) $+
					{endif}
				{endif}
				
'### Verkaufsseite 4

				(L.L.Faremaster_Verkaufsseite) 4 =
				{if}

					18 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname18)
					{endif}
					"@" $+

					19 (M.V.GetTicketName) "" $>
					{if} 
						(L.$.Faremaster_Ticketname19) $+
					{endif}
					"@" $+

					20 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname20) $+
					{endif}
					"@" $+

					21 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname21) $+
					{endif}
					"@" $+

					22 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname22) $+
					{endif}
					"@" $+

					23 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname23) $+
					{endif}
				{endif}
				
'### Verkaufsseite 5

				(L.L.Faremaster_Verkaufsseite) 5 =
				{if}

					24 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname24)
					{endif}
					"@" $+

					25 (M.V.GetTicketName) "" $>
					{if} 
						(L.$.Faremaster_Ticketname25) $+
					{endif}
					"@" $+

					26 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname26) $+
					{endif}
					"@" $+

					27 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname27) $+
					{endif}
					"@" $+

					28 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname28) $+
					{endif}
					"@" $+

					29 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname29) $+
					{endif}
				{endif}
				
'### Verkaufsseite 6

				(L.L.Faremaster_Verkaufsseite) 6 =
				{if}

					30 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname30)
					{endif}
					"@" $+

					31 (M.V.GetTicketName) "" $>
					{if} 
						(L.$.Faremaster_Ticketname31) $+
					{endif}
					"@" $+

					32 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname32) $+
					{endif}
					"@" $+

					33 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname33) $+
					{endif}
					"@" $+

					34 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname34) $+
					{endif}
					"@" $+

					35 (M.V.GetTicketName) "" $>
					{if}
						(L.$.Faremaster_Ticketname35) $+
					{endif}
				{endif}
'#####################################################################

				" " $+ (S.$.Faremaster_Ticketstring)
				(L.L.Faremaster_Ticket) -1 =
				{if}
					"" (S.$.Faremaster_Ticketname)
					"0" (S.$.Faremaster_Preis_Euro)
					"00" (S.$.Faremaster_Preis_Cent)					
					(L.L.cashdesk_EUR)
					{if}
						"zu zahlen:    " (L.$.Faremaster_Preis_Euro) $+ "," $+ (L.$.Faremaster_Preis_Cent) $+ " DM@" $+ (S.$.Faremaster_Ticket)				
					{else}
						"zu zahlen:      " (L.$.Faremaster_Preis_Euro) $+ "," $+ (L.$.Faremaster_Preis_Cent) $+ "€@" $+ (S.$.Faremaster_Ticket)
					{endif}
				{else}
						"" (L.L.Faremaster_Ticket) (M.V.GetTicketValue) 100 * 0.005 + trunc $IntToStr $+ (S.$.Faremaster_Preis)
						
				
						
						"" (L.$.Faremaster_Preis) $length 4 =
						{if}
							"" (L.$.Faremaster_Preis) 2 $SetLengthL (S.$.Faremaster_Preis_Euro)
							"" (L.$.Faremaster_Preis) 2 $SetLengthR (S.$.Faremaster_Preis_Cent)
						{else}
							"" (L.$.Faremaster_Preis) $length 3 =
							{if}
								"" (L.$.Faremaster_Preis) 1 $SetLengthL (S.$.Faremaster_Preis_Euro)
								"" (L.$.Faremaster_Preis) 2 $SetLengthR (S.$.Faremaster_Preis_Cent)
							{else}
								"" (L.$.Faremaster_Preis) $length 2 =
								{if}								
									"0" (S.$.Faremaster_Preis_Euro)
									"" (L.$.Faremaster_Preis) 2 $SetLengthR (S.$.Faremaster_Preis_Cent)
								{else}
									"0" (S.$.Faremaster_Preis_Euro)
									"0" (L.$.Faremaster_Preis) $+ 2 $SetLengthR (S.$.Faremaster_Preis_Cent)
								{endif}
							{endif}
						{endif}
						
						(L.$.Faremaster_Preis_Euro) "0" $=
						(S.$.Faremaster_Preis_Cent) " 0" $= &&
						(L.$.Faremaster_Ticketname) "" $= &&
						{if}
							-1 (S.L.Faremaster_Ticket)
						{endif}
'### Verkaufsseite 1
					
						(L.L.Faremaster_Verkaufsseite) 1 =
						{if}
							(L.L.Faremaster_Ticket) 0 =
							{if}
								(L.$.Faremaster_Ticketname0) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 1 =
							{if}
								(L.$.Faremaster_Ticketname1) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 2 =
							{if}
								(L.$.Faremaster_Ticketname2) (S.$.Faremaster_Ticketname)
							{endif}				
							(L.L.Faremaster_Ticket) 3 =
							{if}
								(L.$.Faremaster_Ticketname3) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 4 =
							{if}
								(L.$.Faremaster_Ticketname4) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 5 =
							{if}
								(L.$.Faremaster_Ticketname5) (S.$.Faremaster_Ticketname)
							{endif}
						{endif}

'### Verkaufsseite 2
										
						(L.L.Faremaster_Verkaufsseite) 2 =
						{if}					
							(L.L.Faremaster_Ticket) 6 =
							{if}
								(L.$.Faremaster_Ticketname6) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 7 =
							{if}
								(L.$.Faremaster_Ticketname7) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 8 =
							{if}
								(L.$.Faremaster_Ticketname8) (S.$.Faremaster_Ticketname)
							{endif}				
							(L.L.Faremaster_Ticket) 9 =
							{if}
								(L.$.Faremaster_Ticketname9) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 10 =
							{if}
								(L.$.Faremaster_Ticketname10) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 11 =
							{if}
								(L.$.Faremaster_Ticketname11) (S.$.Faremaster_Ticketname)
							{endif}
						{endif}					

'### Verkaufsseite 3
										
						(L.L.Faremaster_Verkaufsseite) 3 =
						{if}					
							(L.L.Faremaster_Ticket) 12 =
							{if}
								(L.$.Faremaster_Ticketname12) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 13 =
							{if}
								(L.$.Faremaster_Ticketname13) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 14 =
							{if}
								(L.$.Faremaster_Ticketname14) (S.$.Faremaster_Ticketname)
							{endif}				
							(L.L.Faremaster_Ticket) 15 =
							{if}
								(L.$.Faremaster_Ticketname15) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 16 =
							{if}
								(L.$.Faremaster_Ticketname16) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 17 =
							{if}
								(L.$.Faremaster_Ticketname17) (S.$.Faremaster_Ticketname)
							{endif}
						{endif}

'### Verkaufsseite 4
										
						(L.L.Faremaster_Verkaufsseite) 4 =
						{if}					
							(L.L.Faremaster_Ticket) 18 =
							{if}
								(L.$.Faremaster_Ticketname18) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 19 =
							{if}
								(L.$.Faremaster_Ticketname19) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 20 =
							{if}
								(L.$.Faremaster_Ticketname20) (S.$.Faremaster_Ticketname)
							{endif}				
							(L.L.Faremaster_Ticket) 21 =
							{if}
								(L.$.Faremaster_Ticketname21) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 22 =
							{if}
								(L.$.Faremaster_Ticketname22) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 23 =
							{if}
								(L.$.Faremaster_Ticketname23) (S.$.Faremaster_Ticketname)
							{endif}
						{endif}

'### Verkaufsseite 5
										
						(L.L.Faremaster_Verkaufsseite) 5 =
						{if}					
							(L.L.Faremaster_Ticket) 24 =
							{if}
								(L.$.Faremaster_Ticketname24) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 25 =
							{if}
								(L.$.Faremaster_Ticketname25) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 26 =
							{if}
								(L.$.Faremaster_Ticketname26) (S.$.Faremaster_Ticketname)
							{endif}				
							(L.L.Faremaster_Ticket) 27 =
							{if}
								(L.$.Faremaster_Ticketname27) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 28 =
							{if}
								(L.$.Faremaster_Ticketname28) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 29 =
							{if}
								(L.$.Faremaster_Ticketname29) (S.$.Faremaster_Ticketname)
							{endif}
						{endif}					
				
'### Verkaufsseite 6
										
						(L.L.Faremaster_Verkaufsseite) 6 =
						{if}					
							(L.L.Faremaster_Ticket) 30 =
							{if}
								(L.$.Faremaster_Ticketname30) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 31 =
							{if}
								(L.$.Faremaster_Ticketname31) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 32 =
							{if}
								(L.$.Faremaster_Ticketname32) (S.$.Faremaster_Ticketname)
							{endif}				
							(L.L.Faremaster_Ticket) 33 =
							{if}
								(L.$.Faremaster_Ticketname33) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 34 =
							{if}
								(L.$.Faremaster_Ticketname34) (S.$.Faremaster_Ticketname)
							{endif}
							(L.L.Faremaster_Ticket) 35 =
							{if}
								(L.$.Faremaster_Ticketname35) (S.$.Faremaster_Ticketname)
							{endif}

						{endif}
			
						(L.L.cashdesk_EUR)
						{if}
							"zu zahlen:    " (L.$.Faremaster_Preis_Euro) $+ "," $+ (L.$.Faremaster_Preis_Cent) $+ " DM@" $+ (L.$.Faremaster_Preis_Euro) $+ "," $+ (L.$.Faremaster_Preis_Cent) $+ "DM 1x " $+ (L.L.Faremaster_Ticket) (L.$.Faremaster_Ticketname) $+ (S.$.Faremaster_Ticket)
						{else}
							"zu zahlen:      " (L.$.Faremaster_Preis_Euro) $+ "," $+ (L.$.Faremaster_Preis_Cent) $+ "€@" $+ (L.$.Faremaster_Preis_Euro) $+ "," $+ (L.$.Faremaster_Preis_Cent) $+ "€ 1x " $+ (L.L.Faremaster_Ticket) (L.$.Faremaster_Ticketname) $+ (S.$.Faremaster_Ticket)					
						{endif}
					
				{endif}
			{else}
				"" (S.$.Faremaster_Ticketstring)
			{endif}

'##############################################################				
'###	Erweiterte Ticketauswahl @fOcUs04 @cooper Ende
'##############################################################	

						
		
			(L.L.Faremaster_Mode) 900 =
			{if}
				(L.$.Pfad_Urbino) "Faremaster\Error.dds" $+ (S.$.Faremaster_Maintexture)
				(L.L.Faremaster_Error_Timer) (L.S.Timegap) + (S.L.Faremaster_Error_Timer) 2 >
				{if}
					1 (L.$.Faremaster_Keypad_V) $SetLengthR "|" $=
					{if}
						1 (L.$.Faremaster_Keypad_V) $cutEnd (S.$.Faremaster_Keypad)	
					{else}
						(L.$.Faremaster_Keypad_V) (S.$.Faremaster_Keypad)			
					{endif}
					3 (S.L.Faremaster_Mode)
				{endif}
			{else}
				0 (S.L.Faremaster_Error_Timer)
			{endif}
		{endif}
	{else}
		0 (S.L.Faremaster_Boot_Timer) (S.L.Faremaster_Mode) 
		1 (S.L.Faremaster_Mainmenu_select)
		(L.$.Pfad_Urbino) "Faremaster\SU_II_Dummy.dds" $+ (S.$.Faremaster_Maintexture)
		"" (S.$.Faremaster_Header) (S.$.Faremaster_Keypad) (S.$.Faremaster_Keypad_V) (S.$.Faremaster_terminus_name)
		0 (S.L.Faremaster_BusStop)
		"" (S.$.Faremaster_Stop1) (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) (S.$.Faremaster_Stop5)
		"" (S.$.Faremaster_Ticket)
	{endif}

{end}


{macro:Faremaster_Boot}

	(L.L.Faremaster_Boot_Timer) (L.S.Timegap) + (S.L.Faremaster_Boot_Timer) s0
	l0 2 (C.L.Faremaster_Boot_Time) * <
	{if}
		(L.$.Pfad_Urbino) "Faremaster\SU_II_Dummy.dds" $+ (S.$.Faremaster_Maintexture)
	{endif}
	l0 2 (C.L.Faremaster_Boot_Time) * >
	l0 8 (C.L.Faremaster_Boot_Time) * < &&
	{if}
		(L.$.Pfad_Urbino) "Faremaster\SB.dds" $+ (S.$.Faremaster_Maintexture)
	{endif}
	l0 8 (C.L.Faremaster_Boot_Time) * >
	l0 13 (C.L.Faremaster_Boot_Time) * < &&
	{if}
		(L.$.Pfad_Urbino) "Faremaster\WCE.dds" $+ (S.$.Faremaster_Maintexture)
	{endif}
	l0 13 (C.L.Faremaster_Boot_Time) * >
	l0 15 (C.L.Faremaster_Boot_Time) * < &&
	{if}
		(L.$.Pfad_Urbino) "Faremaster\Boot1.dds" $+ (S.$.Faremaster_Maintexture)
	{endif}
	l0 15 (C.L.Faremaster_Boot_Time) * >
	l0 16 (C.L.Faremaster_Boot_Time) * < &&
	{if}
		(L.$.Pfad_Urbino) "Faremaster\Boot2.dds" $+ (S.$.Faremaster_Maintexture)
	{endif}
	l0 16 (C.L.Faremaster_Boot_Time) * >
	l0 18 (C.L.Faremaster_Boot_Time) * < &&
	{if}
		(L.$.Pfad_Urbino) "Faremaster\Boot3.dds" $+ (S.$.Faremaster_Maintexture)
	{endif}
	l0 18 (C.L.Faremaster_Boot_Time) * >
	l0 22 (C.L.Faremaster_Boot_Time) * < &&
	{if}
		(L.$.Pfad_Urbino) "Faremaster\Boot4.dds" $+ (S.$.Faremaster_Maintexture)
	{endif}
	l0 22 (C.L.Faremaster_Boot_Time) * >
	l0 25 (C.L.Faremaster_Boot_Time) * < &&
	{if}
		(L.$.Pfad_Urbino) "Faremaster\Boot5.dds" $+ (S.$.Faremaster_Maintexture)
	{endif}
	l0 25 (C.L.Faremaster_Boot_Time) * >
	{if}
		1 (S.L.Faremaster_Mode)
	{endif}
{end}

{macro:Faremaster_Keypad}

	s0
	
	l0 90 =
	{if}
		1 (L.$.Faremaster_Keypad) $cutEnd (S.$.Faremaster_Keypad)
	{endif}
	l0 80 =
	{if}
		(L.L.Faremaster_Mainmenu_select) 1 >= (L.L.Faremaster_Mainmenu_select) 3 <= &&
		{if}		
			(L.L.Faremaster_Mode) 3 =
			(L.$.Faremaster_Keypad) $length 4 >= &&
			{if}
				(L.$.Faremaster_Keypad) $StrToFloat s0 (S.L.IBIS_Linie_Complex)
				l0 100 / trunc	s1 (S.L.IBIS_LinieKurs)
				l0 100 % 0 max s2 (S.L.IBIS_Route)
				l1 100 * l2 + (M.V.GetRouteIndex) (S.L.Faremaster_RouteIndex) 0 <
				{if}
					900 (S.L.Faremaster_Mode)
					0 (S.L.Faremaster_ShowInfo)
				{else}
					1 (S.L.Faremaster_RouteDir) (S.L.Faremaster_DestMode)
					(M.L.Faremaster_SetRoute)
					4 (S.L.Faremaster_Mode)
				{endif}
				1 (S.L.Refresh_Strings)	
			{endif}
		{endif}
		(L.L.Faremaster_Mainmenu_select) 4 >= (L.L.Faremaster_Mainmenu_select) 6 <= &&
		{if}
		
'### Suffix Testbereich 1

			(L.L.Faremaster_Mainmenu_select) 6 =
			{if}
				(L.$.Faremaster_Keypad) $StrToFloat (S.L.IBIS_Linie_Suffix)
				(T.L.ev_IBIS_piep)
				(L.$.Faremaster_Keypad_suffix) (S.$.Faremaster_Keypad)				
				1 (S.L.Faremaster_Mainmenu_select)
				1 (S.L.Refresh_Strings)
				l0 (S.L.IBIS_TerminusIndex)
				2 (S.L.Faremaster_DestMode)
				(M.L.Faremaster_SetRoute)
			{else}

				
'### Suffix Testbereich 1 Ende

				(L.$.Faremaster_Keypad) $StrToFloat (S.L.IBIS_TerminusCode) (M.V.GetTerminusIndex) s0 0 <
				{if}
					900 (S.L.Faremaster_Mode)
					0 (S.L.Faremaster_ShowInfo)
				{else}
					l0 (S.L.IBIS_TerminusIndex)
					2 (S.L.Faremaster_DestMode)
					(M.L.Faremaster_SetRoute)
				{endif}
			{endif}
		{endif}
		(L.L.Faremaster_Mode) 2 =
		(L.$.Faremaster_Keypad) $StrToFloat 10 >= &&
		{if}
			(L.$.Faremaster_Keypad) (S.$.Faremaster_Login)
			"" (S.$.Faremaster_Keypad) (S.$.Faremaster_Keypad_V)
			3 (S.L.Faremaster_Mode)
		{endif}
	{endif}
	(L.L.Faremaster_Mainmenu_select) 1 >= (L.L.Faremaster_Mainmenu_select) 3 <= &&
	(L.L.Faremaster_Mode) 2 = ||
	{if}
		l0 10 <
		(L.$.Faremaster_Keypad) $length 4 <= &&
		{if}
			(L.$.Faremaster_Keypad) l0 $IntToStr $+ (S.$.Faremaster_Keypad)
		{endif}
	{endif}

	(L.L.Faremaster_Mainmenu_select) 4 >= (L.L.Faremaster_Mainmenu_select) 6 <= &&
	{if}
		l0 10 <
		(L.$.Faremaster_Keypad) $length 2 <= &&
		{if}
			(L.$.Faremaster_Keypad) l0 $IntToStr $+ (S.$.Faremaster_Keypad)
		{endif}
	{endif}
{end}

{macro:Faremaster_Mainmenu}

	s0 (S.L.Faremaster_Mainmenu_select)
	
	(L.L.Faremaster_Mode) 2 =
	{if}
		l0 2 =
		{if}
			1 (S.L.Faremaster_Mode)
			"" (S.$.Faremaster_Keypad) (S.$.Faremaster_Keypad_V)
		{endif}
	{endif}
{end}

{macro:Faremaster_UMenu}

	s0 (S.L.Faremaster_Umenu_select)
	
	l0 1 =
	{if}
		3 (S.L.Faremaster_Mode)
		"" (S.$.Faremaster_Keypad_V) (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop1) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) (S.$.Faremaster_Stop5)
	{endif}
	l0 2 =
	{if}
		90 (S.L.Faremaster_Mode)
		"" (S.$.Faremaster_Keypad_V) (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop1) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) (S.$.Faremaster_Stop5)
	{endif}
	l0 4 =
	{if}
		92 (S.L.Faremaster_Mode)
		"" (S.$.Faremaster_Keypad_V) (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop1) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) (S.$.Faremaster_Stop5)
	{endif}
	l0 5 =
	{if}
		91 (S.L.Faremaster_Mode)
		"" (S.$.Faremaster_Keypad_V) (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop1) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) (S.$.Faremaster_Stop5)
	{endif}
	l0 6 =
	{if}
		4 (S.L.Faremaster_Mode)
	{endif}
{end}

{macro:Faremaster_SMenu}

	s0 (S.L.Faremaster_Smenu_select)

	(L.L.Faremaster_Mode) 99 =
	(L.L.Faremaster_Smenu_select) 1 = &&
	{if}
		4 (S.L.Faremaster_Mode)
	{else}
		(L.L.Faremaster_Smenu_select) 1 =
		{if}
			99 (S.L.Faremaster_Mode)
			"" (S.$.Faremaster_Keypad_V) (S.$.Faremaster_Stop2) (S.$.Faremaster_Stop1) (S.$.Faremaster_Stop3) (S.$.Faremaster_Stop4) (S.$.Faremaster_Stop5)
		{endif}
	{endif}
	(L.L.Faremaster_Smenu_select) 9 =
	(L.L.Faremaster_Smenu_select) 10 = ||
	(L.L.Faremaster_Mode) 99 = &&
	(L.L.Faremaster_Ticket) 0 >= &&
	{if}
		1 (S.L.faremaster_druckt)
		(T.L.ev_printer_printing)
	{endif}
{end}

{macro:Keypad_Frame}

	(L.L.Keypad_Timegap) (L.S.Timegap) + (S.L.Keypad_Timegap) s0
	(L.L.Faremaster_Mode) 2 =
	{if}
		l0 0.75 <
		{if}
			(L.$.Faremaster_Keypad) "|" $+ (S.$.Faremaster_Keypad_V)
		{endif}
		l0 0.75 >
		l0 1.5 < &&
		{if}
			(L.$.Faremaster_Keypad) (S.$.Faremaster_Keypad_V)
		{endif}
		l0 1.5 >
		{if}
			0 (S.L.Keypad_Timegap)
		{endif}
	{endif}
	(L.L.Faremaster_Mode) 3 =
	{if}
		(L.L.Faremaster_Mainmenu_select) 1 >= (L.L.Faremaster_Mainmenu_select) 3 <= &&
		{if}
			l0 0.75 <
			{if}
				(L.$.Faremaster_Keypad) $length 3 >
				(L.$.Faremaster_Keypad) $length 5 < &&
				{if}
					(L.$.Faremaster_Keypad) 3 $SetLengthL $RemoveSpaces (S.$.Faremaster_Buffer1)
					(L.$.Faremaster_Keypad) 1 $SetLengthR $RemoveSpaces (S.$.Faremaster_Buffer2)
					(L.$.Faremaster_Buffer1) "    " $+ (L.$.Faremaster_Buffer2) $+ "|" $+ (S.$.Faremaster_Keypad_V)
				{endif}
				(L.$.Faremaster_Keypad) $length 5 =
				{if}
					(L.$.Faremaster_Keypad) 3 $SetLengthL $RemoveSpaces (S.$.Faremaster_Buffer1)
					(L.$.Faremaster_Keypad) 2 $SetLengthR $RemoveSpaces (S.$.Faremaster_Buffer2)
					(L.$.Faremaster_Buffer1) "    " $+ (L.$.Faremaster_Buffer2) $+ "|" $+ (S.$.Faremaster_Keypad_V)
				{endif}
				(L.$.Faremaster_Keypad) $length 3 <
				{if}
					(L.$.Faremaster_Keypad) "|" $+ (S.$.Faremaster_Keypad_V)
				{endif}		
				(L.$.Faremaster_Keypad) $length 3 =
				{if}
					(L.$.Faremaster_Keypad) "    " $+ "|" $+ (S.$.Faremaster_Keypad_V)
				{endif}	
			{endif}
			l0 0.75 >
			l0 1.5 < &&
			{if}
				(L.$.Faremaster_Keypad) $length 3 >
				(L.$.Faremaster_Keypad) $length 5 < &&
				{if}
					(L.$.Faremaster_Keypad) 3 $SetLengthL $RemoveSpaces (S.$.Faremaster_Buffer1)
					(L.$.Faremaster_Keypad) 1 $SetLengthR $RemoveSpaces (S.$.Faremaster_Buffer2)
					(L.$.Faremaster_Buffer1) "    " $+ (L.$.Faremaster_Buffer2) $+ (S.$.Faremaster_Keypad_V)
				{endif}
				(L.$.Faremaster_Keypad) $length 5 =
				{if}
					(L.$.Faremaster_Keypad) 3 $SetLengthL $RemoveSpaces (S.$.Faremaster_Buffer1)
					(L.$.Faremaster_Keypad) 2 $SetLengthR $RemoveSpaces (S.$.Faremaster_Buffer2)
					(L.$.Faremaster_Buffer1) "    " $+ (L.$.Faremaster_Buffer2) $+ (S.$.Faremaster_Keypad_V)
				{endif}
				(L.$.Faremaster_Keypad) $length 3 <=
				{if}
					(L.$.Faremaster_Keypad) (S.$.Faremaster_Keypad_V)
				{endif}
			{endif}
			l0 1.5 >
			{if}
				0 (S.L.Keypad_Timegap)
			{endif}
		{endif}	
		(L.L.Faremaster_Mainmenu_select) 4 >= (L.L.Faremaster_Mainmenu_select) 6 <= &&
		{if}
			l0 0.75 <
			{if}
				(L.$.Faremaster_Keypad) "|" $+ (S.$.Faremaster_Keypad_V)

			{endif}
			l0 0.75 >
			l0 1.5 < &&
			{if}
				(L.$.Faremaster_Keypad) (S.$.Faremaster_Keypad_V)
			{endif}
			l0 1.5 >
			{if}
				0 (S.L.Keypad_Timegap)
			{endif}		
		{endif}
	{endif}
{end}

{macro:Faremaster_SetRoute}
	(L.L.Faremaster_DestMode) 1 =
	{if}
		(L.L.Faremaster_RouteDir) 1 =
		{if}
			(L.L.Faremaster_RouteIndex) (S.L.IBIS_RouteIndex) (M.V.GetRouteTerminusIndex) (S.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) (S.L.IBIS_TerminusCode) (L.L.IBIS_TerminusIndex) 5 (M.V.GetTerminusString) (S.$.IBIS_terminus_name)
			(L.L.Faremaster_RouteIndex) (S.L.IBIS_RouteIndex) (M.V.GetBusstopCount) (S.L.Faremaster_BusStopCount)
			0  (S.L.Faremaster_BusStop)
		{else}
			(L.L.Faremaster_RouteIndex) (S.L.IBIS_RouteIndex) (M.V.GetRouteTerminusIndex) (S.L.IBIS_TerminusIndex) (M.V.GetTerminusCode) (S.L.IBIS_TerminusCode) (L.L.IBIS_TerminusIndex) 5 (M.V.GetTerminusString) (S.$.IBIS_terminus_name)
			(L.L.Faremaster_RouteIndex) (S.L.IBIS_RouteIndex) (M.V.GetBusstopCount) (S.L.Faremaster_BusStopCount) 1 - (S.L.Faremaster_BusStop)
		{endif}
		(L.L.IBIS_LinieKurs) s4 100 / trunc s5
		l5 5 =
		{if}
'			l4 100 * 5 (M.V.GetDepotStringGlobal) $StrToFloat 0 max (S.L.IBIS_Linie_Suffix) + (S.L.IBIS_Linie_Complex)
			l4 100 * 5 (M.V.GetDepotStringGlobal) $StrToFloat 0 max + (S.L.IBIS_Linie_Complex)
		{endif}
		l5 8 =
		{if}
'			l4 100 * 4 (M.V.GetDepotStringGlobal) $StrToFloat 0 max (S.L.IBIS_Linie_Suffix) + (S.L.IBIS_Linie_Complex)
			l4 100 * 4 (M.V.GetDepotStringGlobal) $StrToFloat 0 max + (S.L.IBIS_Linie_Complex)
		{endif}
		l5 9 =
		{if}
'			l4 100 * 3 (M.V.GetDepotStringGlobal) $StrToFloat 0 max (S.L.IBIS_Linie_Suffix) + (S.L.IBIS_Linie_Complex)
			l4 100 * 3 (M.V.GetDepotStringGlobal) $StrToFloat 0 max + (S.L.IBIS_Linie_Complex)
		{endif}
	{endif}

	1 (S.L.Faremaster_ShowInfo)
	(L.L.IBIS_TerminusIndex) 5 (M.V.GetTerminusString) (S.$.Faremaster_terminus_name)
	(L.L.CTI_entwerter)
	{if}
		(T.L.ev_IBIS_entwerter_ELGEBA)
	{else}
		(T.L.ev_IBIS_entwerter)
	{endif}
	1 (S.L.Faremaster_Route_active)
{end}

{macro:Faremaster_Header}


'### focus mod

(L.L.Velocity) 1 <
{if}
	(L.$.Faremaster_terminus_name) "" $=
	(L.$.Faremaster_Stop5) "" $> &&
	{if}
		(L.$.Faremaster_Stop5) 1 $cutEnd (M.L.Faremaster_CapitalizeString) (S.$.Faremaster_terminus_name) (S.$.IAZ_Terminus_Buffer)
		1 (S.L.Refresh_Strings)
		
	{endif}
{endif}

	
	(L.S.Time) 3600 / s0 trunc s1 "02" $IntToStrEnh (S.$.Faremaster_Stunde) 
	(L.S.Time) 3600 / s0 trunc s1 l0 l1 - 60 * "02" $IntToStrEnh (S.$.Faremaster_Minute)
	(L.$.Faremaster_Stunde) $StrToFloat 60 * 60 * s2
	(L.$.Faremaster_Minute) $StrToFloat 60 * s3
	""
	(L.S.Time) l2 l3 + - 10 <
	{if}
		0 $IntToStr (L.S.Time) l2 l3 + - $IntToStr $+ (S.$.Faremaster_Sekunde)
	{else}
		(L.S.Time) l2 l3 + - $IntToStr $+ (S.$.Faremaster_Sekunde)
	{endif}

				
	(M.V.GetTTDelay) s1 60 / s0
	l0 abs trunc " 2" $IntToStrEnh (S.$.Faremaster_Delay_min)
	l0 abs l0 abs trunc - 6 * $IntToStr $StrToFloat 10 * "02" $IntToStrEnh (S.$.Faremaster_Delay_sec)
	l1 abs 6 >=
	{if}
		l0 0 >
		{if}
			"+" (S.$.Faremaster_Delay_state)
		{else}
			"-" (S.$.Faremaster_Delay_state)
		{endif}
	{else}
		" " (S.$.Faremaster_Delay_state)
	{endif}

	(L.L.schedule_active)
	{if}
	(L.L.Faremaster_ShowInfo) !
		{if}
			" " "--- --" $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ (L.$.Faremaster_Delay_state) $+ (L.$.Faremaster_Delay_min) $+ ":" $+ (L.$.Faremaster_Delay_sec) $+ (S.$.Faremaster_Header)
		{else}
'			" " (L.L.IBIS_LinieKurs) "03" $IntToStrEnh $+ " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ (L.$.Faremaster_Delay_state) $+ (L.$.Faremaster_Delay_min) $+ ":" $+ (L.$.Faremaster_Delay_sec) $+ (S.$.Faremaster_Header)

'### Liniensuffix gleich im Header anzeigen lassen

		(L.$.Matrix_Linie) $length 1 =
		{if}	
			"   " (L.$.Matrix_Linie) $+ " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ (L.$.Faremaster_Delay_state) $+ (L.$.Faremaster_Delay_min) $+ ":" $+ (L.$.Faremaster_Delay_sec) $+ (S.$.Faremaster_Header)
		{else}
			(L.$.Matrix_Linie) $length 2 =
			{if}	
				"  " (L.$.Matrix_Linie) $+ " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ (L.$.Faremaster_Delay_state) $+ (L.$.Faremaster_Delay_min) $+ ":" $+ (L.$.Faremaster_Delay_sec) $+ (S.$.Faremaster_Header)
			{else}
				(L.$.Matrix_Linie) $length 3 =
				{if}	
					" " (L.$.Matrix_Linie) $+  " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ (L.$.Faremaster_Delay_state) $+ (L.$.Faremaster_Delay_min) $+ ":" $+ (L.$.Faremaster_Delay_sec) $+ (S.$.Faremaster_Header)
				{else}
					(L.$.Matrix_Linie) $length 4 =
					{if}	
					"" (L.$.Matrix_Linie) $+ " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ (L.$.Faremaster_Delay_state) $+ (L.$.Faremaster_Delay_min) $+ ":" $+ (L.$.Faremaster_Delay_sec) $+ (S.$.Faremaster_Header)
					{else}
						(L.$.Matrix_Linie) $length 5 =
						{if}	
							"" (L.$.Matrix_Linie) $+ "" $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ (L.$.Faremaster_Delay_state) $+ (L.$.Faremaster_Delay_min) $+ ":" $+ (L.$.Faremaster_Delay_sec) $+ (S.$.Faremaster_Header)
						{else}
							(L.$.Matrix_Linie) $length 5 >
							{if}
								" " (L.L.IBIS_LinieKurs) "03" $IntToStrEnh $+ " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ (L.$.Faremaster_Delay_state) $+ (L.$.Faremaster_Delay_min) $+ ":" $+ (L.$.Faremaster_Delay_sec) $+ (S.$.Faremaster_Header)
							{endif}
						{endif}
					{endif}
				{endif}
			{endif}
		{endif}
	{endif}
	{else}
	(L.L.Faremaster_ShowInfo) !
		{if}
			" " "--- --" $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ " --:--" (S.$.Faremaster_Header)
		{else}
'			" " (L.L.IBIS_LinieKurs) "03" $IntToStrEnh $+ " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ " --:--" $+ (S.$.Faremaster_Header)

'### Liniensuffix gleich im Header anzeigen lassen

		(L.$.Matrix_Linie) $length 1 =
		{if}	
			"   " (L.$.Matrix_Linie) $+ " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ (L.$.Faremaster_Delay_state) $+ (L.$.Faremaster_Delay_min) $+ ":" $+ (L.$.Faremaster_Delay_sec) $+ (S.$.Faremaster_Header)
		{else}
			(L.$.Matrix_Linie) $length 2 =
			{if}	
				"  " (L.$.Matrix_Linie) $+  " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ " --:--" $+ (S.$.Faremaster_Header)
			{else}
				(L.$.Matrix_Linie) $length 3 =
				{if}	
					" " (L.$.Matrix_Linie) $+  " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ " --:--" $+ (S.$.Faremaster_Header)
				{else}
					(L.$.Matrix_Linie) $length 4 =
					{if}	
						"" (L.$.Matrix_Linie) $+ " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ " --:--" $+ (S.$.Faremaster_Header)
					{else}
						(L.$.Matrix_Linie) $length 5 =
						{if}	
							"" (L.$.Matrix_Linie) $+ "" $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ " --:--" $+ (S.$.Faremaster_Header)
						{else}
							(L.$.Matrix_Linie) $length 5 >
							{if}	
								" " (L.L.IBIS_LinieKurs) "03" $IntToStrEnh $+ " " $+ (L.L.IBIS_Route) "02" $IntToStrEnh $+ "    " $+ (L.$.Faremaster_Stunde) $+ ":" $+ (L.$.Faremaster_Minute) $+ ":" $+ (L.$.Faremaster_Sekunde) $+ "    " $+ " --:--" $+ (S.$.Faremaster_Header)
							{endif}
						{endif}
					{endif}
				{endif}
			{endif}
		{endif}
	{endif}
	{endif}
{end}

{macro:Faremaster_PlayAnnouncement}

	(L.L.IBIS_RouteIndex) (L.L.Faremaster_BusStop) (M.V.GetRouteBusstopIdent) (S.$.Fare_busstop)
	(L.L.Faremaster_BusStop) 0 >
	{if}

		"..\..\Announcements\" 0 (M.V.GetDepotStringGlobal) "\" $+ $+ (L.$.Fare_busstop) $+ $msg

		(L.L.IBIS_RouteIndex) (M.V.GetBusstopCount) 1 - (L.L.Faremaster_BusStop) <=
		{if}
			"_#terminus" $+
		{endif}

		".wav" $+
		(T.F.ev_IBIS_Ansagen)
	{endif}
{end}


{macro:Ticket_CapitalizeString}
"" (S.$.Ticket_CapStr) $+
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)
(M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep) (M.L.Ticket_CapitalizeStringStep)

(L.$.Ticket_CapStr)
{end}

{macro:Ticket_CapitalizeStringStep}

$d $length 1 >
{if}
$d 1 $SetLengthR $d 1 $SetLengthL
$d " " $= $d "<" $= || $d "(" $= || $d "+" $= || "/" $= || !
1 $SetLengthR &&
{if}
(M.L.Ticket_CharToLowerCase)
{endif}
(L.$.Ticket_CapStr) $+ (S.$.Ticket_CapStr) 0 $* $+
1 $cutEnd
{endif}
$d $length 1 =
{if}
(L.$.Ticket_CapStr) $+ (S.$.Ticket_CapStr) ""
1 $cutEnd
{endif}
{end}



{macro:Ticket_CharToLowerCase}
0
d ! $d "-" $=
{if}
	0 $* $+ ""
{endif}

d ! $d "@" $= 
{if}
	0 $* $+ " "
{endif}

{end}

'### Terminus-Namen von @ befreien

{macro:Faremaster_CapitalizeString}
(L.L.Velocity) 1 <
{if}
	"" (S.$.Faremaster_CapStr) $+
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)
	(M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep) (M.L.Faremaster_CapitalizeStringStep)

	(L.$.Faremaster_CapStr)
{endif}
{end}

{macro:Faremaster_CapitalizeStringStep}

$d $length 1 >
{if}
$d 1 $SetLengthR $d 1 $SetLengthL
$d " " $= $d "<" $= || $d "(" $= || $d "+" $= || "/" $= || !
1 $SetLengthR &&
{if}
(M.L.Faremaster_CharToLowerCase)
{endif}
(L.$.Faremaster_CapStr) $+ (S.$.Faremaster_CapStr) 0 $* $+
1 $cutEnd
{endif}
$d $length 1 =
{if}
(L.$.Faremaster_CapStr) $+ (S.$.Faremaster_CapStr) ""
1 $cutEnd
{endif}
{end}



{macro:Faremaster_CharToLowerCase}
0
d ! $d "-" $=
{if}
	0 $* $+ ""
{endif}

d ! $d "@" $= 
{if}
	0 $* $+ "                  "
{endif}

{end}
