include('fckeditor/fckeditor.js');

function PLUGfckeditor() {
 var edits = document.getElementsByTagName('textarea');
 var oFCKeditors = new Array();
 var FCKcout = 0;
 for(var i = 0; i < edits.length; i++) {
  var att = edits[i].getAttribute('fck');
  if(att == 'true' || att == 'bbcode') {
   var bbcode = 'false';
   if(att == 'bbcode') {bbcode = 'true';};
   oFCKeditors[FCKcout] = new FCKeditor(edits[i].id);
   oFCKeditors[FCKcout].BasePath = config['scriptdir'] + "fckeditor/" ;
   oFCKeditors[FCKcout].Config["CustomConfigurationsPath"] = config['scriptdir'] + "mods/" + config['module'] + "/fckconfig.php?DynP=" + encodeURIComponent(edits[i].getAttribute('fckattr')) + "&bbcode=" + bbcode + "&d=" + ( new Date() * 1 );
   oFCKeditors[FCKcout].ReplaceTextarea() ;
   FCKcout++;
  };
 };
};
