/*
 * 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: fcktoolbaritems.js
 * Toolbar items definitions.
 * 
 * Version:  2.0 RC3
 * Modified: 2005-02-16 19:59:20
 * 
 * File Authors:
 * Frederico Caldeira Knabben (fredck@fckeditor.net)
 */

var FCKToolbarItems = new Object() ;
FCKToolbarItems.LoadedItems = new Object() ;

FCKToolbarItems.RegisterItem = function( itemName, item )
{
this.LoadedItems[ itemName ] = item ;
}

FCKToolbarItems.GetItem = function( itemName )
{
var oItem = FCKToolbarItems.LoadedItems[ itemName ] ;

if ( oItem )
return oItem ;

switch ( itemName )
{
case 'Source': oItem = new FCKToolbarButton( 'Source', FCKLang.Source, null, FCK_TOOLBARITEM_ICONTEXT, true, true ) ; break ;
case 'DocProps': oItem = new FCKToolbarButton( 'DocProps', FCKLang.DocProps ) ; break ;
case 'Save': oItem = new FCKToolbarButton( 'Save', FCKLang.Save, null, null, true ) ; break ;
case 'NewPage': oItem = new FCKToolbarButton( 'NewPage', FCKLang.NewPage, null, null, true  ) ; break ;
case 'Preview': oItem = new FCKToolbarButton( 'Preview', FCKLang.Preview, null, null, true  ) ; break ;
case 'About': oItem = new FCKToolbarButton( 'About', FCKLang.About, null, null, true  ) ; break ;

case 'Cut': oItem = new FCKToolbarButton( 'Cut', FCKLang.Cut, null, null, false, true ) ; break ;
case 'Copy': oItem = new FCKToolbarButton( 'Copy', FCKLang.Copy, null, null, false, true ) ; break ;
case 'Paste': oItem = new FCKToolbarButton( 'Paste', FCKLang.Paste, null, null, false, true ) ; break ;
case 'PasteText': oItem = new FCKToolbarButton( 'PasteText', FCKLang.PasteText, null, null, false, true ) ; break ;
case 'PasteWord': oItem = new FCKToolbarButton( 'PasteWord', FCKLang.PasteWord, null, null, false, true ) ; break ;
case 'Print': oItem = new FCKToolbarButton( 'Print', FCKLang.Print ) ; break ;
case 'SpellCheck': oItem = new FCKToolbarButton( 'SpellCheck', FCKLang.SpellCheck ) ; break ;
case 'Undo': oItem = new FCKToolbarButton( 'Undo', FCKLang.Undo, null, null, false, true ) ; break ;
case 'Redo': oItem = new FCKToolbarButton( 'Redo', FCKLang.Redo, null, null, false, true ) ; break ;
case 'SelectAll': oItem = new FCKToolbarButton( 'SelectAll', FCKLang.SelectAll ) ; break ;
case 'RemoveFormat': oItem = new FCKToolbarButton( 'RemoveFormat', FCKLang.RemoveFormat, null, null, false, true ) ; break ;

case 'Bold': oItem = new FCKToolbarButton( 'Bold', FCKLang.Bold, null, null, false, true ) ; break ;
case 'Italic': oItem = new FCKToolbarButton( 'Italic', FCKLang.Italic, null, null, false, true  ) ; break ;
case 'Underline': oItem = new FCKToolbarButton( 'Underline', FCKLang.Underline, null, null, false, true ) ; break ;
case 'StrikeThrough': oItem = new FCKToolbarButton( 'StrikeThrough', FCKLang.StrikeThrough, null, null, false, true ) ; break ;
case 'Subscript': oItem = new FCKToolbarButton( 'Subscript', FCKLang.Subscript, null, null, false, true ) ; break ;
case 'Superscript': oItem = new FCKToolbarButton( 'Superscript', FCKLang.Superscript, null, null, false, true ) ; break ;

case 'OrderedList': oItem = new FCKToolbarButton( 'InsertOrderedList', FCKLang.NumberedListLbl, FCKLang.NumberedList, null, false, true ) ; break ;
case 'UnorderedList': oItem = new FCKToolbarButton( 'InsertUnorderedList', FCKLang.BulletedListLbl, FCKLang.BulletedList, null, false, true ) ; break ;
case 'Outdent': oItem = new FCKToolbarButton( 'Outdent', FCKLang.DecreaseIndent, null, null, false, true ) ; break ;
case 'Indent': oItem = new FCKToolbarButton( 'Indent', FCKLang.IncreaseIndent, null, null, false, true ) ; break ;

case 'Link': oItem = new FCKToolbarButton( 'Link', FCKLang.InsertLinkLbl, FCKLang.InsertLink, null, false, true ) ; break ;
case 'Unlink': oItem = new FCKToolbarButton( 'Unlink', FCKLang.RemoveLink, null, null, false, true ) ; break ;
case 'Anchor': oItem = new FCKToolbarButton( 'Anchor', FCKLang.Anchor ) ; break ;

case 'Image': oItem = new FCKToolbarButton( 'Image', FCKLang.InsertImageLbl, FCKLang.InsertImage ) ; break ;
case 'Table': oItem = new FCKToolbarButton( 'Table', FCKLang.InsertTableLbl, FCKLang.InsertTable ) ; break ;
case 'SpecialChar': oItem = new FCKToolbarButton( 'SpecialChar', FCKLang.InsertSpecialCharLbl, FCKLang.InsertSpecialChar ) ; break ;
case 'Smiley': oItem = new FCKToolbarButton( 'Smiley', FCKLang.InsertSmileyLbl, FCKLang.InsertSmiley ) ; break ;
case 'UniversalKey': oItem = new FCKToolbarButton( 'UniversalKey', FCKLang.UniversalKeyboard ) ; break ;

case 'Rule': oItem = new FCKToolbarButton( 'InsertHorizontalRule', FCKLang.InsertLineLbl, FCKLang.InsertLine ) ; break ;

case 'JustifyLeft': oItem = new FCKToolbarButton( 'JustifyLeft', FCKLang.LeftJustify, null, null, false, true ) ; break ;
case 'JustifyCenter': oItem = new FCKToolbarButton( 'JustifyCenter', FCKLang.CenterJustify, null, null, false, true ) ; break ;
case 'JustifyRight': oItem = new FCKToolbarButton( 'JustifyRight', FCKLang.RightJustify, null, null, false, true ) ; break ;
case 'JustifyFull': oItem = new FCKToolbarButton( 'JustifyFull', FCKLang.BlockJustify, null, null, false, true ) ; break ;

case 'Style': oItem = new FCKToolbarStyleCombo() ; break ;
case 'FontName': oItem = new FCKToolbarFontsCombo() ; break ;
case 'FontSize': oItem = new FCKToolbarFontSizeCombo() ; break ;
case 'FontFormat': oItem = new FCKToolbarFontFormatCombo() ; break ;

case 'TextColor': oItem = new FCKToolbarPanelButton( 'TextColor', FCKLang.TextColor ) ; break ;
case 'BGColor': oItem = new FCKToolbarPanelButton( 'BGColor', FCKLang.BGColor ) ; break ;

case 'Find': oItem = new FCKToolbarButton( 'Find', FCKLang.Find ) ; break ;
case 'Replace': oItem = new FCKToolbarButton( 'Replace', FCKLang.Replace ) ; break ;

case 'Form': oItem = new FCKToolbarButton( 'Form', FCKLang.Form ) ; break ;
case 'Checkbox': oItem = new FCKToolbarButton( 'Checkbox', FCKLang.Checkbox ) ; break ;
case 'Radio': oItem = new FCKToolbarButton( 'Radio', FCKLang.RadioButton ) ; break ;
case 'TextField': oItem = new FCKToolbarButton( 'TextField', FCKLang.TextField ) ; break ;
case 'Textarea': oItem = new FCKToolbarButton( 'Textarea', FCKLang.Textarea ) ; break ;
case 'HiddenField': oItem = new FCKToolbarButton( 'HiddenField', FCKLang.HiddenField ) ; break ;
case 'Button': oItem = new FCKToolbarButton( 'Button', FCKLang.Button ) ; break ;
case 'Select': oItem = new FCKToolbarButton( 'Select', FCKLang.SelectionField ) ; break ;
case 'ImageButton': oItem = new FCKToolbarButton( 'ImageButton', FCKLang.ImageButton ) ; break ;

default:
alert( FCKLang.UnknownToolbarItem.replace( /%1/g, itemName ) ) ;
return ;
}

FCKToolbarItems.LoadedItems[ itemName ] = oItem ;

return oItem ;
}
