//------------------------------------------------------------------------------
// Convert a TEXTAREA into an FCKeditor HTML Editor area.
//------------------------------------------------------------------------------
function invokeHtmlEditor( fieldName, className ) {
var oFCKeditor = new FCKeditor(fieldName);
oFCKeditor.Config['CustomConfigurationsPath'] = '../../FCKEditorCustomConfig.js';
var textareaCell = document.getElementById(fieldName + '_cell')
oFCKeditor.Width = Math.max( 500, textareaCell.clientWidth );
oFCKeditor.Height = Math.min( textareaCell.clientHeight+160, document.body.clientHeight-150 );
oFCKeditor.BasePath = '/fckeditor/';
oFCKeditor.ReplaceTextarea();
document.getElementById(fieldName + '_display').style.display = "none";
invokeHtmlEditor2( fieldName, className );
}
function invokeHtmlEditor2( fieldName, className ) {
if ( document.frames(fieldName + '___Frame') == null
|| document.frames(fieldName + '___Frame').eEditorArea == null
|| document.frames(fieldName + '___Frame').eEditorArea.document == null
|| document.frames(fieldName + '___Frame').eEditorArea.document.body == null ) {
setTimeout( 'invokeHtmlEditor2("'+fieldName+'","'+className+'");', 100 );
} else {
//document.frames(fieldName + '___Frame').eEditorArea.document.body.className = className+"_edit";
document.frames(fieldName + '___Frame').eEditorArea.document.body.className = "questionAnswerFont";
}
}
