#!/bin/bash
#
# "jazz_it_up" - an improved text-mode menu

tput civis      # Turn off the cursor

while [ 1 ]
do
        echo -e '\E[44;38m' # Set colors: bg=blue, fg=white
        clear 	# Redraw the screen with the above color set
        echo -e '\E[41;38m' # bg=red

        echo -ne '\E[45;38m' # bg=magenta
        tput cup 8 25 ; echo -n  "    M A I N     M E N U    "
        echo -e '\E[41;38m' # bg=red

        tput cup 10 25 ; echo -n " 1. Business auto policies "
        tput cup 11 25 ; echo -n " 2. Private auto policies  "
        tput cup 12 25 ; echo -n " 3. Claims                 "
        tput cup 13 25 ; echo -n " 4. Accounting             "
        tput cup 14 25 ; echo -n " 5. Quit                   "

        echo -ne '\E[44;38m' # bg=blue
        tput cup 16 28 ; echo -n " Enter your choice: "
        tput cup 16 48

        read choice
        tput cup 18 30

        case "$choice" in
                1|B|b) bizpol ;;
                2|P|p) perspol ;;
                3|C|c) claims ;;
                4|A|a) acct ;;
                5|Q|q) tput sgr0; clear; exit ;;
                *) tput cup 18 26; echo "\"$choice\" is not a valid option."; sleep 2 ;;
        esac

	sleep 1
done

