
function f-plinput ()
{
clear

fig-col
figlet "Random "    " Radio !"
KEYS=
info-col
unbold
echo "For information about the "Plait" player this uses,"
echo "read the documents in $HOME/plait. "Plait" is written by Stephen Jungels "
bold
echo
head-col
echo "Random Radio searches for Shoutcast streams, and plays them."
echo
echo "Type the kind of music you would like to hear."
echo
echo "For example: '"jazz"' or '"hard rock "' or '"flamenco"'"
printf "\n\n"
info-col 
echo "PLAYER CONTROLS"
echo
echo "l: Play whatever happens to be previously in the list. "
echo " "
echo "m: INX main menu. "
echo
echo "w: Net and Web menu."
echo
echo "r: INX radio menu."
echo
echo "x: Give me a command prompt."
echo
printf "\n\n"
head-col
echo "In each case hit <enter> to activate your search or command."
printf "\n\n\n"
f-ttynum

read "KEYS"


	case "$KEYS" in

	l)
	plait 
	f-plait-return
	f-plinput ;;

	m)
	plait --stop
	killall mplayer
	f-menu ;;

	r)	
	plait --stop
	killall mplayer
	f-radiomenu
	;;
	
	w)
	f-net
	;;
	
	x)
	clear
	f-prompt
	;;
	
	*)
	# Check for more than one character to avoid nonsense one-letter calls
	# Of course, plait will happily search for rubbish like "*%_@lgjdj84*&$)#" , but too bad :-)
	if [ "$(echo "$KEYS" | cut -c 2)" = "" ] ; then
		echo "I didn't understand that request - try a new search."
		sleep 3
		f-plinput
	else
		f-send
	fi
		  ;;


	esac


}

