///////////////////////////////////////////////////////////////////////////////
//
// Signal Type Logic Scripts
// for Microsoft Train Simulator
//
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2003-2020 
// Timas S. Adamaitis
// Stanislav A. Subbotin
// Andrej D. Shtilmark
// All rights reserved
//
// Mailto: remzona.team@hotmail.com
//
///////////////////////////////////////////////////////////////////////////////
//
// 3-light signals
//
// Stop - Cab White
// Stop_And_Proceed - Red 0
// Restricting - White (Shunter or Welcome) 20 or 25
// Approach_1 - Yellow 60
// Approach_2 - Two Yellow, Two Yellow with Flashing 40
// Approach_3 - Two Yellow with Green Bar 60
// Clear_1 - Other signals with Green Bar 80
// Clear_2 - Green, Green Flashing, Yellow Flashing
//
///////////////////////////////////////////////////////////////////////////////
//
// 4-light signals
//
// Stop - Cab White
// Stop_And_Proceed - Red 0
// Restricting - White (Shunter or Welcome) 25
// Approach_1 - Yellow 40
// Approach_2 - Two Yellow, Two Yellow with Flashing 40
// Approach_3 - Two Yellow with Green Bar 60
// Clear_1 - Other signals with Green Bar 80
// Clear_2 - Green, Green Flashing, Yellow Flashing, YellowGreen
//
///////////////////////////////////////////////////////////////////////////////

SCRIPT T_Stop_W

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_RESTRICTING;
	draw_state = def_draw_state (state);

SCRIPT T_Stop_R

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	draw_state = def_draw_state (state);

