
function getdata
{
	dialog --inputbox "$1" 9 45 "$2" 2>/tmp/.getdata.$$ 
}

function msgbox
{
	dialog --msgbox "$1" 5 65
}

function infobox
{
	dialog --infobox "$1" 3 65
}

function yesno
{
	dialog --title "$1" \
		--yesno "Select:" 5 45 2>/dev/null

}

function bkViewFile
{
	if [ ! -f "$1" ]; then
		msgbox "Unable to locate $1!"
		return
	fi

	dialog --title "$1" \
		--textbox "$1" 25 80
}

function bkSaveOptions
{
	echo "DISKETTEDEV=$DISKETTEDEV" > ./.bootkit.config
	echo "KERNELPATH=$KERNELPATH" >> ./.bootkit.config
	echo "MOUNTPOINT=$MOUNTPOINT" >> ./.bootkit.config
	echo "LIBCLINK=$LIBCLINK" >> ./.bootkit.config
	echo "RAMDISK=$RAMDISK" >> ./.bootkit.config
	echo "COPYLIBC=$COPYLIBC" >> ./.bootkit.config
	echo "ADDBKUSER=$ADDBKUSER" >> ./.bootkit.config
}

function bkViewLog
{
	yesno "Would you like to view the bootkit log?"

	if [ "$?" = 0 ]
	then
		bkViewFile "$1"
		
		yesno "Would you like to remove the log?"

		if [ "$?" = 0 ]
		then
			rm -f "$1" >/dev/null 2>&1
		fi
	fi
}

