frames.php
public function setFrameFocusByIndex($choice)
    {
        if (is_integer($this->focus)) {
            if ($this->frames[$this->focus]->hasFrames()) {
                return $this->frames[$this->focus]->setFrameFocusByIndex($choice);
            }
        }
        if (($choice < 1) || ($choice > count($this->frames))) {
            return false;
        }
        $this->focus = $choice - 1;

        return true;
    }
public function setFrameFocusByIndex($choice)
    {
        if (is_integer($this->focus)) {
            if ($this->frames[$this->focus]->hasFrames()) {
                return $this->frames[$this->focus]->setFrameFocusByIndex($choice);
            }
        }
        if (($choice < 1) || ($choice > count($this->frames))) {
            return false;
        }
        $this->focus = $choice - 1;

        return true;
    }
Sets the focus by index. The integer index starts from 1.
If already focused and the target frame also has frames,
then the nested frame will be focused.

@param int $choice    Chosen frame.

@return bool           True if frame exists.