rem: var FCKMenuBlock=function(A){this.Dir=A||'ltr';this.Items=new Array();if (FCK.IECleanup) FCK.IECleanup.AddItem(this,this._Cleanup);};FCKMenuBlock.prototype.AddItem=function(A,B,C,D){if (typeof(C)=='number') C=[FCKConfig.SkinPath+'fck_strip.gif',16,C];var E=new FCKMenuItem(A,B,C,D,this.Dir);E.Dir=this.Dir;E._FCKMenuBlock=this;E.OnClick=FCKMenuBlock_OnItemClick;this.Items[this.Items.length]=E;return E;};FCKMenuBlock.prototype.AddSeparator=function(){this.Items[this.Items.length]=new FCKMenuSeparator();};FCKMenuBlock.prototype.RemoveAllItems=function(){this.Items=new Array();};FCKMenuBlock.prototype.Create=function(A){if (this.MainElement){this.MainElement.parentNode.removeChild(this.MainElement);this._Cleanup();};var B=A.ownerDocument;var C=B.createElement('table');C.dir=this.Dir;C.cellPadding=0;C.cellSpacing=0;var D=this.MainElement=C.insertRow(-1).insertCell(-1);D.className='MN_Menu';var E=D.appendChild(B.createElement('table'));E.cellPadding=0;E.cellSpacing=0;for (var i=0;i<this.Items.length;i++){var F=this.Items[i];if (this.Panel) F.Panel=this.Panel;F.Create(E);};A.appendChild(C);FCKTools.DisableSelection(C);};FCKMenuBlock.prototype._Cleanup=function(){this.MainElement=null;};function FCKMenuBlock_OnItemClick(menuItem){var oMenuBlock=menuItem._FCKMenuBlock;if (oMenuBlock.OnItemClick) oMenuBlock.OnItemClick(oMenuBlock,menuItem);};var FCKMenuSeparator=function(){};FCKMenuSeparator.prototype.Create=function(A){var B=A.ownerDocument;var r=A.insertRow(-1);var C=r.insertCell(-1);C.className='MN_Separator MN_Icon';C=r.insertCell(-1);C.className='MN_Separator';C.appendChild(B.createElement('DIV')).className='MN_Separator_Line';C=r.insertCell(-1);C.className='MN_Separator';C.appendChild(B.createElement('DIV')).className='MN_Separator_Line';} 
add: var FCKMenuBlock=function(){this._Items=new Array();};FCKMenuBlock.prototype.AddItem=function(A,B,C,D){var E=new FCKMenuItem(this,A,B,C,D);E.OnClick=FCKTools.CreateEventListener(FCKMenuBlock_Item_OnClick,this);E.OnActivate=FCKTools.CreateEventListener(FCKMenuBlock_Item_OnActivate,this);this._Items.push(E);return E;};FCKMenuBlock.prototype.AddSeparator=function(){this._Items.push(new FCKMenuSeparator());};FCKMenuBlock.prototype.RemoveAllItems=function(){this._Items=new Array();var A=this._ItemsTable;if (A){while (A.rows.length>0) A.deleteRow(0);}};FCKMenuBlock.prototype.Create=function(A){if (!this._ItemsTable){if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKMenuBlock_Cleanup);this._Window=FCKTools.GetElementWindow(A);var B=FCKTools.GetElementDocument(A);var C=A.appendChild(B.createElement('table'));C.cellPadding=0;C.cellSpacing=0;FCKTools.DisableSelection(C);var D=C.insertRow(-1).insertCell(-1);D.className='MN_Menu';var E=this._ItemsTable=D.appendChild(B.createElement('table'));E.cellPadding=0;E.cellSpacing=0;};for (var i=0;i<this._Items.length;i++) this._Items[i].Create(this._ItemsTable);};/* Events */ function FCKMenuBlock_Item_OnClick(clickedItem,menuBlock){FCKTools.RunFunction(menuBlock.OnClick,menuBlock,[clickedItem]);};function FCKMenuBlock_Item_OnActivate(menuBlock){var oActiveItem=menuBlock._ActiveItem;if (oActiveItem&&oActiveItem!=this){if (!FCKBrowserInfo.IsIE&&oActiveItem.HasSubMenu&&!this.HasSubMenu) menuBlock._Window.focus();oActiveItem.Deactivate();};menuBlock._ActiveItem=this;};function FCKMenuBlock_Cleanup(){this._Window=null;this._ItemsTable=null;};var FCKMenuSeparator=function(){};FCKMenuSeparator.prototype.Create=function(A){var B=FCKTools.GetElementDocument(A);var r=A.insertRow(-1);var C=r.insertCell(-1);C.className='MN_Separator MN_Icon';C=r.insertCell(-1);C.className='MN_Separator';C.appendChild(B.createElement('DIV')).className='MN_Separator_Line';C=r.insertCell(-1);C.className='MN_Separator';C.appendChild(B.createElement('DIV')).className='MN_Separator_Line';} 
context: var FCKMenuBlock=function(A){this.Dir=A||'ltr';this.Items=new Array();if (FCK.IECleanup) FCK.IECleanup.AddItem(this,this._Cleanup);};FCKMenuBlock.prototype.AddItem=function(A,B,C,D){if (typeof(C)=='number') C=[FCKConfig.SkinPath+'fck_strip.gif',16,C];var E=new FCKMenuItem(A,B,C,D,this.Dir);E.Dir=this.Dir;E._FCKMenuBlock=this;E.OnClick=FCKMenuBlock_OnItemClick;this.Items[this.Items.length]=E;return E;};FCKMenuBlock.prototype.AddSeparator=function(){this.Items[this.Items.length]=new FCKMenuSeparator();};FCKMenuBlock.prototype.RemoveAllItems=function(){this.Items=new Array();};FCKMenuBlock.prototype.Create=function(A){if (this.MainElement){this.MainElement.parentNode.removeChild(this.MainElement);this._Cleanup();};var B=A.ownerDocument;var C=B.createElement('table');C.dir=this.Dir;C.cellPadding=0;C.cellSpacing=0;var D=this.MainElement=C.insertRow(-1).insertCell(-1);D.className='MN_Menu';var E=D.appendChild(B.createElement('table'));E.cellPadding=0;E.cellSpacing=0;for (var i=0;i<this.Items.length;i++){var F=this.Items[i];if (this.Panel) F.Panel=this.Panel;F.Create(E);};A.appendChild(C);FCKTools.DisableSelection(C);};FCKMenuBlock.prototype._Cleanup=function(){this.MainElement=null;};function FCKMenuBlock_OnItemClick(menuItem){var oMenuBlock=menuItem._FCKMenuBlock;if (oMenuBlock.OnItemClick) oMenuBlock.OnItemClick(oMenuBlock,menuItem);};var FCKMenuSeparator=function(){};FCKMenuSeparator.prototype.Create=function(A){var B=A.ownerDocument;var r=A.insertRow(-1);var C=r.insertCell(-1);C.className='MN_Separator MN_Icon';C=r.insertCell(-1);C.className='MN_Separator';C.appendChild(B.createElement('DIV')).className='MN_Separator_Line';C=r.insertCell(-1);C.className='MN_Separator';C.appendChild(B.createElement('DIV')).className='MN_Separator_Line';}
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