<?php 
class FckHelper extends Helper {
  function load($id, $toolbar = 'Custom') {
    $did = '';
    foreach (explode('[', str_replace(']','', $id)) as $v) {
      $did .= ucfirst($v);
    }
    $js = $this->webroot . 'js/fckeditor/';
    return <<<FCK_CODE
<script type="text/javascript">
fckLoader_$did = function () {
  var bFCKeditor_$did = new FCKeditor('$did');
  bFCKeditor_$did.BasePath = '$js';
  bFCKeditor_$did.ToolbarSet = '$toolbar';
  bFCKeditor_$did.ReplaceTextarea();
}
fckLoader_$did();
</script>
FCK_CODE;
  }
}
?>