SCRIPT T_Signal_V

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_CLEAR_2;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_CLEAR_2;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Always_R

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP;
	if (enabled)
	{
		state = SIGASP_STOP_AND_PROCEED;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Always_G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_CLEAR_2;
	draw_state = def_draw_state (state);

SCRIPT T_Head_G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	next_state = next_sig_lr (SIGFN_NORMAL);
	if (next_state ># SIGASP_RESTRICTING)
	{
		state = SIGASP_CLEAR_2;
	}
	draw_state = def_draw_state (state);
	
SCRIPT T_Head_Gm

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	next_state = next_sig_lr (SIGFN_NORMAL);
	if (next_state ># SIGASP_RESTRICTING)
	{
		state = SIGASP_CLEAR_2;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	next_state = next_sig_lr (SIGFN_NORMAL);
	if (next_state ># SIGASP_RESTRICTING)
	{
		state = SIGASP_CLEAR_2;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_GR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_STOP)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_GR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_WGR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_WGR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_GR_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_GR_GW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_Gxx_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_GxG_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_GY

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	next_state = next_sig_lr (SIGFN_NORMAL);
	if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
	{
		state = SIGASP_APPROACH_1;
	}
	else
	{
		state = SIGASP_CLEAR_2;
	}
	draw_state = def_draw_state (state);
	if (state >=# SIGASP_APPROACH_1)
	{
		if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 3;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 4;
		}
	}

SCRIPT T_Head_YRY

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_APPROACH_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_YRY

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_APPROACH_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_xR_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
		{
			state = SIGASP_RESTRICTING;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_YR_Gx_N

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		draw_state = def_draw_state (state);
		if (enabled)
		{
			state = SIGASP_RESTRICTING;
			draw_state = def_draw_state (state);
			if (sig_feature (SIGFEAT_USER1))
			{
				draw_state = 3;
			}
			else if (sig_feature (SIGFEAT_USER2))
			{
				draw_state = 4;
			}
			else if (sig_feature (SIGFEAT_USER3))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_WB

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_STOP_AND_PROCEED;
	}
	draw_state = def_draw_state (state);
	
SCRIPT T_Head_Wx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_STOP_AND_PROCEED;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_WB

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_STOP_AND_PROCEED;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_WRW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);
	if ((state ==# SIGASP_RESTRICTING) && (block_state() ==# BLOCK_CLEAR))
	{
		draw_state = 2;
	}

SCRIPT T_Small_WRW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);
	if ((state ==# SIGASP_RESTRICTING) && (block_state() ==# BLOCK_CLEAR))
	{
		draw_state = 2;
	}

SCRIPT T_Head_WBW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if ( block_state() !=# BLOCK_JN_OBSTRUCTED)
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((block_state() ==# BLOCK_OCCUPIED) || (next_state ==# SIGASP_STOP) || (next_state ==# SIGASP_RESTRICTING) || (next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED))
		{
			state = SIGASP_RESTRICTING;
		}
	}
	draw_state = def_draw_state (state);
	if ((state ==# SIGASP_RESTRICTING) && (block_state() ==# BLOCK_CLEAR))
	{
		draw_state = 2;
	}

SCRIPT T_Small_WBW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if ( block_state() !=# BLOCK_JN_OBSTRUCTED)
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((block_state() ==# BLOCK_OCCUPIED) || (next_state ==# SIGASP_STOP) || (next_state ==# SIGASP_RESTRICTING) || (next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED))
		{
			state = SIGASP_RESTRICTING;
		}
	}
	draw_state = def_draw_state (state);
	if ((state ==# SIGASP_RESTRICTING) && (block_state() ==# BLOCK_CLEAR))
	{
		draw_state = 2;
	}

SCRIPT T_Head_WRW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);
	if ((state ==# SIGASP_RESTRICTING) && (block_state() ==# BLOCK_CLEAR))
	{
		draw_state = 2;
	}

SCRIPT T_Small_WRW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);
	if ((state ==# SIGASP_RESTRICTING) && (block_state() ==# BLOCK_CLEAR))
	{
		draw_state = 2;
	}

SCRIPT T_Head_WBW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if ( block_state() !=# BLOCK_JN_OBSTRUCTED)
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((block_state() ==# BLOCK_OCCUPIED) || (next_state ==# SIGASP_STOP) || (next_state ==# SIGASP_RESTRICTING) || (next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED))
		{
			state = SIGASP_RESTRICTING;
		}
	}
	draw_state = def_draw_state (state);
	if ((state ==# SIGASP_RESTRICTING) && (block_state() ==# BLOCK_CLEAR))
	{
		draw_state = 2;
	}

SCRIPT T_Small_WBW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if ( block_state() !=# BLOCK_JN_OBSTRUCTED)
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((block_state() ==# BLOCK_OCCUPIED) || (next_state ==# SIGASP_STOP) || (next_state ==# SIGASP_RESTRICTING) || (next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED))
		{
			state = SIGASP_RESTRICTING;
		}
	}
	draw_state = def_draw_state (state);
	if ((state ==# SIGASP_RESTRICTING) && (block_state() ==# BLOCK_CLEAR))
	{
		draw_state = 2;
	}

SCRIPT T_Head_YGR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (sig_feature (SIGFEAT_GRADIENT_PLATE))
		{
			state = SIGASP_RESTRICTING;
		}
		if ((enabled || !sig_feature (SIGFEAT_USER1)) && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (sig_feature (SIGFEAT_GRADIENT_PLATE))
		{
			state = SIGASP_RESTRICTING;
		}
		if ((enabled || !sig_feature (SIGFEAT_USER1)) && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else if ((next_state ==# SIGASP_APPROACH_1) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_ALSO_pred

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (sig_feature (SIGFEAT_GRADIENT_PLATE))
		{
			state = SIGASP_RESTRICTING;
		}
		if ((enabled || !sig_feature (SIGFEAT_USER1)) && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else if ((next_state ==# SIGASP_APPROACH_2) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGR_Back

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else if (next_state ==# SIGASP_STOP )
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_YG_R

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YG_RW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGR_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YG_Rx_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_YG_Rx_I-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGR_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGR_xxW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGx_RxW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGx_RxW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Yx_RW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YxR_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YxR_xxW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Yxx_RxW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YxR_YW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Yx_RY_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_xGR_GW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_xGR_xG_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_YxR_Yx_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGR_Yx_G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGR_Yx_GG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YG_RY_G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YG_RY_GG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Yx_RY_x_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Yx_RY_xx_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_xGR_xG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_YxR_Yx_x_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YxR_Yx_xx_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YxR_YxW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGR_Yxx_G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGR_Yxx_GG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YxY_RY

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
				draw_state = def_draw_state (state);
			}
			else
			{
				state = SIGASP_APPROACH_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 5;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 3;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 2;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_YB_RW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_YxB_RW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
	SCRIPT T_Head_YxB_RW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Small_BR_YW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Small_YxR_WB

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
	SCRIPT T_Small_YxR_WB-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_YxY_RxW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YxY_Rx_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YGx_R

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_YGR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);
	if (state ==# SIGASP_CLEAR_2)
	{
		if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 4;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 5;
		}
	}

SCRIPT T_Small_GR_YW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_YGW_Rx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_YxW_Rx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Small_xWx_YRx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_YGx_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_YxY_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Small_YRY_Wx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_GYx_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (sig_feature (SIGFEAT_GRADIENT_PLATE))
		{
			state = SIGASP_RESTRICTING;
		}
		if ((enabled || !sig_feature (SIGFEAT_USER1)) && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YR_G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YR_GW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRG_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRG_W

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRG_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRG_xxW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YR_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRx_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRx_xxW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRx_YW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YR_xY_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_xRG_WG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_xRG_xG_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_YRx_xYW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRx_xY_x_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRx_xY_xx_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRG_xYx_G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRG_xYx_GG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRG_xY_G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRG_xY_GG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRx_YxY

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
				draw_state = def_draw_state (state);
			}
			else
			{
				state = SIGASP_APPROACH_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 5;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 3;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 2;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YRx_Yxx_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_YRG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);
	if (state ==# SIGASP_CLEAR_2)
	{
		if (next_state ==# SIGASP_APPROACH_1)
		{
			draw_state = 2;
		}
		else if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 5;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 6;
		}
	}

SCRIPT T_Small_YxG_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);
	if (state ==# SIGASP_CLEAR_2)
	{
		if (next_state ==# SIGASP_APPROACH_1)
		{
			draw_state = 2;
		}
		else if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 5;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 6;
		}
	}

SCRIPT T_Small_xRx_YWG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Small_GWx_YRx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_YRY_xWx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Small_xWx_YRY

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_GRG_xWx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);
	
SCRIPT T_Small_GWG_xRx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_Route_Left

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_Right

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_-

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_1

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_1G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_2

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_2G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_3

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_3G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_4

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_4G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_5

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_5G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_6

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_7

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_8

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_9

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_0

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Route_10

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_Left

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_Right

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_-

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_1

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_2

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_3

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_4

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_5

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_6

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_7

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_8

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_9

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_0

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Route_10

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_CLEAR_2;
				draw_state = 1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 0;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_APPROACH_1)
				{
					draw_state = 1;
				} else if (next_state ==# SIGASP_STOP)
				{
					draw_state = 0;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_A

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_B

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_V

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_G

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_D

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_E

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_ZH

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_Z

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_Ii

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_K

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_L

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_M

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_N

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_O

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_P

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_R

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_S

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_T

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_U

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_F

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_KH

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_TS

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_CH

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_SH

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_SCH

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_EL

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_YU

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Head_Route_YA

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			draw_state = 1;
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Route

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	state = SIGASP_CLEAR_2;
	draw_state = def_draw_state (state);

SCRIPT T_Barrier

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	state = SIGASP_CLEAR_2;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_CLEAR_2;
	}
	draw_state = def_draw_state (state);

SCRIPT WR_Route

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	float		next_state;

	state = SIGASP_CLEAR_2;
	draw_state = def_draw_state (state);

SCRIPT T_Head_PS45_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_PS45_WB

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (block_state() !=# BLOCK_JN_OBSTRUCTED)
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((block_state() ==# BLOCK_OCCUPIED) || (next_state ==# SIGASP_STOP) || (next_state ==# SIGASP_RESTRICTING) || (next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED))
		{
			state = SIGASP_RESTRICTING;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_PS45_WGR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_PS45_GR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Head_PS45_YG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	next_state = next_sig_lr (SIGFN_NORMAL);
	if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
	{
		state = SIGASP_APPROACH_1;
	}
	else
	{
		state = SIGASP_CLEAR_2;
	}
	draw_state = def_draw_state (state);
	if (state >=# SIGASP_APPROACH_1)
	{
		if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 3;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 4;
		}
	}

SCRIPT T_Head_PS45_YGR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if ((enabled || !sig_feature (SIGFEAT_USER1)) && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);
	if (state ==# SIGASP_CLEAR_2)
	{
		if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 4;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 5;
		}
	}

SCRIPT T_Head_PS45_YGR_W

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
		else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 6;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_PS45_YxR_YW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
		else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 4;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_PS45_xGR_GW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_PS45_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_PS45_WB

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (block_state() !=# BLOCK_JN_OBSTRUCTED)
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((block_state() ==# BLOCK_OCCUPIED) || (next_state ==# SIGASP_STOP) || (next_state ==# SIGASP_RESTRICTING) || (next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED))
		{
			state = SIGASP_RESTRICTING;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_PS45_WGR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_PS45_GR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Small_PS45_YGR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);
	if (state ==# SIGASP_CLEAR_2)
	{
		if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 4;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 5;
		}
	}

SCRIPT T_Tunnel_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);

SCRIPT T_Tunnel_WB

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (block_state() !=# BLOCK_JN_OBSTRUCTED)
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((block_state() ==# BLOCK_OCCUPIED) || (next_state ==# SIGASP_STOP) || (next_state ==# SIGASP_RESTRICTING) || (next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED))
		{
			state = SIGASP_RESTRICTING;
		}
	}
	draw_state = def_draw_state (state);

SCRIPT T_Tunnel_YGR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);
	if (state ==# SIGASP_CLEAR_2)
	{
		if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 4;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 5;
		}
	}
	else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
	{
		draw_state = 3;
	}

SCRIPT T_Tunnel_YRG

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);
	if (state ==# SIGASP_CLEAR_2)
	{
		if (next_state ==# SIGASP_APPROACH_1)
		{
			draw_state = 2;
		}
		else if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 5;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 6;
		}
	}
	else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
	{
		draw_state = 7;
	}

SCRIPT T_Tunnel_YG_RW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
		else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 6;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Tunnel_Yx_RW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Tunnel_YR_GW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
		else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 7;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Tunnel_YR_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Tunnel_YGR_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
		else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 6;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Tunnel_YxR_YW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
		else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 4;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Tunnel_YxR_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Tunnel_YRG_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_1)
			{
				draw_state = 2;
			}
			else if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 5;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 6;
			}
		}
		else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 7;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Tunnel_YRx_YW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
		else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 4;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Tunnel_YRx_xW

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Tunnel_YGR_Repeater

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);
	if (state ==# SIGASP_CLEAR_2)
	{
		if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 4;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 5;
		}
	}
	else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
	{
		draw_state = 3;
	}

SCRIPT T_Tunnel_YRG_Repeater

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);
	if (state ==# SIGASP_CLEAR_2)
	{
		if (next_state ==# SIGASP_APPROACH_1)
		{
			draw_state = 2;
		}
		else if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 5;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 6;
		}
	}
	else if ((state ==# SIGASP_RESTRICTING) && sig_feature (SIGFEAT_USER1))
	{
		draw_state = 7;
	}



SCRIPT T_Head_I

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_STOP_AND_PROCEED;
	}
	draw_state = def_draw_state (state);
	
SCRIPT T_Head_Wm

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_STOP_AND_PROCEED;
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_I-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_STOP_AND_PROCEED;
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_WB-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_STOP_AND_PROCEED;
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_WB_speciale

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP;
	if (block_state() !=# BLOCK_JN_OBSTRUCTED)
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((block_state() ==# BLOCK_OCCUPIED) || (next_state ==# SIGASP_STOP) || (next_state ==# SIGASP_RESTRICTING) || (next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED))
		{
			state = SIGASP_STOP;
		}
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_WB-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_STOP_AND_PROCEED;
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_WB_speciale

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_STOP;
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_WGR_old-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_WR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_WR_speciale

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_YB_RW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_YG_RW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_Yx_RW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YRW_old-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YG_RY_G-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_Yx_RY_x_I-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YG_R-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_Yx_RY_I-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_xGR_GW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);



SCRIPT T_Head_YGR_xW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_YxR_xW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YGR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (sig_feature (SIGFEAT_GRADIENT_PLATE))
		{
			state = SIGASP_RESTRICTING;
		}
		if ((enabled || !sig_feature (SIGFEAT_USER1)) && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_YGR_old-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (sig_feature (SIGFEAT_GRADIENT_PLATE))
		{
			state = SIGASP_RESTRICTING;
		}
		if ((enabled || !sig_feature (SIGFEAT_USER1)) && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}




SCRIPT T_Head_YGR_Yxx_G-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Yxx_RxW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YxR_YxW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_xGR_xG-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_xGR_xGx-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);



SCRIPT T_Head_YGR_xxW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_YxR_xxW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YGR_Yx_G-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YxR_YW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_YxY_RY-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
				draw_state = def_draw_state (state);
			}
			else
			{
				state = SIGASP_APPROACH_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 5;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 3;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 2;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YxY_RYx-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
				draw_state = def_draw_state (state);
			}
			else
			{
				state = SIGASP_APPROACH_2;
				if (next_state ==# SIGASP_STOP_AND_PROCEED)
				{
					draw_state = 5;
				} else if (next_state ==# SIGASP_CLEAR_2)
				{
					draw_state = 3;
				} else if (next_state ==# SIGASP_APPROACH_2)
				{
					draw_state = 2;
				}
			}
		}
		else
		{
			draw_state = def_draw_state (state);
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_YxY_Rx_I-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_YGx_R-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_YxY_RxW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_YRY_old-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_APPROACH_2;
		}
	}
	draw_state = def_draw_state (state);



SCRIPT T_Small_BR_YW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Small_GR_YW-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Small_GxG_WR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);



SCRIPT T_Small_GYx_WR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Small_WB-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	draw_state = def_draw_state (state);


SCRIPT T_Small_WGR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);



SCRIPT T_Small_WR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() !=# BLOCK_JN_OBSTRUCTED))
	{
		state = SIGASP_RESTRICTING;
	}
	draw_state = def_draw_state (state);



SCRIPT T_Small_YGR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
		{
			state = SIGASP_APPROACH_1;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);
	if (state ==# SIGASP_CLEAR_2)
	{
		if (next_state ==# SIGASP_APPROACH_2)
		{
			draw_state = 4;
		}
		else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
		{
			draw_state = 5;
		}
	}


SCRIPT T_Small_YGW_Rx-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Small_YxY_WR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Small_YGx_WR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_YxW_Rx-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Small_YRY-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_APPROACH_2;
		}
	}
	draw_state = def_draw_state (state);



SCRIPT T_Head_GR_Wx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	state = SIGASP_STOP_AND_PROCEED;
	if (enabled && (block_state() ==# BLOCK_CLEAR))
	{
		next_state = next_sig_lr (SIGFN_NORMAL);
		if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
		{
			state = SIGASP_RESTRICTING;
		}
		else
		{
			state = SIGASP_CLEAR_2;
		}
	}
	draw_state = def_draw_state (state);



SCRIPT T_Always_W

	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;

	//if(enabled) {
        	state = SIGASP_RESTRICTING;
	//} else {
	//	state = SIGASP_STOP;
	//}
	draw_state = def_draw_state (state);

SCRIPT T_Always_W_PAB

	extern float 		state;
	extern float 		draw_state;
	extern float 		next_sig_lr ();

	draw_state=0;
	state=next_sig_lr(SIGFN_NORMAL);
	if(state==# SIGASP_STOP_AND_PROCEED)
		state=SIGASP_STOP;


SCRIPT T_SignalLight_DISTANCE

	extern float	block_state ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	next_sig_lr ();

	state = SIGASP_STOP_AND_PROCEED;
	if ( block_state() !=# BLOCK_JN_OBSTRUCTED )
	{ state = next_sig_lr ( SIGFN_DISTANCE ); }
	draw_state = def_draw_state (state);



SCRIPT T_Small_WBR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_WBR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_WBR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
	
	SCRIPT T_Head_WBR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if (next_state ==# SIGASP_RESTRICTING)
			{
				state = SIGASP_RESTRICTING;
			}
			else if (next_state ==# SIGASP_STOP_AND_PROCEED)
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Small_xYx_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Yxx_WR

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}
	
SCRIPT T_Small_YRx_Wx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_xYx_WR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Small_Yxx_WR-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Yx_RY

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YG_Rx

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Yx_RY-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_Yx_RY_õ-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_YG_Rx-new

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YG_RW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_Yx_RW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}

SCRIPT T_Head_GXG_RW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_GYX_RW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YGX_RW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_XYX_RW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YXX_RW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_XGX_GRX-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);


SCRIPT T_Head_YXY_XRW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YGX_XRW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Head_YXX_XRW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YGY_RW_G-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_3;
			}
			else
			{
				state = SIGASP_CLEAR_1;
			}
		}
		draw_state = def_draw_state (state);
		if ((state ==# SIGASP_CLEAR_1) && (next_state ==# SIGASP_APPROACH_2))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Head_YxY_RW-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Small_GxG_WR-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	draw_state = def_draw_state (state);


SCRIPT T_Small_GYx_WR-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Small_xYx_WR-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Small_YGW_Rx-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Small_YxW_Rx-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Small_YxY_WR-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
		if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
		{
			draw_state = 3;
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}



SCRIPT T_Small_YGx_WR-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else if ((next_state ==# SIGASP_STOP_AND_PROCEED) || (next_state ==# SIGASP_RESTRICTING))
			{
				state = SIGASP_APPROACH_1;
			}
			else
			{
				state = SIGASP_CLEAR_2;
			}
		}
		draw_state = def_draw_state (state);
		if (state ==# SIGASP_CLEAR_2)
		{
			if (next_state ==# SIGASP_APPROACH_2)
			{
				draw_state = 4;
			}
			else if ((next_state ==# SIGASP_APPROACH_3) || (next_state ==# SIGASP_CLEAR_1))
			{
				draw_state = 5;
			}
		}
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}


SCRIPT T_Small_Yxx_WR-ALSO

	extern float	block_state ();
	extern float	route_set ();
	extern float	next_sig_lr ();
	extern float	next_sig_mr ();
	extern float	def_draw_state ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;
	extern float	sig_feature ();
	float		next_state;

	if (route_set())
	{
		state = SIGASP_STOP_AND_PROCEED;
		if (enabled && (block_state() ==# BLOCK_CLEAR))
		{
			next_state = next_sig_lr (SIGFN_NORMAL);
			if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
			{
				state = SIGASP_RESTRICTING;
			}
			else
			{
				state = SIGASP_APPROACH_2;
			}
		}
		draw_state = def_draw_state (state);
	}
	else
	{
		state = SIGASP_STOP;
		if (block_state() ==# BLOCK_JN_OBSTRUCTED)
		{
			state = SIGASP_STOP_AND_PROCEED;
		}
		draw_state = def_draw_state (state);
	}