/*
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2005 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/
 * 
 * "Support Open Source software. What about a donation today?"
 * 
 * File Name: fckplugin.js
 * 	This is the sample plugin definition file.
 * 
 * File Authors:
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
 */

// Register the related commands.
// ### MySave
var FCKMyMathCommand = function()
{
    this.Name = 'MyMath';
}

FCKMyMathCommand.prototype.Execute = function() {//保存当前的编辑内容

window.open("/math/helpMath.htm", "mathhelp");
}

FCKMyMathCommand.prototype.GetState = function()
{
	return FCK_TRISTATE_OFF ;
}


FCKCommands.RegisterCommand( 'My_Sound'		, new FCKDialogCommand( FCKLang['DlgMySoundTitle']	, FCKLang['DlgMySoundTitle']		, FCKConfig.PluginsPath + 'findreplace/Sound.html'	, 340, 170 ) ) ;
FCKCommands.RegisterCommand( 'My_Video'	, new FCKDialogCommand( FCKLang['DlgMyVideoTitle'], FCKLang['DlgMyVideoTitle']	, FCKConfig.PluginsPath + 'findreplace/Video.html', 340, 200 ) ) ;
//FCKCommands.RegisterCommand( 'My_Save'	, new FCKMySaveCommand()) ;
FCKCommands.RegisterCommand('My_Math', new FCKMyMathCommand());

// Create the "Find" toolbar button.
var oFindItem		= new FCKToolbarButton( 'My_Sound', FCKLang['DlgMySoundTitle'] ) ;
oFindItem.IconPath	= FCKConfig.PluginsPath + 'findreplace/sound.gif' ;

FCKToolbarItems.RegisterItem( 'My_Sound', oFindItem ) ;			// 'My_Find' is the name used in the Toolbar config.

// Create the "Video" toolbar button.
var oReplaceItem		= new FCKToolbarButton( 'My_Video', FCKLang['DlgMyVideoTitle'] ) ;
oReplaceItem.IconPath	= FCKConfig.PluginsPath + 'findreplace/video.gif' ;

FCKToolbarItems.RegisterItem( 'My_Video', oReplaceItem ) ;	// 'My_Video' is the name used in the Toolbar config.

// Create the "Math" toolbar button.
var oMathItem = new FCKToolbarButton('My_Math', FCKLang['DlgMyMathTitle']);
oMathItem.IconPath = FCKConfig.PluginsPath + 'findreplace/Math.png';

FCKToolbarItems.RegisterItem('My_Math', oMathItem);