added functions to toggle menu depending on number of characters entered in input.