Comparison help

Comparison help

I sure don't understand what is going on here.  This is driving me nuts.
First, here's the code:
  1. <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
       
        <script>   
        $(document).ready(function(){
            var ncs_callsign = <?php echo json_encode($ncs_callsign); ?>;
           
            if (ncs_callsign == 'NONE' || ncs_callsign == null)
            {
                $("#nav_bar li:nth-child(3)").hide();
                $("#NOW").hide();
                $("#NCS").hide();
            }
            else
            {
                $("#nav_bar li:first").hide();
                $("#nav_bar li:nth-child(4)").hide();
                $("#WAIT").hide();
                $("#IF").hide();    
            }
           
            var logger_callsign = <?php echo json_encode($logger_callsign); ?>;
           
            if (logger_callsign == 'NONE' || logger_callsign == null)
            {           
                $("#LOGGER").hide();  
            }
            else
            {
                $("#nav_bar li:nth-child(2)").hide();  
            }       
        });
        </script>

Here's what happens.  Initially, both ncs_callsign and logger_callsign are null and the comparisons work fine and the html ids in the first section of both comparisons are hidden.

However, if the ncs_callsign changes to NONE and the logger_callsign changes to a valid value, the ncs_callsign comparison fails and the ids in the second section of the ncs_callsign comparison are not hidden.  But the ids of the first section of the logger_callsign comparison are hidden.

The other case is also a problem.  If the logger_callsign changes to NONE and the ncs_callsign changes to a valid value, the second section ids of the ncs_callsign comparison are hidden but the first section ids of the logger_callsign ids are not.

Summary - unless both ncs_callsign and logger_callsign are null, the comparison with value of NONE fails while the one with a valid value works ok.

Any ideas are welcome before I go completely nuts.