#!/bin/bash

. bk_functions

while [ 0 ]; do

	dialog --backtitle "Linux Bootkit $VERSION" \
	       --title "Help Index Menu"\
	       --menu "\nIf you have trouble using the arrow keys, you can use '+', '-',\n\
TAB instead. Which option would you like?" 20 74 10 \
"NAVIGATE" "How to navigate through a help document (searching, etc)" \
"OVERVIEW" "Overview and Introduction" \
"CONFIG" "Configuration and Basic Operation" \
"TESTING" "Testing your boot/root/utility diskettes" \
"HOWTO" "Graham Chapman's Bootdisk HOWTO (from the net)" \
"RETURN" "Return to the main menu" 2>/tmp/.helpselect

if [ $? = 1 -o $? = 255 ]; then 
	rm -f /tmp/.helpselect 2>/dev/null
	reset
	exit
fi

HELPSEL="`cat /tmp/.helpselect`"
rm -f /tmp/.helpselect 2>/dev/null

# Process Selected Option

if [ "$HELPSEL" = "OVERVIEW" ]; then
	bkViewFile ./help/Help-Overview
fi

if [ "$HELPSEL" = "NAVIGATE" ]; then
	bkViewFile ./help/Help-Navigation
fi

if [ "$HELPSEL" = "HOWTO" ]; then
	bkViewFile ./help/Bootdisk-HOWTO
fi

if [ "$HELPSEL" = "TESTING" ]; then
	bkViewFile ./help/Help-Testing
fi

if [ "$HELPSEL" = "CONFIG" ]; then
	bkViewFile ./help/Help-Configure
fi

if [ "$HELPSEL" = "RETURN" ]; then
	reset
	break
fi

done

rm -f /tmp/.getdata.$$ 2>/dev/null
