rem: var FCKMenuItem=function(A,B,C,D,E){this.Name=A;this.Label=B||A;this.IsDisabled=D;this.Dir=E||'ltr';this.Icon=new FCKIcon(C);this.Items=new FCKMenuBlock(E);if (FCK.IECleanup) FCK.IECleanup.AddItem(this,this._Cleanup);};FCKMenuItem.prototype.AddItem=function(A,B,C,D){if (this.Items){if (this.OnClick) this.Items.OnItemClick=this.OnClick;};var E=this.Items.AddItem(A,B,C,D,this.Dir);if (this._FCKMenuBlock) E._FCKMenuBlock=this._FCKMenuBlock;return E;};FCKMenuItem.prototype.AddSeparator=function(){this.Items.AddSeparator();};FCKMenuItem.prototype.Create=function(A){var B=A.ownerDocument;var r=this.MainElement=A.insertRow(-1);r.className=this.IsDisabled?'MN_Item_Disabled':'MN_Item';r._FCKMenuItem=this;if (!this.IsDisabled){r.onmouseover=FCKMenuItem_OnMouseOver;r.onmouseout=FCKMenuItem_OnMouseOut;r.onclick=FCKMenuItem_OnClick;};var C=r.insertCell(-1);C.className='MN_Icon';C.appendChild(this.Icon.CreateIconElement(B));C=r.insertCell(-1);C.className='MN_Label';C.noWrap=true;C.appendChild(B.createTextNode(this.Label));C=r.insertCell(-1);if (this.Items.Items.length>0){C.className='MN_Arrow';var D=C.appendChild(B.createElement('IMG'));D.src=FCK_IMAGES_PATH+'arrow_'+this.Dir+'.gif';D.width=4;D.height=7;var E;if (!FCKBrowserInfo.IsIE&&this.Panel) E=this.Panel._Window;else E=FCKTools.GetParentWindow(B);var F=this.ItemsPanel=new FCKPanel(E,true);F.EnableContextMenu(false);F.SetDirection(this.Dir);F.AppendStyleSheet(FCKConfig.SkinPath+'fck_editor.css');if (!FCKBrowserInfo.IsIE){F._FCKMenuItem=this;F.OnHide=FCKMenuItem_ItemsPanel_OnHide;};this.Items.Panel=F;this.Items.Create(F.MainNode);}};FCKMenuItem.prototype._Cleanup=function(){if (this.MainElement){this.MainElement._FCKMenuItem=null;}};function FCKMenuItem_ItemsPanel_OnHide(){var oPanel=this._FCKMenuItem.Panel;if (oPanel){oPanel.CanHide=true;oPanel.Hide(true);}};function FCKMenuItem_OnMouseOver(){this.className='MN_Item_Over';};function FCKMenuItem_OnMouseOut(){this.className='MN_Item';};function FCKMenuItem_OnClick(){var oMenuItem=this._FCKMenuItem;if (oMenuItem.ItemsPanel){if (oMenuItem.Panel) oMenuItem.Panel.CanHide=false;oMenuItem.ItemsPanel.Show(oMenuItem.MainElement.offsetWidth+2,-2,oMenuItem.MainElement);}else{this.className='MN_Item';if (oMenuItem.OnClick) oMenuItem.OnClick(oMenuItem);}} 
add: var FCKMenuItem=function(A,B,C,D,E){this.Name=B;this.Label=C||B;this.IsDisabled=E;this.Icon=new FCKIcon(D);this.SubMenu=new FCKMenuBlockPanel();this.SubMenu.Parent=A;this.SubMenu.OnClick=FCKTools.CreateEventListener(FCKMenuItem_SubMenu_OnClick,this);if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKMenuItem_Cleanup);};FCKMenuItem.prototype.AddItem=function(A,B,C,D){this.HasSubMenu=true;return this.SubMenu.AddItem(A,B,C,D);};FCKMenuItem.prototype.AddSeparator=function(){this.SubMenu.AddSeparator();};FCKMenuItem.prototype.Create=function(A){var B=this.HasSubMenu;var C=FCKTools.GetElementDocument(A);var r=this.MainElement=A.insertRow(-1);r.className=this.IsDisabled?'MN_Item_Disabled':'MN_Item';if (!this.IsDisabled){FCKTools.AddEventListenerEx(r,'mouseover',FCKMenuItem_OnMouseOver,[this]);FCKTools.AddEventListenerEx(r,'click',FCKMenuItem_OnClick,[this]);if (!B) FCKTools.AddEventListenerEx(r,'mouseout',FCKMenuItem_OnMouseOut,[this]);};var D=r.insertCell(-1);D.className='MN_Icon';D.appendChild(this.Icon.CreateIconElement(C));D=r.insertCell(-1);D.className='MN_Label';D.noWrap=true;D.appendChild(C.createTextNode(this.Label));D=r.insertCell(-1);if (B){D.className='MN_Arrow';var E=D.appendChild(C.createElement('IMG'));E.src=FCK_IMAGES_PATH+'arrow_'+FCKLang.Dir+'.gif';E.width=4;E.height=7;this.SubMenu.Create();this.SubMenu.Panel.OnHide=FCKTools.CreateEventListener(FCKMenuItem_SubMenu_OnHide,this);}};FCKMenuItem.prototype.Activate=function(){this.MainElement.className='MN_Item_Over';if (this.HasSubMenu){this.SubMenu.Show(this.MainElement.offsetWidth+2,-2,this.MainElement);};FCKTools.RunFunction(this.OnActivate,this);};FCKMenuItem.prototype.Deactivate=function(){this.MainElement.className='MN_Item';if (this.HasSubMenu) this.SubMenu.Hide();};/* Events */ function FCKMenuItem_SubMenu_OnClick(clickedItem,listeningItem){FCKTools.RunFunction(listeningItem.OnClick,listeningItem,[clickedItem]);};function FCKMenuItem_SubMenu_OnHide(menuItem){menuItem.Deactivate();};function FCKMenuItem_OnClick(ev,menuItem){if (menuItem.HasSubMenu) menuItem.Activate();else{menuItem.Deactivate();FCKTools.RunFunction(menuItem.OnClick,menuItem,[menuItem]);}};function FCKMenuItem_OnMouseOver(ev,menuItem){menuItem.Activate();};function FCKMenuItem_OnMouseOut(ev,menuItem){menuItem.Deactivate();};function FCKMenuItem_Cleanup(){this.MainElement=null;} 
context: var FCKMenuItem=function(A,B,C,D,E){this.Name=A;this.Label=B||A;this.IsDisabled=D;this.Dir=E||'ltr';this.Icon=new FCKIcon(C);this.Items=new FCKMenuBlock(E);if (FCK.IECleanup) FCK.IECleanup.AddItem(this,this._Cleanup);};FCKMenuItem.prototype.AddItem=function(A,B,C,D){if (this.Items){if (this.OnClick) this.Items.OnItemClick=this.OnClick;};var E=this.Items.AddItem(A,B,C,D,this.Dir);if (this._FCKMenuBlock) E._FCKMenuBlock=this._FCKMenuBlock;return E;};FCKMenuItem.prototype.AddSeparator=function(){this.Items.AddSeparator();};FCKMenuItem.prototype.Create=function(A){var B=A.ownerDocument;var r=this.MainElement=A.insertRow(-1);r.className=this.IsDisabled?'MN_Item_Disabled':'MN_Item';r._FCKMenuItem=this;if (!this.IsDisabled){r.onmouseover=FCKMenuItem_OnMouseOver;r.onmouseout=FCKMenuItem_OnMouseOut;r.onclick=FCKMenuItem_OnClick;};var C=r.insertCell(-1);C.className='MN_Icon';C.appendChild(this.Icon.CreateIconElement(B));C=r.insertCell(-1);C.className='MN_Label';C.noWrap=true;C.appendChild(B.createTextNode(this.Label));C=r.insertCell(-1);if (this.Items.Items.length>0){C.className='MN_Arrow';var D=C.appendChild(B.createElement('IMG'));D.src=FCK_IMAGES_PATH+'arrow_'+this.Dir+'.gif';D.width=4;D.height=7;var E;if (!FCKBrowserInfo.IsIE&&this.Panel) E=this.Panel._Window;else E=FCKTools.GetParentWindow(B);var F=this.ItemsPanel=new FCKPanel(E,true);F.EnableContextMenu(false);F.SetDirection(this.Dir);F.AppendStyleSheet(FCKConfig.SkinPath+'fck_editor.css');if (!FCKBrowserInfo.IsIE){F._FCKMenuItem=this;F.OnHide=FCKMenuItem_ItemsPanel_OnHide;};this.Items.Panel=F;this.Items.Create(F.MainNode);}};FCKMenuItem.prototype._Cleanup=function(){if (this.MainElement){this.MainElement._FCKMenuItem=null;}};function FCKMenuItem_ItemsPanel_OnHide(){var oPanel=this._FCKMenuItem.Panel;if (oPanel){oPanel.CanHide=true;oPanel.Hide(true);}};function FCKMenuItem_OnMouseOver(){this.className='MN_Item_Over';};function FCKMenuItem_OnMouseOut(){this.className='MN_Item';};function FCKMenuItem_OnClick(){var oMenuItem=this._FCKMenuItem;if (oMenuItem.ItemsPanel){if (oMenuItem.Panel) oMenuItem.Panel.CanHide=false;oMenuItem.ItemsPanel.Show(oMenuItem.MainElement.offsetWidth+2,-2,oMenuItem.MainElement);}else{this.className='MN_Item';if (oMenuItem.OnClick) oMenuItem.OnClick(oMenuItem);}}
meta: 4958	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4958/6b9d6c2501f7b42b27415777c9ca21fcad5d776a/fckeditorcode_ie.js/buggy/ext_scripts/FCKeditor/editor/js/fckeditorcode_ie.js