var omediaItem = new FCKToolbarButton( 'code' , "插入代码") ;
omediaItem.IconPath = FCKPlugins.Items['code'].Path + 'code.gif' ;

FCKToolbarItems.RegisterItem( 'code', omediaItem ) ;

var oMyCMCommand = new Object() ;
oMyCMCommand.Name = 'code' ;

oMyCMCommand.Execute = function()
{
	FCKDialog.OpenDialog( 'FCKDialog_Color', '插入代码', 'dialog/fck_code.html', 600, 300) ;
 
}

oMyCMCommand.GetState = function()
{
	// Let's make it always enabled.
	return FCK_TRISTATE_OFF ;
}

FCKCommands.RegisterCommand( 'code', oMyCMCommand ) ;

