rem: FCK.ContextMenu=new Object();FCK.ContextMenu.Listeners=new Array();FCK.ContextMenu.RegisterListener=function(A){if (A) this.Listeners.push(A);};function FCK_ContextMenu_Init(){var oInnerContextMenu=FCK.ContextMenu._InnerContextMenu=new FCKContextMenu(FCKBrowserInfo.IsIE?window:window.parent,FCK.EditorWindow,FCKLang.Dir);oInnerContextMenu.OnBeforeOpen=FCK_ContextMenu_OnBeforeOpen;oInnerContextMenu.OnItemClick=FCK_ContextMenu_OnItemClick;var oMenu=FCK.ContextMenu;for (var i=0;i<FCKConfig.ContextMenu.length;i++) oMenu.RegisterListener(FCK_ContextMenu_GetListener(FCKConfig.ContextMenu[i]));};function FCK_ContextMenu_GetListener(listenerName){switch (listenerName){case 'Generic':return {AddItems:function(A,B,C){A.AddItem('Cut',FCKLang.Cut,7,FCKCommands.GetCommand('Cut').GetState()==FCK_TRISTATE_DISABLED);A.AddItem('Copy',FCKLang.Copy,8,FCKCommands.GetCommand('Copy').GetState()==FCK_TRISTATE_DISABLED);A.AddItem('Paste',FCKLang.Paste,9,FCKCommands.GetCommand('Paste').GetState()==FCK_TRISTATE_DISABLED);}};case 'Table':return {AddItems:function(A,B,C){var D=(C=='TABLE');var E=(!D&&FCKSelection.HasAncestorNode('TABLE'));if (E){A.AddSeparator();var F=A.AddItem('Cell',FCKLang.CellCM);F.AddItem('TableInsertCell',FCKLang.InsertCell,58);F.AddItem('TableDeleteCells',FCKLang.DeleteCells,59);F.AddItem('TableMergeCells',FCKLang.MergeCells,60);F.AddItem('TableSplitCell',FCKLang.SplitCell,61);F.AddSeparator();F.AddItem('TableCellProp',FCKLang.CellProperties,57);A.AddSeparator();F=A.AddItem('Row',FCKLang.RowCM);F.AddItem('TableInsertRow',FCKLang.InsertRow,62);F.AddItem('TableDeleteRows',FCKLang.DeleteRows,63);A.AddSeparator();F=A.AddItem('Column',FCKLang.ColumnCM);F.AddItem('TableInsertColumn',FCKLang.InsertColumn,64);F.AddItem('TableDeleteColumns',FCKLang.DeleteColumns,65);};if (D||E){A.AddSeparator();A.AddItem('TableDelete',FCKLang.TableDelete);A.AddItem('TableProp',FCKLang.TableProperties,39);}}};case 'Link':return {AddItems:function(A,B,C){if (FCK.GetNamedCommandState('Unlink')!=FCK_TRISTATE_DISABLED){A.AddSeparator();A.AddItem('Link',FCKLang.EditLink,34);A.AddItem('Unlink',FCKLang.RemoveLink,35);}}};case 'Image':return {AddItems:function(A,B,C){if (C=='IMG'&&!B.getAttribute('_fckfakelement')){A.AddSeparator();A.AddItem('Image',FCKLang.ImageProperties,37);}}};case 'Anchor':return {AddItems:function(A,B,C){if (C=='IMG'&&B.getAttribute('_fckanchor')){A.AddSeparator();A.AddItem('Anchor',FCKLang.AnchorProp,36);}}};case 'Flash':return {AddItems:function(A,B,C){if (C=='IMG'&&B.getAttribute('_fckflash')){A.AddSeparator();A.AddItem('Flash',FCKLang.FlashProperties,38);}}};case 'Form':return {AddItems:function(A,B,C){if (FCKSelection.HasAncestorNode('FORM')){A.AddSeparator();A.AddItem('Form',FCKLang.FormProp,48);}}};case 'Checkbox':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='checkbox'){A.AddSeparator();A.AddItem('Checkbox',FCKLang.CheckboxProp,49);}}};case 'Radio':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='radio'){A.AddSeparator();A.AddItem('Radio',FCKLang.RadioButtonProp,50);}}};case 'TextField':return {AddItems:function(A,B,C){if (C=='INPUT'&&(B.type=='text'||B.type=='password')){A.AddSeparator();A.AddItem('TextField',FCKLang.TextFieldProp,51);}}};case 'HiddenField':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='hidden'){A.AddSeparator();A.AddItem('HiddenField',FCKLang.HiddenFieldProp,56);}}};case 'ImageButton':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='image'){A.AddSeparator();A.AddItem('ImageButton',FCKLang.ImageButtonProp,55);}}};case 'Button':return {AddItems:function(A,B,C){if (C=='INPUT'&&(B.type=='button'||B.type=='submit'||B.type=='reset')){A.AddSeparator();A.AddItem('Button',FCKLang.ButtonProp,54);}}};case 'Select':return {AddItems:function(A,B,C){if (C=='SELECT'){A.AddSeparator();A.AddItem('Select',FCKLang.SelectionFieldProp,53);}}};case 'Textarea':return {AddItems:function(A,B,C){if (C=='TEXTAREA'){A.AddSeparator();A.AddItem('Textarea',FCKLang.TextareaProp,52);}}};case 'BulletedList':return {AddItems:function(A,B,C){if (FCKSelection.HasAncestorNode('UL')){A.AddSeparator();A.AddItem('BulletedList',FCKLang.BulletedListProp,27);}}};case 'NumberedList':return {AddItems:function(A,B,C){if (FCKSelection.HasAncestorNode('OL')){A.AddSeparator();A.AddItem('NumberedList',FCKLang.NumberedListProp,26);}}};}};function FCK_ContextMenu_OnBeforeOpen(){FCK.Focus();FCK.Events.FireEvent("OnSelectionChange");var oTag,sTagName;if (oTag=FCKSelection.GetSelectedElement()) sTagName=oTag.tagName;var oMenu=FCK.ContextMenu._InnerContextMenu;oMenu.RemoveAllItems();var aListeners=FCK.ContextMenu.Listeners;for (var i=0;i<aListeners.length;i++) aListeners[i].AddItems(oMenu,oTag,sTagName);};function FCK_ContextMenu_OnItemClick(item){FCKCommands.GetCommand(item.Name).Execute();} 
add: FCK.ContextMenu=new Object();FCK.ContextMenu.Listeners=new Array();FCK.ContextMenu.RegisterListener=function(A){if (A) this.Listeners.push(A);};function FCK_ContextMenu_Init(){var oInnerContextMenu=FCK.ContextMenu._InnerContextMenu=new FCKContextMenu(FCKBrowserInfo.IsIE?window:window.parent,FCK.EditorWindow,FCKLang.Dir);oInnerContextMenu.OnBeforeOpen=FCK_ContextMenu_OnBeforeOpen;oInnerContextMenu.OnItemClick=FCK_ContextMenu_OnItemClick;var oMenu=FCK.ContextMenu;for (var i=0;i<FCKConfig.ContextMenu.length;i++) oMenu.RegisterListener(FCK_ContextMenu_GetListener(FCKConfig.ContextMenu[i]));};function FCK_ContextMenu_GetListener(listenerName){switch (listenerName){case 'Generic':return {AddItems:function(A,B,C){A.AddItem('Cut',FCKLang.Cut,7,FCKCommands.GetCommand('Cut').GetState()==FCK_TRISTATE_DISABLED);A.AddItem('Copy',FCKLang.Copy,8,FCKCommands.GetCommand('Copy').GetState()==FCK_TRISTATE_DISABLED);A.AddItem('Paste',FCKLang.Paste,9,FCKCommands.GetCommand('Paste').GetState()==FCK_TRISTATE_DISABLED);}};case 'Table':return {AddItems:function(A,B,C){var D=(C=='TABLE');var E=(!D&&FCKSelection.HasAncestorNode('TABLE'));if (E){A.AddSeparator();var F=A.AddItem('Cell',FCKLang.CellCM);F.AddItem('TableInsertCell',FCKLang.InsertCell,58);F.AddItem('TableDeleteCells',FCKLang.DeleteCells,59);F.AddItem('TableMergeCells',FCKLang.MergeCells,60);F.AddItem('TableSplitCell',FCKLang.SplitCell,61);F.AddSeparator();F.AddItem('TableCellProp',FCKLang.CellProperties,57);A.AddSeparator();F=A.AddItem('Row',FCKLang.RowCM);F.AddItem('TableInsertRow',FCKLang.InsertRow,62);F.AddItem('TableDeleteRows',FCKLang.DeleteRows,63);A.AddSeparator();F=A.AddItem('Column',FCKLang.ColumnCM);F.AddItem('TableInsertColumn',FCKLang.InsertColumn,64);F.AddItem('TableDeleteColumns',FCKLang.DeleteColumns,65);};if (D||E){A.AddSeparator();A.AddItem('TableDelete',FCKLang.TableDelete);A.AddItem('TableProp',FCKLang.TableProperties,39);}}};case 'Link':return {AddItems:function(A,B,C){if (FCK.GetNamedCommandState('Unlink')!=FCK_TRISTATE_DISABLED){A.AddSeparator();A.AddItem('Link',FCKLang.EditLink,34);A.AddItem('Unlink',FCKLang.RemoveLink,35);}}};case 'Image':return {AddItems:function(A,B,C){if (C=='IMG'&&!B.getAttribute('_fckfakelement')){A.AddSeparator();A.AddItem('Image',FCKLang.ImageProperties,37);}}};case 'Anchor':return {AddItems:function(A,B,C){if (C=='IMG'&&B.getAttribute('_fckanchor')){A.AddSeparator();A.AddItem('Anchor',FCKLang.AnchorProp,36);}}};case 'Flash':return {AddItems:function(A,B,C){if (C=='IMG'&&B.getAttribute('_fckflash')){A.AddSeparator();A.AddItem('Flash',FCKLang.FlashProperties,38);}}};case 'Form':return {AddItems:function(A,B,C){if (FCKSelection.HasAncestorNode('FORM')){A.AddSeparator();A.AddItem('Form',FCKLang.FormProp,48);}}};case 'Checkbox':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='checkbox'){A.AddSeparator();A.AddItem('Checkbox',FCKLang.CheckboxProp,49);}}};case 'Radio':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='radio'){A.AddSeparator();A.AddItem('Radio',FCKLang.RadioButtonProp,50);}}};case 'TextField':return {AddItems:function(A,B,C){if (C=='INPUT'&&(B.type=='text'||B.type=='password')){A.AddSeparator();A.AddItem('TextField',FCKLang.TextFieldProp,51);}}};case 'HiddenField':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='hidden'){A.AddSeparator();A.AddItem('HiddenField',FCKLang.HiddenFieldProp,56);}}};case 'ImageButton':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='image'){A.AddSeparator();A.AddItem('ImageButton',FCKLang.ImageButtonProp,55);}}};case 'Button':return {AddItems:function(A,B,C){if (C=='INPUT'&&(B.type=='button'||B.type=='submit'||B.type=='reset')){A.AddSeparator();A.AddItem('Button',FCKLang.ButtonProp,54);}}};case 'Select':return {AddItems:function(A,B,C){if (C=='SELECT'){A.AddSeparator();A.AddItem('Select',FCKLang.SelectionFieldProp,53);}}};case 'Textarea':return {AddItems:function(A,B,C){if (C=='TEXTAREA'){A.AddSeparator();A.AddItem('Textarea',FCKLang.TextareaProp,52);}}};case 'BulletedList':return {AddItems:function(A,B,C){if (FCKSelection.HasAncestorNode('UL')){A.AddSeparator();A.AddItem('BulletedList',FCKLang.BulletedListProp,27);}}};case 'NumberedList':return {AddItems:function(A,B,C){if (FCKSelection.HasAncestorNode('OL')){A.AddSeparator();A.AddItem('NumberedList',FCKLang.NumberedListProp,26);}}};}};function FCK_ContextMenu_OnBeforeOpen(){FCK.Events.FireEvent("OnSelectionChange");var oTag,sTagName;if (oTag=FCKSelection.GetSelectedElement()) sTagName=oTag.tagName;var oMenu=FCK.ContextMenu._InnerContextMenu;oMenu.RemoveAllItems();var aListeners=FCK.ContextMenu.Listeners;for (var i=0;i<aListeners.length;i++) aListeners[i].AddItems(oMenu,oTag,sTagName);};function FCK_ContextMenu_OnItemClick(item){FCK.Focus();FCKCommands.GetCommand(item.Name).Execute();} 
context: FCK.ContextMenu=new Object();FCK.ContextMenu.Listeners=new Array();FCK.ContextMenu.RegisterListener=function(A){if (A) this.Listeners.push(A);};function FCK_ContextMenu_Init(){var oInnerContextMenu=FCK.ContextMenu._InnerContextMenu=new FCKContextMenu(FCKBrowserInfo.IsIE?window:window.parent,FCK.EditorWindow,FCKLang.Dir);oInnerContextMenu.OnBeforeOpen=FCK_ContextMenu_OnBeforeOpen;oInnerContextMenu.OnItemClick=FCK_ContextMenu_OnItemClick;var oMenu=FCK.ContextMenu;for (var i=0;i<FCKConfig.ContextMenu.length;i++) oMenu.RegisterListener(FCK_ContextMenu_GetListener(FCKConfig.ContextMenu[i]));};function FCK_ContextMenu_GetListener(listenerName){switch (listenerName){case 'Generic':return {AddItems:function(A,B,C){A.AddItem('Cut',FCKLang.Cut,7,FCKCommands.GetCommand('Cut').GetState()==FCK_TRISTATE_DISABLED);A.AddItem('Copy',FCKLang.Copy,8,FCKCommands.GetCommand('Copy').GetState()==FCK_TRISTATE_DISABLED);A.AddItem('Paste',FCKLang.Paste,9,FCKCommands.GetCommand('Paste').GetState()==FCK_TRISTATE_DISABLED);}};case 'Table':return {AddItems:function(A,B,C){var D=(C=='TABLE');var E=(!D&&FCKSelection.HasAncestorNode('TABLE'));if (E){A.AddSeparator();var F=A.AddItem('Cell',FCKLang.CellCM);F.AddItem('TableInsertCell',FCKLang.InsertCell,58);F.AddItem('TableDeleteCells',FCKLang.DeleteCells,59);F.AddItem('TableMergeCells',FCKLang.MergeCells,60);F.AddItem('TableSplitCell',FCKLang.SplitCell,61);F.AddSeparator();F.AddItem('TableCellProp',FCKLang.CellProperties,57);A.AddSeparator();F=A.AddItem('Row',FCKLang.RowCM);F.AddItem('TableInsertRow',FCKLang.InsertRow,62);F.AddItem('TableDeleteRows',FCKLang.DeleteRows,63);A.AddSeparator();F=A.AddItem('Column',FCKLang.ColumnCM);F.AddItem('TableInsertColumn',FCKLang.InsertColumn,64);F.AddItem('TableDeleteColumns',FCKLang.DeleteColumns,65);};if (D||E){A.AddSeparator();A.AddItem('TableDelete',FCKLang.TableDelete);A.AddItem('TableProp',FCKLang.TableProperties,39);}}};case 'Link':return {AddItems:function(A,B,C){if (FCK.GetNamedCommandState('Unlink')!=FCK_TRISTATE_DISABLED){A.AddSeparator();A.AddItem('Link',FCKLang.EditLink,34);A.AddItem('Unlink',FCKLang.RemoveLink,35);}}};case 'Image':return {AddItems:function(A,B,C){if (C=='IMG'&&!B.getAttribute('_fckfakelement')){A.AddSeparator();A.AddItem('Image',FCKLang.ImageProperties,37);}}};case 'Anchor':return {AddItems:function(A,B,C){if (C=='IMG'&&B.getAttribute('_fckanchor')){A.AddSeparator();A.AddItem('Anchor',FCKLang.AnchorProp,36);}}};case 'Flash':return {AddItems:function(A,B,C){if (C=='IMG'&&B.getAttribute('_fckflash')){A.AddSeparator();A.AddItem('Flash',FCKLang.FlashProperties,38);}}};case 'Form':return {AddItems:function(A,B,C){if (FCKSelection.HasAncestorNode('FORM')){A.AddSeparator();A.AddItem('Form',FCKLang.FormProp,48);}}};case 'Checkbox':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='checkbox'){A.AddSeparator();A.AddItem('Checkbox',FCKLang.CheckboxProp,49);}}};case 'Radio':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='radio'){A.AddSeparator();A.AddItem('Radio',FCKLang.RadioButtonProp,50);}}};case 'TextField':return {AddItems:function(A,B,C){if (C=='INPUT'&&(B.type=='text'||B.type=='password')){A.AddSeparator();A.AddItem('TextField',FCKLang.TextFieldProp,51);}}};case 'HiddenField':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='hidden'){A.AddSeparator();A.AddItem('HiddenField',FCKLang.HiddenFieldProp,56);}}};case 'ImageButton':return {AddItems:function(A,B,C){if (C=='INPUT'&&B.type=='image'){A.AddSeparator();A.AddItem('ImageButton',FCKLang.ImageButtonProp,55);}}};case 'Button':return {AddItems:function(A,B,C){if (C=='INPUT'&&(B.type=='button'||B.type=='submit'||B.type=='reset')){A.AddSeparator();A.AddItem('Button',FCKLang.ButtonProp,54);}}};case 'Select':return {AddItems:function(A,B,C){if (C=='SELECT'){A.AddSeparator();A.AddItem('Select',FCKLang.SelectionFieldProp,53);}}};case 'Textarea':return {AddItems:function(A,B,C){if (C=='TEXTAREA'){A.AddSeparator();A.AddItem('Textarea',FCKLang.TextareaProp,52);}}};case 'BulletedList':return {AddItems:function(A,B,C){if (FCKSelection.HasAncestorNode('UL')){A.AddSeparator();A.AddItem('BulletedList',FCKLang.BulletedListProp,27);}}};case 'NumberedList':return {AddItems:function(A,B,C){if (FCKSelection.HasAncestorNode('OL')){A.AddSeparator();A.AddItem('NumberedList',FCKLang.NumberedListProp,26);}}};}};function FCK_ContextMenu_OnBeforeOpen(){FCK.Focus();FCK.Events.FireEvent("OnSelectionChange");var oTag,sTagName;if (oTag=FCKSelection.GetSelectedElement()) sTagName=oTag.tagName;var oMenu=FCK.ContextMenu._InnerContextMenu;oMenu.RemoveAllItems();var aListeners=FCK.ContextMenu.Listeners;for (var i=0;i<aListeners.length;i++) aListeners[i].AddItems(oMenu,oTag,sTagName);};function FCK_ContextMenu_OnItemClick(item){FCKCommands.GetCommand(item.Name).Execute();}
meta: 4958	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4958/6b9d6c2501f7b42b27415777c9ca21fcad5d776a/fckeditorcode_gecko.js/buggy/ext_scripts/FCKeditor/editor/js/fckeditorcode_gecko.js