/*
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2004 Frederico Caldeira Knabben
 * 
 * Licensed under the terms of the GNU Lesser General Public License:
 * 		http://www.opensource.org/licenses/lgpl-license.php
 * 
 * For further information visit:
 * 		http://www.fckeditor.net/
 * 
 * File Name: fckplugin.js
 * 	
 * 
 * Version:  
 * Modified: 
 * 
 * File Authors:
 * 		
 */
 
// Define the command.
var FCKSbOnchange = function()
{

}

FCKSbOnchange.prototype.Execute = function() {
	top.sbApplyChangesObject.registerChange();
}

// Register the related command.
FCKCommands.RegisterCommand( 'SbOnchange', new FCKSbOnchange() ) ;

function SbOnchangeEventHandler() {
	FCKCommands.GetCommand('SbOnchange').Execute() ;
}

//	FCK.Events.AttachEvent( 'OnSelectionChange', SbOnchangeEventHandler ) ;
// Attach events, this is browser specific.
if (FCKBrowserInfo.IsIE) {
	FCK.EditorDocument.attachEvent( 'onkeydown', SbOnchangeEventHandler ) ;
} else {
	FCK.EditorDocument.addEventListener('keydown', SbOnchangeEventHandler, true ) ;
}

// First time execution.
//FCKCommands.GetCommand('SbOnchange').Execute() ;