Index: branches/RC/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_2.js =================================================================== diff -u -N --- branches/RC/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_2.js (revision 8929) +++ branches/RC/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_2.js (revision 0) @@ -1,54 +0,0 @@ -/* - * 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/ - * - * This file has been compacted for best loading performance. - */ -FCK.RedirectNamedCommands=new Object();var oWindow=new Object();FCK.ExecuteNamedCommand=function(commandName,commandParameter){if (FCK.RedirectNamedCommands[commandName]!=null) {FCK.ExecuteRedirectedNamedCommand(commandName,commandParameter);}else{FCK.Focus();FCK.EditorDocument.execCommand(commandName,false,commandParameter);FCK.Events.FireEvent('OnSelectionChange');};};FCK.GetNamedCommandState=function(commandName){try{if (commandName=='InsertHorizontalRule') return FCK_TRISTATE_OFF;if (!FCK.EditorDocument.queryCommandEnabled(commandName)) return FCK_TRISTATE_DISABLED;else {switch (commandName){case 'Unlink':oLink=FCK.Selection.MoveToAncestorNode('A');if (oLink) return FCK.EditorDocument.queryCommandState(commandName)?FCK_TRISTATE_ON:FCK_TRISTATE_OFF;else return FCK_TRISTATE_DISABLED;break;default:return FCK.EditorDocument.queryCommandState(commandName)?FCK_TRISTATE_ON:FCK_TRISTATE_OFF;};};}catch (e){return FCK_TRISTATE_OFF;};};FCK.GetNamedCommandValue=function(commandName){var sValue='';var eState=FCK.GetNamedCommandState(commandName);if (eState==FCK_TRISTATE_DISABLED) return null;try{sValue=this.EditorDocument.queryCommandValue(commandName);}catch(e) {};return sValue?sValue:'';};FCK.CleanAndPaste=function(html){html=html.replace(/<\/?SPAN[^>]*>/gi,"");html=html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<\\?\?xml[^>]*>/gi,"");html=html.replace(/<\/?\w+:[^>]*>/gi,"");FCK.InsertHtml(html);};FCK.Preview=function(){if (typeof(FCKConfig.template_name)!='undefined'&&FCKConfig.template_name!=''){oWindow=window.open(FCKConfig.ProjectPath+'/index.php?t='+FCKConfig.template_name+'&cmseditor=1','prewiev','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');if (FCKBrowserInfo.IsIE) {oWindow.attachEvent("onload",FCK.SetPreview);}else oWindow.addEventListener('load',FCK.SetPreview,true);return;}else {if (typeof(FCKConfig.preview_width)!='undefined'&&typeof(FCKConfig.preview_height)!='undefined'&&FCKConfig.preview_width>0&&FCKConfig.preview_height>0) var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+FCKConfig.preview_width+',height='+FCKConfig.preview_height);else var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML=''+FCK.GetHTML()+'';oWindowE.document.write(sHTML);oWindowE.document.close();};};FCK.SetPreview = function(){var block_name='block_';if(typeof(FCKConfig.block_name) != 'undefined')block_name=FCKConfig.block_name;oWindow.document.getElementById(block_name+FCKConfig.block_id).innerHTML=FCK.GetHTML();};FCK.SwitchEditMode=function(){var bWYSIWYG=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=bWYSIWYG?'none':'';document.getElementById('eSource').style.display=bWYSIWYG?'':'none';if (bWYSIWYG) document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=bWYSIWYG?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;FCK.Focus();};FCK.CreateElement=function(tag){var e=FCK.EditorDocument.createElement(tag);return FCK.InsertElementAndGetIt(e);};FCK.InsertElementAndGetIt=function(e){e.setAttribute('__FCKTempLabel',1);this.InsertElement(e);var aEls=FCK.EditorDocument.getElementsByTagName(e.tagName);for (var i=0;i]* class="?MsoNormal"?/gi;if (re.test(sHTML)){if (confirm(FCKLang["PasteWordConfirm"])){FCK.CleanAndPaste(sHTML);return false;};};}else return true;};FCK.InsertHtml=function(html){var oSel=FCKSelection.Delete();var oRange=oSel.getRangeAt(0);var oFragment=oRange.createContextualFragment(html);var oLastNode=oFragment.lastChild;oRange.insertNode(oFragment);oRange.setEndAfter(oLastNode);oRange.setStartAfter(oLastNode);oSel.removeAllRanges();oSel=FCK.EditorWindow.getSelection();this.Focus();};FCK.InsertElement=function(element){var oSel=FCKSelection.Delete();var oRange=oSel.getRangeAt(0);oRange.insertNode(element);oRange.setEndAfter(element);oRange.setStartAfter(element);this.Focus();};FCK.PasteAsPlainText=function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteAsText,'dialog/fck_paste.html',400,330,'PlainText');};FCK.PasteFromWord=function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');};FCK.GetClipboardHTML=function(){return '';};FCK.CreateLink=function(url){FCK.ExecuteNamedCommand('Unlink');if (url.length>0){var sTempUrl='javascript:void(0);/*'+(new Date().getTime())+'*/';FCK.ExecuteNamedCommand('CreateLink',sTempUrl);var oLink=document.evaluate("//a[@href='"+sTempUrl+"']",this.EditorDocument.body,null,9,null).singleNodeValue;if (oLink){oLink.href=url;return oLink;};};}; -var FCKSelection=new Object();FCK.Selection=FCKSelection; -FCKSelection.GetType=function(){this._Type='Text';var oSel=FCK.EditorWindow.getSelection();if (oSel&&oSel.rangeCount==1){var oRange=oSel.getRangeAt(0);if (oRange.startContainer==oRange.endContainer&&(oRange.endOffset-oRange.startOffset)==1) this._Type='Control';};return this._Type;};FCKSelection.GetSelectedElement=function(){if (this.GetType()=='Control'){var oSel=FCK.EditorWindow.getSelection();return oSel.anchorNode.childNodes[oSel.anchorOffset];};};FCKSelection.GetParentElement=function(){if (this.GetType()=='Control') return FCKSelection.GetSelectedElement().parentElement;else{var oSel=FCK.EditorWindow.getSelection();if (oSel){var oNode=oSel.anchorNode;while (oNode&&oNode.nodeType!=1) oNode=oNode.parentNode;return oNode;};};};FCKSelection.MoveToNode=function(node){var oSel=FCK.EditorWindow.getSelection();for (i=oSel.rangeCount-1;i>=0;i--){if (i==0) oSel.getRangeAt(i).selectNodeContents(node);else oSel.removeRange(oSel.getRangeAt(i));};};FCKSelection.HasAncestorNode=function(nodeTagName){var oContainer=this.GetSelectedElement();if (!oContainer&&FCK.EditorWindow){try { oContainer=FCK.EditorWindow.getSelection().getRangeAt(0).startContainer;}catch(e){};};while (oContainer){if (oContainer.tagName==nodeTagName) return true;oContainer=oContainer.parentNode;};return false;};FCKSelection.MoveToAncestorNode=function(nodeTagName){var oNode;var oContainer=this.GetSelectedElement();if (!oContainer) oContainer=FCK.EditorWindow.getSelection().getRangeAt(0).startContainer;while (oContainer){if (oContainer.tagName==nodeTagName) return oContainer;oContainer=oContainer.parentNode;};};FCKSelection.Delete=function(){var oSel=FCK.EditorWindow.getSelection();for (var i=0;i<\/body><\/html>');this.Document.close();this.Document.body.style.margin=this.Document.body.style.padding='0px';if (this.StyleSheet) FCKTools.AppendStyleSheet(this.Document,this.StyleSheet);this.OuterDiv=this.Document.body.appendChild(this.Document.createElement('DIV'));this.OuterDiv.style.cssFloat='left';this.PanelDiv=this.OuterDiv.appendChild(this.Document.createElement('DIV'));this.PanelDiv.className='FCK_Panel';this.Created=true;};FCKPanel.prototype.Show=function(panelX,panelY,relElement,width,height,autoSize){if (!this.Created) this.Create();if (width!=null&&autoSize&&widththis.Window.innerWidth){panelX-=panelX+this.OuterDiv.offsetWidth-this.Window.innerWidth;};this._IFrame.style.left=panelX+'px';this._IFrame.style.top=panelY+'px';function SetOnClickListener(targetWindow,targetFunction){try{if (targetWindow==null||(targetWindow.frameElement&&targetWindow.frameElement.IsFCKPanel)) return;targetWindow.document.addEventListener('click',targetFunction,false);}catch (e) {};for (var i=0;i=0;i--){var oRow=oTable.rows[i];if (iIndex==0&&oRow.cells.length==1){FCKTableHandler.DeleteRows(oRow);continue;};if (oRow.cells[iIndex]) oRow.removeChild(oRow.cells[iIndex]);};};FCKTableHandler.InsertCell=function(cell){var oCell=cell?cell:FCKSelection.MoveToAncestorNode("TD");if (!oCell) return;var oNewCell=FCK.EditorDocument.createElement("TD");oNewCell.innerHTML=" ";if (oCell.cellIndex==oCell.parentNode.cells.lenght-1){oCell.parentNode.appendChild(oNewCell);}else{oCell.parentNode.insertBefore(oNewCell,oCell.nextSibling);};return oNewCell;};FCKTableHandler.DeleteCell=function(cell){if (cell.parentNode.cells.length==1){FCKTableHandler.DeleteRows(FCKTools.GetElementAscensor(cell,'TR'));return;};cell.parentNode.removeChild(cell);};FCKTableHandler.DeleteCells=function(){var aCells=FCKTableHandler.GetSelectedCells();for (var i=aCells.length-1;i>=0;i--){FCKTableHandler.DeleteCell(aCells[i]);};};FCKTableHandler.MergeCells=function(){var aCells=FCKTableHandler.GetSelectedCells();if (aCells.length<2) return;if (aCells[0].parentNode!=aCells[aCells.length-1].parentNode) return;var iColSpan=isNaN(aCells[0].colSpan)?1:aCells[0].colSpan;var sHtml='';for (var i=aCells.length-1;i>0;i--){iColSpan+=isNaN(aCells[i].colSpan)?1:aCells[i].colSpan;sHtml=aCells[i].innerHTML+sHtml;FCKTableHandler.DeleteCell(aCells[i]);};aCells[0].colSpan=iColSpan;aCells[0].innerHTML+=sHtml;};FCKTableHandler.SplitCell=function(){var aCells=FCKTableHandler.GetSelectedCells();if (aCells.length!=1) return;var aMap=this._CreateTableMap(aCells[0].parentNode.parentNode);var iCellIndex=FCKTableHandler._GetCellIndexSpan(aMap,aCells[0].parentNode.rowIndex,aCells[0]);var aCollCells=this._GetCollumnCells(aMap,iCellIndex);for (var i=0;i1) oNewCell.rowSpan=aCells[0].rowSpan;}else{if (isNaN(aCollCells[i].colSpan)) aCollCells[i].colSpan=2;else aCollCells[i].colSpan+=1;};};};FCKTableHandler._GetCellIndexSpan=function(tableMap,rowIndex,cell){if (tableMap.length';};FCKStyleDef.prototype.GetCloserTag=function(){return '';};FCKStyleDef.prototype.RemoveFromSelection=function(){if (FCKSelection.GetType()=='Control') this._RemoveMe(FCKSelection.GetSelectedElement());else this._RemoveMe(FCKSelection.GetParentElement());} -FCKStyleDef.prototype.ApplyToSelection=function(){if (FCKSelection.GetType()=='Text'&&!this.IsObjectElement){var oSelection=FCK.EditorWindow.getSelection();var e=FCK.EditorDocument.createElement(this.Element);for (var i=0;i');else FCK.ExecuteNamedCommand('FormatBlock','<'+formatName+'>');};FCKFormatBlockCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FormatBlock');};var FCKPreviewCommand=function(){this.Name='Preview';};FCKPreviewCommand.prototype.Execute=function(){FCK.Preview();};FCKPreviewCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSaveCommand=function(){this.Name='Save';};FCKSaveCommand.prototype.Execute=function(){var oForm=FCK.LinkedField.form;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){if (confirm('Are you sure you would like to clear the page?')){FCK.SetHTML(FCKBrowserInfo.IsGecko?' ':'');if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;};};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);} -var FCKSpellCheckCommand=function(){this.Name='SpellCheck';this.IsEnabled=(FCKConfig.SpellChecker=='SpellerPages');};FCKSpellCheckCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_SpellCheck','Spell Check','dialog/fck_spellerpages.html',440,480);};FCKSpellCheckCommand.prototype.GetState=function(){return this.IsEnabled?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;} -var FCKTextColorCommand=function(type){this.Name=type=='ForeColor'?'TextColor':'BGColor';this.Type=type;this._Panel=new FCKPanel();this._Panel.StyleSheet=FCKConfig.SkinPath+'fck_contextmenu.css';this._Panel.Create();this._CreatePanelBody(this._Panel.Document,this._Panel.PanelDiv);};FCKTextColorCommand.prototype.Execute=function(panelX,panelY,relElement){FCK._ActiveColorPanelType=this.Type;this._Panel.Show(panelX,panelY,relElement);};FCKTextColorCommand.prototype.SetColor=function(color){if (FCK._ActiveColorPanelType=='ForeColor') FCK.ExecuteNamedCommand('ForeColor',color);else if (FCKBrowserInfo.IsGecko) FCK.ExecuteNamedCommand('hilitecolor',color);else FCK.ExecuteNamedCommand('BackColor',color);delete FCK._ActiveColorPanelType;};FCKTextColorCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};FCKTextColorCommand.prototype._CreatePanelBody=function(targetDocument,targetDiv){function CreateSelectionDiv(){var oDiv=targetDocument.createElement("DIV");oDiv.className='ColorDeselected';oDiv.onmouseover=function() { this.className='ColorSelected';};oDiv.onmouseout=function() { this.className='ColorDeselected';};return oDiv;};var oTable=targetDiv.appendChild(targetDocument.createElement("TABLE"));oTable.style.tableLayout='fixed';oTable.cellPadding=0;oTable.cellSpacing=0;oTable.border=0;oTable.width=150;var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='\ \ \ \ \
'+FCKLang.ColorAutomatic+'
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command.SetColor('');this.Command._Panel.Hide();};var aColors=FCKConfig.FontColors.split(',');var iCounter=0;while (iCounter
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command.SetColor('#'+this.Color);this.Command._Panel.Hide();};};};var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='
'+FCKLang.ColorMoreColors+'
';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command._Panel.Hide();FCKDialog.OpenDialog('FCKDialog_Color',FCKLang.DlgColorTitle,'dialog/fck_colorselector.html',400,330,this.Command.SetColor);};} -var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');}; -var FCKPasteWordCommand=function(){this.Name='PasteWord';};FCKPasteWordCommand.prototype.Execute=function(){FCK.PasteFromWord();};FCKPasteWordCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');}; -var FCKTableCommand=function(command){this.Name=command;};FCKTableCommand.prototype.Execute=function(){switch (this.Name){case 'TableInsertRow':FCKTableHandler.InsertRow();break;case 'TableDeleteRows':FCKTableHandler.DeleteRows();break;case 'TableInsertColumn':FCKTableHandler.InsertColumn();break;case 'TableDeleteColumns':FCKTableHandler.DeleteColumns();break;case 'TableInsertCell':FCKTableHandler.InsertCell();break;case 'TableDeleteCells':FCKTableHandler.DeleteCells();break;case 'TableMergeCells':FCKTableHandler.MergeCells();break;case 'TableSplitCell':FCKTableHandler.SplitCell();break;default:alert(FCKLang.UnknownCommand.replace(/%1/g,this.Name));};};FCKTableCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;} -var FCKStyleCommand=function(){this.Name='Style';this.StylesLoader=new FCKStylesLoader();this.StylesLoader.Load(FCKConfig.StylesXmlPath);this.Styles=this.StylesLoader.Styles;};FCKStyleCommand.prototype.Execute=function(styleName,styleComboItem){if (styleName=="Clear Styles"){if (FCKBrowserInfo.IsIE){var selected=FCKSelection.GetParentElement();RemoveStyles(selected.childNodes);} else FCK.ExecuteNamedCommand('RemoveFormat');return;};if (styleComboItem.Selected) styleComboItem.Style.RemoveFromSelection();else styleComboItem.Style.ApplyToSelection();FCK.Focus();FCK.Events.FireEvent("OnSelectionChange");};function show_props(obj,objName) {var result="";for (var i in obj) {result=objName+"."+i+" = "+obj[i]+" \n";alert(result);};};FCKStyleCommand.prototype.GetState=function(){var oSelection=FCK.EditorDocument.selection;if (FCKSelection.GetType()=='Control'){var e=FCKSelection.GetSelectedElement();if (e) return this.StylesLoader.StyleGroups[e.tagName]?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;else FCK_TRISTATE_OFF;}else return FCK_TRISTATE_OFF;};FCKStyleCommand.prototype.GetActiveStyles=function(){var aActiveStyles=new Array();if (FCKSelection.GetType()=='Control') this._CheckStyle(FCKSelection.GetSelectedElement(),aActiveStyles,false);else this._CheckStyle(FCKSelection.GetParentElement(),aActiveStyles,true);return aActiveStyles;};FCKStyleCommand.prototype._CheckStyle=function(element,targetArray,checkParent){if (!element) return;var style_exist=false;if (element.nodeType==1){var aStyleGroup=this.StylesLoader.StyleGroups[element.tagName];if (aStyleGroup){for (var i=0;i'+''+''+''+this.Label+''+''+'';var oCell=parentToolbar.DOMRow.insertCell(-1);oCell.appendChild(this.DOMDiv);this.RefreshState();};FCKToolbarButton.prototype.RefreshState=function(){var eState=this.Command.GetState();if (eState==this.State) return;this.State=eState;switch (this.State){case FCK_TRISTATE_ON:this.DOMDiv.className='TB_Button_On';break;case FCK_TRISTATE_OFF:this.DOMDiv.className='TB_Button_Off';break;default:this.DOMDiv.className='TB_Button_Disabled';break;};};FCKToolbarButton.prototype.Enable=function(){this.RefreshState();};FCKToolbarButton.prototype.Disable=function(){this.State=FCK_TRISTATE_DISABLED;this.DOMDiv.className='TB_Button_Disabled';} -var FCKSpecialCombo=function(caption){this.FieldWidth=80;this.PanelWidth=130;this.PanelMaxHeight=150;this.Label=' ';this.Caption=caption;this.Enabled=true;this.Items=new Object();this._Panel=new FCKPanel();this._Panel.StyleSheet=FCKConfig.SkinPath+'fck_contextmenu.css';this._Panel.Create();this._Panel.PanelDiv.className+=' SC_Panel';this._Panel.PanelDiv.innerHTML='
';this._ItemsHolderEl=this._Panel.PanelDiv.getElementsByTagName('TD')[0];};FCKSpecialCombo.prototype.AddItem=function(id,html,label){var oDiv=this._ItemsHolderEl.appendChild(this._Panel.Document.createElement('DIV'));oDiv.className=oDiv.originalClass='SC_Item';oDiv.innerHTML=html;oDiv.FCKItemID=id;oDiv.FCKItemLabel=label?label:id;oDiv.FCKSpecialCombo=this;oDiv.Selected=false;oDiv.onmouseover=function(){this.className+=' SC_ItemOver';};oDiv.onmouseout=function(){this.className=this.originalClass;};oDiv.onclick=function(){this.FCKSpecialCombo._Panel.Hide();this.FCKSpecialCombo.SetLabel(this.FCKItemLabel);if (typeof(this.FCKSpecialCombo.OnSelect)=='function') this.FCKSpecialCombo.OnSelect(this.FCKItemID,this);};this.Items[id.toString().toLowerCase()]=oDiv;return oDiv;};FCKSpecialCombo.prototype.SelectItem=function(itemId){itemId=itemId?itemId.toString().toLowerCase():'';var oDiv=this.Items[itemId];if (oDiv){oDiv.className=oDiv.originalClass='SC_ItemSelected';oDiv.Selected=true;};};FCKSpecialCombo.prototype.DeselectAll=function(){for (var i in this.Items){this.Items[i].className=this.Items[i].originalClass='SC_Item';this.Items[i].Selected=false;};};FCKSpecialCombo.prototype.SetLabelById=function(id){FCKDebug.Output(this.Caption+': '+id,'#0000FF');id=id?id.toString().toLowerCase():'';var oDiv=this.Items[id];this.SetLabel(oDiv?oDiv.FCKItemLabel:'');};FCKSpecialCombo.prototype.SetLabel=function(text){this.Label=text.length==0?' ':text;if (this._LabelEl) this._LabelEl.innerHTML=this.Label;};FCKSpecialCombo.prototype.SetEnabled=function(isEnabled){this.Enabled=isEnabled;this._OuterTable.className=isEnabled?'':'SC_FieldDisabled';};FCKSpecialCombo.prototype.Create=function(targetElement){this._OuterTable=targetElement.appendChild(document.createElement('TABLE'));this._OuterTable.cellPadding=0;this._OuterTable.cellSpacing=0;this._OuterTable.insertRow(-1);if (this.Caption&&this.Caption.length>0){var oCaptionCell=this._OuterTable.rows[0].insertCell(-1);oCaptionCell.unselectable='on';oCaptionCell.innerHTML=this.Caption;oCaptionCell.className='SC_FieldCaption';};var oField=this._OuterTable.rows[0].insertCell(-1).appendChild(document.createElement('DIV'));oField.className='SC_Field';oField.style.width=this.FieldWidth+'px';oField.innerHTML='
 
';this._LabelEl=oField.getElementsByTagName('label')[0];this._LabelEl.innerHTML=this.Label;oField.SpecialCombo=this;oField.onmouseover=function(){if (this.SpecialCombo.Enabled) this.className='SC_Field SC_FieldOver';};oField.onmouseout=function(){this.className='SC_Field';};oField.onclick=function(e){if (e){e.stopPropagation();FCKPanelEventHandlers.OnDocumentClick(e);};if (this.SpecialCombo.Enabled){if (typeof(this.SpecialCombo.OnBeforeClick)=='function') this.SpecialCombo.OnBeforeClick(this.SpecialCombo);if (this.SpecialCombo._ItemsHolderEl.offsetHeight>this.SpecialCombo.PanelMaxHeight) this.SpecialCombo._Panel.PanelDiv.style.height=this.SpecialCombo.PanelMaxHeight+'px';else this.SpecialCombo._Panel.PanelDiv.style.height=this.SpecialCombo._ItemsHolderEl.offsetHeight+'px';this.SpecialCombo._Panel.PanelDiv.style.width=this.SpecialCombo.PanelWidth+'px';if (FCKBrowserInfo.IsGecko) this.SpecialCombo._Panel.PanelDiv.style.overflow='-moz-scrollbars-vertical';this.SpecialCombo._Panel.Show(0,this.offsetHeight,this,null,this.SpecialCombo.PanelMaxHeight,true);};return false;};}; -var FCKToolbarSpecialCombo=function(){this.SourceView=false;this.ContextSensitive=true;};FCKToolbarSpecialCombo.prototype.CreateInstance=function(parentToolbar){this._Combo=new FCKSpecialCombo(this.GetLabel());this._Combo.FieldWidth=100;this._Combo.PanelWidth=150;this._Combo.PanelMaxHeight=150;this.CreateItems(this._Combo);this._Combo.Create(parentToolbar.DOMRow.insertCell(-1));this._Combo.Command=this.Command;this._Combo.OnSelect=function(itemId,item){this.Command.Execute(itemId,item);};};FCKToolbarSpecialCombo.prototype.RefreshState=function(){var eState;var sValue=this.Command.GetState();if (sValue!=FCK_TRISTATE_DISABLED){eState=FCK_TRISTATE_ON;if (!this.RefreshActiveItems){this.RefreshActiveItems=function(combo,value){this._Combo.DeselectAll();this._Combo.SelectItem(value);this._Combo.SetLabelById(value);};};this.RefreshActiveItems(this._Combo,sValue);}else eState=FCK_TRISTATE_DISABLED;if (eState==this.State) return;if (eState==FCK_TRISTATE_DISABLED){this._Combo.DeselectAll();if (typeof(FCKConfig.DefaultClass)!='undefined') this._Combo.SetLabel(FCKConfig.DefaultClass);else this._Combo.SetLabel(' ');};this.State=eState;this._Combo.SetEnabled(eState!=FCK_TRISTATE_DISABLED);};FCKToolbarSpecialCombo.prototype.Enable=function(){this.RefreshState();};FCKToolbarSpecialCombo.prototype.Disable=function(){this.State=FCK_TRISTATE_DISABLED;this._Combo.DeselectAll();if (typeof(FCKConfig.DefaultClass)!='undefined') this._Combo.SetLabel(FCKConfig.DefaultClass);else this._Combo.SetLabel(' ');this._Combo.SetEnabled(false);} -var FCKToolbarFontsCombo=function(){this.Command=FCKCommands.GetCommand('FontName');};FCKToolbarFontsCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarFontsCombo.prototype.GetLabel=function(){return FCKLang.Font;};FCKToolbarFontsCombo.prototype.CreateItems=function(targetSpecialCombo){var aFonts=FCKConfig.FontNames.split(';');for (var i=0;i'+aFonts[i]+'');} -var FCKToolbarFontSizeCombo=function(){this.Command=FCKCommands.GetCommand('FontSize');};FCKToolbarFontSizeCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarFontSizeCombo.prototype.GetLabel=function(){return FCKLang.FontSize;};FCKToolbarFontSizeCombo.prototype.CreateItems=function(targetSpecialCombo){targetSpecialCombo.FieldWidth=70;var aSizes=FCKConfig.FontSizes.split(';');for (var i=0;i'+aSizeParts[1]+'',aSizeParts[1]);};} -var FCKToolbarFontFormatCombo=function(){this.Command=FCKCommands.GetCommand('FontFormat');};FCKToolbarFontFormatCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarFontFormatCombo.prototype.GetLabel=function(){return FCKLang.FontFormat;};FCKToolbarFontFormatCombo.prototype.CreateItems=function(targetSpecialCombo){var aNames=FCKLang['FontFormats'].split(';');var oNames={p:aNames[0],pre:aNames[1],address:aNames[2],h1:aNames[3],h2:aNames[4],h3:aNames[5],h4:aNames[6],h5:aNames[7],h6:aNames[8],div:aNames[9]};var aTags=FCKConfig.FontFormats.split(';');for (var i=0;i'+oNames[aTags[i]]+'',oNames[aTags[i]]);};} -var FCKToolbarStyleCombo=function(){this.Command=FCKCommands.GetCommand('Style');};FCKToolbarStyleCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarStyleCombo.prototype.GetLabel=function(){return FCKLang.Style;};FCKToolbarStyleCombo.prototype.CreateItems=function(targetSpecialCombo){FCKTools.AppendStyleSheet(targetSpecialCombo._Panel.Document,FCKConfig.EditorAreaCSS);if (!FCKBrowserInfo.IsGecko) targetSpecialCombo.OnBeforeClick=this.RefreshVisibleItems;for (var s in this.Command.Styles){var oStyle=this.Command.Styles[s];if (oStyle.IsObjectElement) var oItem=targetSpecialCombo.AddItem(s,s);else var oItem=targetSpecialCombo.AddItem(s,oStyle.GetOpenerTag()+s+oStyle.GetCloserTag());oItem.Style=oStyle;};};FCKToolbarStyleCombo.prototype.RefreshActiveItems=function(targetSpecialCombo){targetSpecialCombo.DeselectAll();var aStyles=this.Command.GetActiveStyles();if (aStyles.length>0){for (var i=0;i'+''+''+''+this.Label+''+''+''+'';var oCell=parentToolbar.DOMRow.insertCell(-1);oCell.appendChild(this.DOMDiv);this.RefreshState();};FCKToolbarPanelButton.prototype.RefreshState=FCKToolbarButton.prototype.RefreshState;FCKToolbarPanelButton.prototype.Enable=FCKToolbarButton.prototype.Enable;FCKToolbarPanelButton.prototype.Disable=FCKToolbarButton.prototype.Disable; -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,null,null,false,true);break;case 'SpellCheck':oItem=new FCKToolbarButton('SpellCheck',FCKLang.SpellCheck,null,null,false,true);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 'Document':oItem=new FCKToolbarButton('Document',FCKLang.InsertDocumentLbl,FCKLang.InsertDocument);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;} -var FCKToolbar=function(width_){this.Items=new Array();this.DOMTable=document.createElement('table');this.DOMTable.className='TB_Toolbar';with (this.DOMTable){style.styleFloat=style.cssFloat=FCKLang.Dir=='rtl'?'right':'left';cellPadding=0;cellSpacing=0;border=0;if (width_&&width_>0) {width=width_+'%';};};this.DOMRow=this.DOMTable.insertRow(-1);var oCell=this.DOMRow.insertCell(-1);oCell.className='TB_Start';oCell.innerHTML='';FCKToolbarSet.DOMElement.appendChild(this.DOMTable);};FCKToolbar.prototype.AddItem=function(toolbarItem){this.Items[this.Items.length]=toolbarItem;toolbarItem.CreateInstance(this);};FCKToolbar.prototype.AddEmpty=function(){var oCell=this.DOMRow.insertCell(-1);oCell.unselectable='on';oCell.width='50%';oCell.innerHTML='';};FCKToolbar.prototype.AddSeparator=function(){var oCell=this.DOMRow.insertCell(-1);oCell.unselectable='on';oCell.innerHTML='';};FCKToolbar.prototype.AddTerminator=function(){var oCell=this.DOMRow.insertCell(-1);oCell.className='TB_End';oCell.innerHTML='';};FCKToolbar.prototype.AddBigSeparator=function(){var oCell=this.DOMRow.insertCell(-1);oCell.className='TB_Start';oCell.innerHTML='';}; -var FCKToolbarBreak=function(){var oBreakDiv=document.createElement('div');oBreakDiv.style.clear=oBreakDiv.style.cssFloat=FCKLang.Dir=='rtl'?'right':'left';FCKToolbarSet.DOMElement.appendChild(oBreakDiv);} -var FCKToolbarSet=FCK.ToolbarSet=new Object();document.getElementById('ExpandHandle').title=FCKLang.ToolbarExpand;document.getElementById('CollapseHandle').title=FCKLang.ToolbarCollapse;FCKToolbarSet.Toolbars=new Array();FCKToolbarSet.ItemsWysiwygOnly=new Array();FCKToolbarSet.ItemsContextSensitive=new Array();FCKToolbarSet.Expand=function(){document.getElementById('Collapsed').style.display='none';document.getElementById('Expanded').style.display='';if (!FCKBrowserInfo.IsIE){window.setTimeout("window.onresize()",1);};};FCKToolbarSet.Collapse=function(){document.getElementById('Collapsed').style.display='';document.getElementById('Expanded').style.display='none';if (!FCKBrowserInfo.IsIE){window.setTimeout("window.onresize()",1);};};FCKToolbarSet.Restart=function(){if (!FCKConfig.ToolbarCanCollapse||FCKConfig.ToolbarStartExpanded) this.Expand();else this.Collapse();document.getElementById('CollapseHandle').style.display=FCKConfig.ToolbarCanCollapse?'':'none';};FCKToolbarSet.Load=function(toolbarSetName){this.DOMElement=document.getElementById('eToolbar');var ToolbarSet=FCKConfig.ToolbarSets[toolbarSetName];if (!ToolbarSet){alert(FCKLang.UnknownToolbarSet.replace(/%1/g,toolbarSetName));return;};this.Toolbars=new Array();for (var x=0;x';oCell=this._Row.insertCell(-1);oCell.className='CM_Label';oCell.unselectable='on';oCell.noWrap=true;oCell.innerHTML=this.Label;};FCKContextMenuItem.prototype.SetVisible=function(isVisible){this._Row.style.display=isVisible?'':'none';};FCKContextMenuItem.prototype.RefreshState=function(){switch (this.Command.GetState()){case FCK_TRISTATE_ON:case FCK_TRISTATE_OFF:this._Row.className='CM_Option';break;default:this._Row.className='CM_Disabled';break;};}; -var FCKContextMenuSeparator=function(){};FCKContextMenuSeparator.prototype.CreateTableRow=function(targetTable){this._Row=targetTable.insertRow(-1);this._Row.className='CM_Separator';var oCell=this._Row.insertCell(-1);oCell.className='CM_Icon';oCell=this._Row.insertCell(-1);oCell.className='CM_Label';oCell.innerHTML='
';};FCKContextMenuSeparator.prototype.SetVisible=function(isVisible){this._Row.style.display=isVisible?'':'none';};FCKContextMenuSeparator.prototype.RefreshState=function(){}; -var FCKContextMenuGroup=function(addSeparator,contextMenu,firstItemCommand,firstItemLabel,hasIcon){this.IsVisible=true;this.Items=new Array();if (addSeparator) this.Add(new FCKContextMenuSeparator());if (contextMenu&&firstItemCommand&&firstItemLabel) this.Add(new FCKContextMenuItem(contextMenu,firstItemCommand,firstItemLabel,hasIcon));this.ValidationFunction=null;};FCKContextMenuGroup.prototype.Add=function(contextMenuItem){this.Items[this.Items.length]=contextMenuItem;};FCKContextMenuGroup.prototype.CreateTableRows=function(table){for (var i=0;i0&&oTag.href.length==0);if (this.Groups['Anchor']) this.Groups['Anchor'].SetVisible(bIsAnchor);if (this.Groups['Link']) this.Groups['Link'].SetVisible(!bIsAnchor&&LinkState()==true);if (this.Groups['TableCell']) this.Groups['TableCell'].SetVisible(sTagName!='TABLE'&&FCKSelection.HasAncestorNode('TABLE'));if (this.Groups['Table']) this.Groups['Table'].SetVisible(sTagName=='TABLE');if (this.Groups['Image']) this.Groups['Image'].SetVisible(sTagName=='IMG');if (this.Groups['Document']) this.Groups['Document'].SetVisible(true&&DocumentState()==true);if (this.Groups['BulletedList']) this.Groups['BulletedList'].SetVisible(FCKSelection.HasAncestorNode('UL'));if (this.Groups['NumberedList']) this.Groups['NumberedList'].SetVisible(FCKSelection.HasAncestorNode('OL'));if (this.Groups['Select']) this.Groups['Select'].SetVisible(sTagName=='SELECT');if (this.Groups['Textarea']) this.Groups['Textarea'].SetVisible(sTagName=='TEXTAREA');if (this.Groups['Form']) this.Groups['Form'].SetVisible(FCKSelection.HasAncestorNode('FORM'));if (this.Groups['Checkbox']) this.Groups['Checkbox'].SetVisible(sTagName=='INPUT'&&oTag.type=='checkbox');if (this.Groups['Radio']) this.Groups['Radio'].SetVisible(sTagName=='INPUT'&&oTag.type=='radio');if (this.Groups['TextField']) this.Groups['TextField'].SetVisible(sTagName=='INPUT'&&(oTag.type=='text'||oTag.type=='password'));if (this.Groups['HiddenField']) this.Groups['HiddenField'].SetVisible(sTagName=='INPUT'&&oTag.type=='hidden');if (this.Groups['ImageButton']) this.Groups['ImageButton'].SetVisible(sTagName=='INPUT'&&oTag.type=='image');if (this.Groups['Button']) this.Groups['Button'].SetVisible(sTagName=='INPUT'&&(oTag.type=='button'||oTag.type=='submit'||oTag.type=='reset'));for (var o in this.Groups){this.Groups[o].RefreshState();};}; -FCKTools.AppendStyleSheet(window.parent.document,FCKConfig.SkinPath+'fck_contextmenu.css');FCKContextMenu.Show=function(x,y){if (!this._Document){this._Document=window.parent.document;};if (!this._IsLoaded){this.Reload();this._Div.style.zIndex=10000;this._Div.oncontextmenu=function() { return false;};};this.RefreshState();var oCoordsA=FCKTools.GetElementPosition(FCK.EditorWindow.frameElement);var oCoordsB=FCKTools.GetElementPosition(window.frameElement);x+=oCoordsA.X+oCoordsB.X;y+=oCoordsA.Y+oCoordsB.Y;var iXSpace=x+this._Div.offsetWidth-this._Div.ownerDocument.defaultView.innerWidth;var iYSpace=y+this._Div.offsetHeight-this._Div.ownerDocument.defaultView.innerHeight;if (iXSpace>0) x-=this._Div.offsetWidth;if (iYSpace>0) y-=this._Div.offsetHeight;this._Div.style.left=x+'px';this._Div.style.top=y+'px';var oActualWindow=FCK.EditorWindow;while (oActualWindow){oActualWindow.document.addEventListener('click',FCKContextMenu._OnDocumentClick,false);if (oActualWindow!=oActualWindow.parent) oActualWindow=oActualWindow.parent;else if (oActualWindow.opener==null) oActualWindow=oActualWindow.opener;else break;};this._Div.style.visibility='';};FCKContextMenu._OnDocumentClick=function(event){var e=event.target;while (e){if (e==FCKContextMenu._Div) return;e=e.parentNode;};FCKContextMenu.Hide();};FCKContextMenu.Hide=function(){this._Div.style.visibility='hidden';this._Div.style.left=this._Div.style.top='1px';} -if (!FCKConfig.PluginsPath.endsWith('/')) FCKConfig.PluginsPath+='/';var FCKPlugin=function(name,availableLangs,basePath){this.Name=name;this.BasePath=basePath?basePath:FCKConfig.PluginsPath;this.Path=this.BasePath+name+'/';if (!availableLangs||availableLangs.length==0) this.AvailableLangs=new Array();else this.AvailableLangs=availableLangs.split(',');};FCKPlugin.prototype.Load=function(){if (this.AvailableLangs.length>0){if (this.AvailableLangs.indexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) var sLang=FCKLanguageManager.ActiveLanguage.Code;else var sLang=this.AvailableLangs[0];FCKScriptLoader.AddScript(this.Path+'lang/'+sLang+'.js');};FCKScriptLoader.AddScript(this.Path+'fckplugin.js');} -var FCKPlugins=FCK.Plugins=new Object();FCKPlugins.ItemsCount=0;FCKPlugins.Loaded=false;FCKPlugins.Items=new Object();for (var i=0;i0){FCKScriptLoader.OnEmpty=CompleteLoading;FCKPlugins.Load();}else CompleteLoading();function CompleteLoading(){FCKToolbarSet.Name=FCKURLParams['Toolbar']||'Default';FCKToolbarSet.Load(FCKToolbarSet.Name);FCKToolbarSet.Restart();FCK.AttachToOnSelectionChange(FCKToolbarSet.RefreshItemsState);FCK.SetStatus(FCK_STATUS_COMPLETE);if (typeof(window.parent.FCKeditor_OnComplete)=='function') window.parent.FCKeditor_OnComplete(FCK);}