/// <reference name="MicrosoftAjax.js" />
/// <reference path="../jQuery/jquery-1.2.6.min.js" />

function initFCKeditor(fckeditorID, basePath, toolbarSet,fckeditorContainerID) {
    var fck = new FCKeditor(fckeditorID);
    fck.BasePath = basePath;
    fck.ToolbarSet = toolbarSet;
//    fck.Config['StaticHtmlViewerID'] = viewerID;
    $("#" + fckeditorContainerID).html(fck.CreateHtml());
}

function FCKeditor_OnComplete(editorInstance) {
    if (editorInstance.Config.StaticHtmlViewerID) {
//        editorInstance.SetHTML($("#" + editorInstance.Config.StaticHtmlViewerID).html());
        //        editorInstance.Events.AttachEvent( 
        //            "OnSelectionChange",
        //            function(editorInstance){
        //                $("#" + editorInstance.Config.StaticHtmlViewerID).html( editorInstance.GetHTML());
        //            } 
        //        );
    }
}

// Notify ScriptManager that this is the end of the script.
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
