protected function __toJs($strCustomJs = "", $arrInitArguments = array(), $blnRawJs = false)
    {
        // Add extra arguments to javascript initialization method.
        if ($this->__currentpage > 1) {
            $arrInitArguments["initialPage"] = $this->__currentpage;
        }

        $arrInitArguments["confirmPage"] = $this->__hasconfirmpage;

        $strJs = "";
        $strJs .= "objForm.setLabel('next', '" . $this->__nextlabel . "');\n\t";
        $strJs .= "objForm.setLabel('previous', '" . $this->__previouslabel . "');\n\t";

        if (!empty($this->__nextclass)) {
        	$strJs .= "objForm.setClass('next', '" . $this->__nextclass . "');\n\t";
        }

        if (!empty($this->__previousclass)) {
        	$strJs .= "objForm.setClass('previous', '" . $this->__previousclass . "');\n\t";
        }

        if (strlen($strCustomJs) > 0) {
            $strJs .= $strCustomJs;
        }

        return parent::__toJs($strJs, $arrInitArguments, $blnRawJs);
    }