is_number(){
	[[ $1 =~ ^[0-9]+$ ]]
}
function get_mouse_position(){
	_STTY=$(stty -g)
	echo -en "\e[?1000h"; read -n12 x &>/dev/null ; echo -en "\r                 \r";  echo -en "\e[?1000l"
	is_number $x && { echo $x; choice=$x; return; }
	stty "$_STTY"
	m1=${x#???}
	m2=${x#????}
	m3=${x#?????}
	eval "$(printf "mb=%d mx=%d my=%d" "'$m1" "'$m2" "'$m3")"
	[ $mx -lt 0 ] && mx=$(( 255 + $mx ))
	[ $my -lt 0 ] && my=$(( 255 + $my ))
	BUTTON=$(( ($mb & 3) + 1 ))
	MOUSEX=$(( $mx - 32 ))
	MOUSEY=$(( $my - 32 ))
	choice=$(($MOUSEY - $Y_OFFSET))
	ans=$choice;
	echo $choice;
}

mkmenuheader(){ 
$clear;
	stty -echo; echo -n $'\e[6n'; read -d R x; stty echo; a=$(( $(echo ${x#??} |cut -d\; -f1) + 1 ))
	Y_OFFSET=$a;
	echo -en "\033[$(($2 / 2 - (${#1} / 2 - 10) ))C$1\n"; 
}


_read(){
	get_mouse_position
}
special_single_question(){
	get_mouse_position
}
