function entryForm_FckEditorTools()
{
    var _submitAfterHandleUSDOKClick = false;
    var _postbackEventReference;

    this.UpdateEditorFormValues = function()
    {
        for ( i = 0; i < parent.frames.length; ++i )
            if ( parent.frames[i].FCK ) parent.frames[i].FCK.UpdateLinkedField();
    }
    
    this.UpdateEditorWithFormValues = function()
    {
        for ( i = 0; i < parent.frames.length; ++i )
            if ( parent.frames[i].FCK ) parent.frames[i].FCK.SetHTML(parent.frames[i].FCK.LinkedField.value, false);
    }
    
    this.HandleUSDOKClick = function()
    {
        this.UpdateEditorWithFormValues();
        
        if (this._submitAfterHandleUSDOKClick)
            window.setTimeout(this._postbackEventReference, 1000);
    }
    
    this.SubmitAfterSpellOK = function(postbackEventReference)
    {
        this._submitAfterHandleUSDOKClick = true;
        this._postbackEventReference = postbackEventReference;
    }
    
    this.DontSubmitAfterSpellOK = function()
    {
        this._submitAfterHandleUSDOKClick = false;
    }
}

var FckEditorToolsObject = new entryForm_FckEditorTools();