SCRIPT STURC

	extern float	state;	
	state = SIGASP_STOP;

//SCRIPT ODDELOVAC

//	extern float	state;
//	state = SIGASP_STOP_AND_PROCEED;

SCRIPT SKRYTA

	extern float	block_state ();
	extern float	sig_feature ();
	extern float	state;
	
        if ( sig_feature ( SIGFEAT_USER1 ) )
        state = SIGASP_STOP_AND_PROCEED;
        else
	if  ( block_state () !=# BLOCK_CLEAR )
	state = SIGASP_STOP;
	else
        state = SIGASP_CLEAR_2;

SCRIPT PREDMECH

	extern float	state;
	extern float	draw_state;
	extern float	next_sig_lr ();
	extern float	def_draw_state ();

        if ( next_sig_lr (SIGFN_NORMAL) <# SIGASP_APPROACH_3 )
        state = SIGASP_APPROACH_1;
	else
        state = SIGASP_CLEAR_1;

	draw_state = def_draw_state (state);

SCRIPT PREDVEST_R

	extern float	state;
	extern float	draw_state;
	extern float	next_sig_lr ();
	extern float	def_draw_state ();

        if ( next_sig_lr (SIGFN_NORMAL) <# SIGASP_APPROACH_3 )
        state = SIGASP_APPROACH_1;
	else
        state = SIGASP_CLEAR_1;

	draw_state = def_draw_state (state);

SCRIPT MECHRA1R

	extern float	state;
        extern float    enabled;
	extern float	block_state ();
	extern float	route_set ();
	extern float	draw_state;
	extern float	def_draw_state ();
	extern float	sig_feature ();

	if ( !enabled || block_state () !=# BLOCK_CLEAR )
	state = SIGASP_STOP;
	else
        if ( sig_feature ( SIGFEAT_USER1 ) && route_set () )
        state = SIGASP_STOP_AND_PROCEED;
	else
        state = SIGASP_CLEAR_2;

	draw_state = def_draw_state (state);

SCRIPT NAV3

        extern float    enabled;
	extern float	state;
	extern float	draw_state;
	extern float	block_state ();
	extern float	route_set ();
	extern float	def_draw_state ();
	extern float	sig_feature ();
	
               float    bstate;
               float    dstate;
               
        bstate = block_state ();

	if ( !enabled || bstate ==# BLOCK_JN_OBSTRUCTED )
        dstate = SIGASP_STOP;
	else
	if ( sig_feature ( SIGFEAT_USER2 ) && bstate ==# BLOCK_OCCUPIED )
        dstate = SIGASP_STOP_AND_PROCEED;
        else
        if ( bstate !=# BLOCK_CLEAR )
	dstate = SIGASP_STOP;
	else
        if ( sig_feature ( SIGFEAT_USER1 ) )
	{
               if ( route_set () )
               dstate = SIGASP_STOP_AND_PROCEED;
      	       else
               dstate = SIGASP_CLEAR_2;

        }
	else
	dstate = SIGASP_CLEAR_2;
	
        if ( sig_feature ( SIGFEAT_USER3 ) && dstate ==# SIGASP_CLEAR_2 )
        dstate = SIGASP_APPROACH_3;

        state = dstate;
	draw_state = def_draw_state (state);

SCRIPT NAV4

        extern float    enabled;
	extern float	state;
	extern float	draw_state;
	extern float	block_state ();
	extern float	route_set ();
	extern float	def_draw_state ();
	extern float	sig_feature ();
	extern float	next_sig_lr ();

               float    bstate;
               float    dstate;

        bstate = block_state ();

	if ( !enabled || bstate ==# BLOCK_JN_OBSTRUCTED )
        dstate = SIGASP_STOP;
	else
	if ( sig_feature ( SIGFEAT_USER2 ) && bstate ==# BLOCK_OCCUPIED )
        dstate = SIGASP_STOP_AND_PROCEED;
        else
        if ( bstate !=# BLOCK_CLEAR )
	dstate = SIGASP_STOP;
	else
        if ( sig_feature ( SIGFEAT_USER1 ) )
	{
               if ( route_set () )
               dstate = SIGASP_STOP_AND_PROCEED;
      	       else
               dstate = SIGASP_CLEAR_2;

        }
	else
	dstate = SIGASP_APPROACH_3;

        if ( next_sig_lr (SIGFN_NORMAL) <=# SIGASP_STOP_AND_PROCEED  && dstate ==# SIGASP_CLEAR_2 )
	dstate = SIGASP_APPROACH_3;

        state = dstate;
	draw_state = def_draw_state (state);

SCRIPT POSME

	extern float	state;
        extern float    enabled;
	extern float	draw_state;
	extern float	block_state ();
	extern float	def_draw_state ();
	extern float	sig_feature ();

	if ( !enabled )
	state = SIGASP_STOP;
        else
        if ( block_state () !=# BLOCK_CLEAR )
        {
                if ( sig_feature ( SIGFEAT_USER1 ) )
                state = SIGASP_STOP_AND_PROCEED;
                else
        	state = SIGASP_STOP;
        }
	else
        state = SIGASP_APPROACH_1;

	draw_state = def_draw_state (state);

