Subversion Repositories Applications.papyrus

Rev

Rev 431 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 431 Rev 521
Line 6... Line 6...
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
7
 * 
7
 * 
8
 * For further information visit:
8
 * For further information visit:
9
 * 		http://www.fckeditor.net/
9
 * 		http://www.fckeditor.net/
10
 * 
10
 * 
-
 
11
 * "Support Open Source software. What about a donation today?"
-
 
12
 * 
11
 * This file has been compacted for best loading performance.
13
 * This file has been compacted for best loading performance.
12
 */
14
 */
13
FCK.RedirectNamedCommands=new Object();FCK.ExecuteNamedCommand=function(commandName,commandParameter){FCKUndo.SaveUndoStep();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 (!FCK.EditorDocument.queryCommandEnabled(commandName)) return FCK_TRISTATE_DISABLED;else 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.PasteFromWord=function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');};FCK.Preview=function(){var iWidth=screen.width*0.8;var iHeight=screen.height*0.7;var iLeft=(screen.width-iWidth) / 2;var oWindow=window.open('', null, 'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + iWidth + ',height=' + iHeight + ',left=' + iLeft);var sHTML;if (FCKConfig.FullPage){if (FCK.TempBaseTag.length > 0) sHTML=FCK.GetXHTML().replace( FCKRegexLib.HeadCloser, FCK.TempBaseTag + '</head>');else sHTML=FCK.GetXHTML();}else{sHTML=FCKConfig.DocType + '<html dir="' + FCKConfig.ContentLangDirection + '">' + '<head><title>' + FCKLang.Preview + '</title>' + '<link href="' + FCKConfig.EditorAreaCSS + '" rel="stylesheet" type="text/css" />' + FCK.TempBaseTag + '</head><body>' + FCK.GetXHTML() + '</body></html>';};oWindow.document.write(sHTML);oWindow.document.close();};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){if (FCKBrowserInfo.IsIE) FCKUndo.SaveUndoStep();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();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 < aEls.length ; i++){if (aEls[i].getAttribute( '__FCKTempLabel' )){aEls[i].removeAttribute('__FCKTempLabel');return aEls[i];};};};
15
FCK.RedirectNamedCommands=new Object();FCK.ExecuteNamedCommand=function(A,B){FCKUndo.SaveUndoStep();if (FCK.RedirectNamedCommands[A]!=null) FCK.ExecuteRedirectedNamedCommand(A,B);else{FCK.Focus();FCK.EditorDocument.execCommand(A,false,B);FCK.Events.FireEvent('OnSelectionChange');};FCKUndo.SaveUndoStep();};FCK.GetNamedCommandState=function(A){try{if (!FCK.EditorDocument.queryCommandEnabled(A)) return FCK_TRISTATE_DISABLED;else return FCK.EditorDocument.queryCommandState(A)?FCK_TRISTATE_ON:FCK_TRISTATE_OFF;}catch (e){return FCK_TRISTATE_OFF;};};FCK.GetNamedCommandValue=function(A){var B='';var C=FCK.GetNamedCommandState(A);if (C==FCK_TRISTATE_DISABLED) return null;try{B=this.EditorDocument.queryCommandValue(A);}catch(e) {};return B?B:'';};FCK.PasteFromWord=function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');};FCK.Preview=function(){var A=FCKConfig.ScreenWidth*0.8;var B=FCKConfig.ScreenHeight*0.7;var C=(FCKConfig.ScreenWidth-A)/2;var D=window.open('',null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+A+',height='+B+',left='+C);var E;if (FCKConfig.FullPage){if (FCK.TempBaseTag.length>0) E=FCK.GetXHTML().replace(FCKRegexLib.HeadOpener,'$&'+FCK.TempBaseTag);else E=FCK.GetXHTML();}else{E=FCKConfig.DocType+'<html dir="'+FCKConfig.ContentLangDirection+'">'+'<head><title>'+FCKLang.Preview+'</title>'+'<link href="'+FCKConfig.EditorAreaCSS+'" rel="stylesheet" type="text/css" />'+FCK.TempBaseTag+'</head><body>'+FCK.GetXHTML()+'</body></html>';};D.document.write(E);D.document.close();};FCK.SwitchEditMode=function(){var A=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=A?'none':'';document.getElementById('eSource').style.display=A?'':'none';if (A){if (FCKBrowserInfo.IsIE) FCKUndo.SaveUndoStep();document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));}else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=A?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();FCK.Focus();};FCK.CreateElement=function(A){var e=FCK.EditorDocument.createElement(A);return FCK.InsertElementAndGetIt(e);};FCK.InsertElementAndGetIt=function(e){e.setAttribute('__FCKTempLabel',1);this.InsertElement(e);var A=FCK.EditorDocument.getElementsByTagName(e.tagName);for (var i=0;i<A.length;i++){if (A[i].getAttribute('__FCKTempLabel')){A[i].removeAttribute('__FCKTempLabel');return A[i];};};return null;};
14
FCK.Paste=function(){if (FCKConfig.ForcePasteAsPlainText){FCK.PasteAsPlainText();return false;}else if (FCKConfig.AutoDetectPasteFromWord){var sHTML=FCK.GetClipboardHTML();var re=/<\w[^>]* class="?MsoNormal"?/gi;if (re.test(sHTML)){if (confirm(FCKLang["PasteWordConfirm"])){FCK.PasteFromWord();return false;};};}else return true;};FCK.PasteAsPlainText=function(){var sText=FCKTools.HTMLEncode(clipboardData.getData("Text"));sText=sText.replace(/\n/g,'<BR>');this.InsertHtml(sText);};FCK.InsertElement=function(element){FCK.InsertHtml(element.outerHTML);};FCK.GetClipboardHTML=function(){var oDiv=document.getElementById('___FCKHiddenDiv');if (!oDiv){var oDiv=document.createElement('DIV');oDiv.id='___FCKHiddenDiv';oDiv.style.visibility='hidden';oDiv.style.overflow='hidden';oDiv.style.position='absolute';oDiv.style.width=1;oDiv.style.height=1;document.body.appendChild(oDiv);};oDiv.innerHTML='';var oTextRange=document.body.createTextRange();oTextRange.moveToElementText(oDiv);oTextRange.execCommand('Paste');var sData=oDiv.innerHTML;oDiv.innerHTML='';return sData;};FCK.AttachToOnSelectionChange=function(functionPointer){this.Events.AttachEvent('OnSelectionChange',functionPointer);};FCK.CreateLink=function(url){FCK.ExecuteNamedCommand('Unlink');if (url.length>0){var sTempUrl='javascript:void(0);/*'+(new Date().getTime())+'*/';FCK.ExecuteNamedCommand('CreateLink',sTempUrl);var oLinks=this.EditorDocument.links;for (i=0;i<oLinks.length;i++){if (oLinks[i].href==sTempUrl){oLinks[i].href=url;return oLinks[i];};};};};
16
FCK.Paste=function(){if (FCKConfig.ForcePasteAsPlainText){FCK.PasteAsPlainText();return false;}else if (FCKConfig.AutoDetectPasteFromWord){var A=FCK.GetClipboardHTML();var B=/<\w[^>]* class="?MsoNormal"?/gi;if (B.test(A)){if (confirm(FCKLang["PasteWordConfirm"])){FCK.PasteFromWord();return false;};};}else return true;};FCK.PasteAsPlainText=function(){var A=FCKTools.HTMLEncode(clipboardData.getData("Text"));A=A.replace(/\n/g,'<BR>');this.InsertHtml(A);};FCK.InsertElement=function(A){FCK.InsertHtml(A.outerHTML);};FCK.GetClipboardHTML=function(){var A=document.getElementById('___FCKHiddenDiv');if (!A){var A=document.createElement('DIV');A.id='___FCKHiddenDiv';A.style.visibility='hidden';A.style.overflow='hidden';A.style.position='absolute';A.style.width=1;A.style.height=1;document.body.appendChild(A);};A.innerHTML='';var C=document.body.createTextRange();C.moveToElementText(A);C.execCommand('Paste');var D=A.innerHTML;A.innerHTML='';return D;};FCK.AttachToOnSelectionChange=function(A){this.Events.AttachEvent('OnSelectionChange',A);};FCK.CreateLink=function(A){FCK.ExecuteNamedCommand('Unlink');if (A.length>0){var B='javascript:void(0);/*'+(new Date().getTime())+'*/';FCK.ExecuteNamedCommand('CreateLink',B);var C=this.EditorDocument.links;for (i=0;i<C.length;i++){if (C[i].href==B){C[i].href=A;return C[i];};};};};
15
var FCKSelection=new Object();FCK.Selection=FCKSelection;
17
var FCKSelection=new Object();FCK.Selection=FCKSelection;
16
FCKSelection.GetType=function(){return FCK.EditorDocument.selection.type;};FCKSelection.GetSelectedElement=function(){if (this.GetType()=='Control'){var oRange=FCK.EditorDocument.selection.createRange();if (oRange&&oRange.item) return FCK.EditorDocument.selection.createRange().item(0);};};FCKSelection.GetParentElement=function(){if (this.GetType()=='Control') return FCKSelection.GetSelectedElement().parentElement;else return FCK.EditorDocument.selection.createRange().parentElement();};FCKSelection.SelectNode=function(node){FCK.Focus();FCK.EditorDocument.selection.empty();var oRange=FCK.EditorDocument.selection.createRange();oRange.moveToElementText(node);oRange.select();};FCKSelection.Collapse=function(toStart){FCK.Focus();var oRange=FCK.EditorDocument.selection.createRange();oRange.collapse(toStart==null||toStart===true);oRange.select();};FCKSelection.HasAncestorNode=function(nodeTagName){var oContainer;if (FCK.EditorDocument.selection.type=="Control"){oContainer=this.GetSelectedElement();}else{var oRange=FCK.EditorDocument.selection.createRange();oContainer=oRange.parentElement();};while (oContainer){if (oContainer.tagName==nodeTagName) return true;oContainer=oContainer.parentNode;};return false;};FCKSelection.MoveToAncestorNode=function(nodeTagName){var oNode;if (FCK.EditorDocument.selection.type=="Control"){var oRange=FCK.EditorDocument.selection.createRange();for (i=0;i<oRange.length;i++){if (oRange(i).parentNode){oNode=oRange(i).parentNode;break;};};}else{var oRange=FCK.EditorDocument.selection.createRange();oNode=oRange.parentElement();};while (oNode&&oNode.nodeName!=nodeTagName) oNode=oNode.parentNode;return oNode;};FCKSelection.Delete=function(){var oSel=FCK.EditorDocument.selection;if (oSel.type.toLowerCase()!="none"){oSel.clear();};return oSel;}
18
FCKSelection.GetType=function(){return FCK.EditorDocument.selection.type;};FCKSelection.GetSelectedElement=function(){if (this.GetType()=='Control'){var A=FCK.EditorDocument.selection.createRange();if (A&&A.item) return FCK.EditorDocument.selection.createRange().item(0);};};FCKSelection.GetParentElement=function(){switch (this.GetType()){case 'Control':return FCKSelection.GetSelectedElement().parentElement;case 'None':return;default:return FCK.EditorDocument.selection.createRange().parentElement();};};FCKSelection.SelectNode=function(A){FCK.Focus();FCK.EditorDocument.selection.empty();var B=FCK.EditorDocument.selection.createRange();B.moveToElementText(A);B.select();};FCKSelection.Collapse=function(A){FCK.Focus();var B=FCK.EditorDocument.selection.createRange();B.collapse(A==null||A===true);B.select();};FCKSelection.HasAncestorNode=function(A){var B;if (FCK.EditorDocument.selection.type=="Control"){B=this.GetSelectedElement();}else{var C=FCK.EditorDocument.selection.createRange();B=C.parentElement();};while (B){if (B.tagName==A) return true;B=B.parentNode;};return false;};FCKSelection.MoveToAncestorNode=function(A){var B;if (FCK.EditorDocument.selection.type=="Control"){var C=FCK.EditorDocument.selection.createRange();for (i=0;i<C.length;i++){if (C(i).parentNode){B=C(i).parentNode;break;};};}else{var C=FCK.EditorDocument.selection.createRange();B=C.parentElement();};while (B&&B.nodeName!=A) B=B.parentNode;return B;};FCKSelection.Delete=function(){var A=FCK.EditorDocument.selection;if (A.type.toLowerCase()!="none"){A.clear();};return A;};FCKSelection.SetCursorPosition=function (A,B){if (typeof B=="undefined") B=0;FCK.Selection.SelectNode(A);FCK.Selection.Collapse(true);A.scrollIntoView(false);};
17
var FCKPanel=function(parentWindow){this.Window=parentWindow?parentWindow:window;};function FCKPanel_OnContextMenu() { return false;};FCKPanel.prototype.Create=function(){this._Popup=this.Window.createPopup();this.Document=this._Popup.document;aCleanupDocs[aCleanupDocs.length]=this.Document;this.Document.oncontextmenu=FCKPanel_OnContextMenu;if (this.StyleSheet) FCKTools.AppendStyleSheet(this.Document,this.StyleSheet);this.PanelDiv=this.Document.body.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();this._Popup.show(panelX,panelY,0,0,relElement);if (width==null||(autoSize&&width>this.PanelDiv.offsetWidth)) var iWidth=this.PanelDiv.offsetWidth;else var iWidth=width;if (height==null||(autoSize&&height>this.PanelDiv.offsetHeight)) var iHeight=this.PanelDiv.offsetHeight;else var iHeight=height;this.PanelDiv.style.height=iHeight;this._Popup.show(panelX,panelY,iWidth,iHeight,relElement);};FCKPanel.prototype.Hide=function(){if (this._Popup) this._Popup.hide();}
19
var FCKPanel=function(A){this.Window=A?A:window;};function FCKPanel_OnContextMenu() { return false;};FCKPanel.prototype.Create=function(){this._Popup=this.Window.createPopup();this.Document=this._Popup.document;aCleanupDocs[aCleanupDocs.length]=this.Document;this.Document.oncontextmenu=FCKPanel_OnContextMenu;if (this.StyleSheet) FCKTools.AppendStyleSheet(this.Document,this.StyleSheet);this.PanelDiv=this.Document.body.appendChild(this.Document.createElement('DIV'));this.PanelDiv.className='FCK_Panel';this.Created=true;};FCKPanel.prototype.Show=function(A,B,C,D,E,F){if (!this.Created) this._Create();this._Popup.show(A,B,0,0,C);if (D==null||(F&&D>this.PanelDiv.offsetWidth)) var G=this.PanelDiv.offsetWidth;else var G=D;if (E==null||(F&&E>this.PanelDiv.offsetHeight)) var I=this.PanelDiv.offsetHeight;else var I=E;this.PanelDiv.style.height=I;this._Popup.show(A,B,G,I,C);};FCKPanel.prototype.Hide=function(){if (this._Popup) this._Popup.hide();}
18
var FCKTableHandler=new Object();FCKTableHandler.InsertRow=function(){var oRow=FCKSelection.MoveToAncestorNode("TR");if (!oRow) return;var oNewRow=oRow.cloneNode(true);oRow.parentNode.insertBefore(oNewRow,oRow);FCKTableHandler.ClearRow(oRow);};FCKTableHandler.DeleteRows=function(row){if (!row) row=FCKSelection.MoveToAncestorNode("TR");if (!row) return;var oTable=FCKTools.GetElementAscensor(row,'TABLE');if (oTable.rows.length==1){FCKTableHandler.DeleteTable(oTable);return;};row.parentNode.removeChild(row);};FCKTableHandler.DeleteTable=function(table){if (!table) table=FCKSelection.MoveToAncestorNode("TABLE");if (!table) return;table.parentNode.removeChild(table);};FCKTableHandler.InsertColumn=function(){var oCell=FCKSelection.MoveToAncestorNode("TD");if (!oCell) return;var oTable=FCKTools.GetElementAscensor(oCell,'TABLE');var iIndex=oCell.cellIndex+1;for (var i=0;i<oTable.rows.length;i++){var oRow=oTable.rows[i];if (oRow.cells.length<iIndex) continue;oCell=FCK.EditorDocument.createElement('TD');if (FCKBrowserInfo.IsGecko) oCell.innerHTML='<br _moz_editor_bogus_node="TRUE">';var oBaseCell=oRow.cells[iIndex];if (oBaseCell){oRow.insertBefore(oCell,oBaseCell);}else{oRow.appendChild(oCell);};};};FCKTableHandler.DeleteColumns=function(){var oCell=FCKSelection.MoveToAncestorNode("TD");if (!oCell) return;var oTable=FCKTools.GetElementAscensor(oCell,'TABLE');var iIndex=oCell.cellIndex;for (var i=oTable.rows.length-1;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");if (FCKBrowserInfo.IsGecko) oNewCell.innerHTML='<br _moz_editor_bogus_node="TRUE">';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;i<aCollCells.length;i++){if (aCollCells[i]==aCells[0]){var oNewCell=this.InsertCell(aCells[0]);if (!isNaN(aCells[0].rowSpan)&&aCells[0].rowSpan>1) 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<rowIndex+1) return;var oRow=tableMap[rowIndex];for (var c=0;c<oRow.length;c++){if (oRow[c]==cell) return c;};};FCKTableHandler._GetCollumnCells=function(tableMap,collumnIndex){var aCollCells=new Array();for (var r=0;r<tableMap.length;r++){var oCell=tableMap[r][collumnIndex];if (oCell&&(aCollCells.length==0||aCollCells[aCollCells.length-1]!=oCell)) aCollCells[aCollCells.length]=oCell;};return aCollCells;};FCKTableHandler._CreateTableMap=function(table){var aRows=table.rows;var r=-1;var aMap=new Array();for (var i=0;i<aRows.length;i++){r++;if (!aMap[r]) aMap[r]=new Array();var c=-1;for (var j=0;j<aRows[i].cells.length;j++){var oCell=aRows[i].cells[j];c++;while (aMap[r][c]) c++;var iColSpan=isNaN(oCell.colSpan)?1:oCell.colSpan;var iRowSpan=isNaN(oCell.rowSpan)?1:oCell.rowSpan;for (var rs=0;rs<iRowSpan;rs++){if (!aMap[r+rs]) aMap[r+rs]=new Array();for (var cs=0;cs<iColSpan;cs++){aMap[r+rs][c+cs]=aRows[i].cells[j];};};c+=iColSpan-1;};};return aMap;};FCKTableHandler.ClearRow=function(tr){var aCells=tr.cells;for (var i=0;i<aCells.length;i++){if (FCKBrowserInfo.IsGecko) aCells[i].innerHTML='<br _moz_editor_bogus_node="TRUE">';else aCells[i].innerHTML='';};}
20
var FCKTableHandler=new Object();FCKTableHandler.InsertRow=function(){var A=FCKSelection.MoveToAncestorNode("TR");if (!A) return;var B=A.cloneNode(true);A.parentNode.insertBefore(B,A);FCKTableHandler.ClearRow(A);};FCKTableHandler.DeleteRows=function(A){if (!A) A=FCKSelection.MoveToAncestorNode("TR");if (!A) return;var B=FCKTools.GetElementAscensor(A,'TABLE');if (B.rows.length==1){FCKTableHandler.DeleteTable(B);return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteTable=function(A){if (!A) A=FCKSelection.MoveToAncestorNode("TABLE");if (!A) return;A.parentNode.removeChild(A);};FCKTableHandler.InsertColumn=function(){var A=FCKSelection.MoveToAncestorNode("TD");if (!A) A=FCKSelection.MoveToAncestorNode("TH");if (!A) return;var B=FCKTools.GetElementAscensor(A,'TABLE');var C=A.cellIndex+1;for (var i=0;i<B.rows.length;i++){var D=B.rows[i];if (D.cells.length<C) continue;A=D.cells[C-1].cloneNode(false);if (FCKBrowserInfo.IsGecko) A.innerHTML=FCKBrowserInfo.IsGecko?GECKO_BOGUS:'';var E=D.cells[C];if (E) D.insertBefore(A,E);else D.appendChild(A);};};FCKTableHandler.DeleteColumns=function(){var A=FCKSelection.MoveToAncestorNode("TD");if (!A) return;var B=FCKTools.GetElementAscensor(A,'TABLE');var C=A.cellIndex;for (var i=B.rows.length-1;i>=0;i--){var D=B.rows[i];if (C==0&&D.cells.length==1){FCKTableHandler.DeleteRows(D);continue;};if (D.cells[C]) D.removeChild(D.cells[C]);};};FCKTableHandler.InsertCell=function(A){var B=A?A:FCKSelection.MoveToAncestorNode("TD");if (!B) return;var C=FCK.EditorDocument.createElement("TD");if (FCKBrowserInfo.IsGecko) C.innerHTML=GECKO_BOGUS;if (B.cellIndex==B.parentNode.cells.lenght-1){B.parentNode.appendChild(C);}else{B.parentNode.insertBefore(C,B.nextSibling);};return C;};FCKTableHandler.DeleteCell=function(A){if (A.parentNode.cells.length==1){FCKTableHandler.DeleteRows(FCKTools.GetElementAscensor(A,'TR'));return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteCells=function(){var A=FCKTableHandler.GetSelectedCells();for (var i=A.length-1;i>=0;i--){FCKTableHandler.DeleteCell(A[i]);};};FCKTableHandler.MergeCells=function(){var A=FCKTableHandler.GetSelectedCells();if (A.length<2) return;if (A[0].parentNode!=A[A.length-1].parentNode) return;var B=isNaN(A[0].colSpan)?1:A[0].colSpan;var C='';for (var i=A.length-1;i>0;i--){B+=isNaN(A[i].colSpan)?1:A[i].colSpan;C=A[i].innerHTML+C;FCKTableHandler.DeleteCell(A[i]);};A[0].colSpan=B;A[0].innerHTML+=C;};FCKTableHandler.SplitCell=function(){var A=FCKTableHandler.GetSelectedCells();if (A.length!=1) return;var B=this._CreateTableMap(A[0].parentNode.parentNode);var C=FCKTableHandler._GetCellIndexSpan(B,A[0].parentNode.rowIndex,A[0]);var D=this._GetCollumnCells(B,C);for (var i=0;i<D.length;i++){if (D[i]==A[0]){var E=this.InsertCell(A[0]);if (!isNaN(A[0].rowSpan)&&A[0].rowSpan>1) E.rowSpan=A[0].rowSpan;}else{if (isNaN(D[i].colSpan)) D[i].colSpan=2;else D[i].colSpan+=1;};};};FCKTableHandler._GetCellIndexSpan=function(A,B,C){if (A.length<B+1) return null;var D=A[B];for (var c=0;c<D.length;c++){if (D[c]==C) return c;};return null;};FCKTableHandler._GetCollumnCells=function(A,B){var C=new Array();for (var r=0;r<A.length;r++){var D=A[r][B];if (D&&(C.length==0||C[C.length-1]!=D)) C[C.length]=D;};return C;};FCKTableHandler._CreateTableMap=function(A){var B=A.rows;var r=-1;var C=new Array();for (var i=0;i<B.length;i++){r++;if (!C[r]) C[r]=new Array();var c=-1;for (var j=0;j<B[i].cells.length;j++){var D=B[i].cells[j];c++;while (C[r][c]) c++;var E=isNaN(D.colSpan)?1:D.colSpan;var F=isNaN(D.rowSpan)?1:D.rowSpan;for (var G=0;G<F;G++){if (!C[r+G]) C[r+G]=new Array();for (var H=0;H<E;H++){C[r+G][c+H]=B[i].cells[j];};};c+=E-1;};};return C;};FCKTableHandler.ClearRow=function(A){var B=A.cells;for (var i=0;i<B.length;i++){if (FCKBrowserInfo.IsGecko) B[i].innerHTML=GECKO_BOGUS;else B[i].innerHTML='';};}
19
FCKTableHandler.GetSelectedCells=function(){var aCells=new Array();var oRange=FCK.EditorDocument.selection.createRange();var oParent=oRange.parentElement();if (oParent&&oParent.tagName=="TD") aCells[0]=oParent;else{var oParent=FCKSelection.MoveToAncestorNode("TABLE");if (oParent){for (var i=0;i<oParent.cells.length;i++){var oCellRange=FCK.EditorDocument.selection.createRange();oCellRange.moveToElementText(oParent.cells[i]);if (oRange.inRange(oCellRange)||(oRange.compareEndPoints('StartToStart',oCellRange)>=0&&oRange.compareEndPoints('StartToEnd',oCellRange)<=0)||(oRange.compareEndPoints('EndToStart',oCellRange)>=0&&oRange.compareEndPoints('EndToEnd',oCellRange)<=0)){aCells[aCells.length]=oParent.cells[i];};};};};return aCells;};
21
FCKTableHandler.GetSelectedCells=function(){var A=new Array();var B=FCK.EditorDocument.selection.createRange();var C=B.parentElement();if (C&&C.tagName=="TD") A[0]=C;else{var C=FCKSelection.MoveToAncestorNode("TABLE");if (C){for (var i=0;i<C.cells.length;i++){var E=FCK.EditorDocument.selection.createRange();E.moveToElementText(C.cells[i]);if (B.inRange(E)||(B.compareEndPoints('StartToStart',E)>=0&&B.compareEndPoints('StartToEnd',E)<=0)||(B.compareEndPoints('EndToStart',E)>=0&&B.compareEndPoints('EndToEnd',E)<=0)){A[A.length]=C.cells[i];};};};};return A;};
20
var FCKXml;if (!(FCKXml=NS.FCKXml)){FCKXml=NS.FCKXml=function(){};FCKXml.prototype.LoadUrl=function(urlToCall){var oXmlHttp=FCKTools.CreateXmlObject('XmlHttp');oXmlHttp.open("GET",urlToCall,false);oXmlHttp.send(null);if (oXmlHttp.status==200) this.DOMDocument=oXmlHttp.responseXML;else if (oXmlHttp.status==0&&oXmlHttp.readyState==4){this.DOMDocument=FCKTools.CreateXmlObject('DOMDocument');this.DOMDocument.async=false;this.DOMDocument.resolveExternals=false;this.DOMDocument.loadXML(oXmlHttp.responseText);}else alert('Error loading "'+urlToCall+'"');};FCKXml.prototype.SelectNodes=function(xpath,contextNode){if (contextNode) return contextNode.selectNodes(xpath);else return this.DOMDocument.selectNodes(xpath);};FCKXml.prototype.SelectSingleNode=function(xpath,contextNode){if (contextNode) return contextNode.selectSingleNode(xpath);else return this.DOMDocument.selectSingleNode(xpath);};}
22
var FCKXml;if (!(FCKXml=NS.FCKXml)){FCKXml=NS.FCKXml=function(){this.Error=false;};FCKXml.prototype.LoadUrl=function(A){this.Error=false;var B=FCKTools.CreateXmlObject('XmlHttp');if (!B){this.Error=true;return;};B.open("GET",A,false);B.send(null);if (B.status==200||B.status==304) this.DOMDocument=B.responseXML;else if (B.status==0&&B.readyState==4){this.DOMDocument=FCKTools.CreateXmlObject('DOMDocument');this.DOMDocument.async=false;this.DOMDocument.resolveExternals=false;this.DOMDocument.loadXML(B.responseText);}else{this.Error=true;alert('Error loading "'+A+'"');};};FCKXml.prototype.SelectNodes=function(A,B){if (this.Error) return new Array();if (B) return B.selectNodes(A);else return this.DOMDocument.selectNodes(A);};FCKXml.prototype.SelectSingleNode=function(A,B){if (this.Error) return;if (B) return B.selectSingleNode(A);else return this.DOMDocument.selectSingleNode(A);};}
21
var FCKStyleDef=function(name,element){this.Name=name;this.Element=element.toUpperCase();this.IsObjectElement=FCKRegexLib.ObjectElements.test(this.Element);this.Attributes=new Object();};FCKStyleDef.prototype.AddAttribute=function(name,value){this.Attributes[name]=value;};FCKStyleDef.prototype.GetOpenerTag=function(){var s='<'+this.Element;for (var a in this.Attributes) s+=' '+a+'="'+this.Attributes[a]+'"';return s+'>';};FCKStyleDef.prototype.GetCloserTag=function(){return '</'+this.Element+'>';};FCKStyleDef.prototype.RemoveFromSelection=function(){if (FCKSelection.GetType()=='Control') this._RemoveMe(FCKSelection.GetSelectedElement());else this._RemoveMe(FCKSelection.GetParentElement());}
23
var FCKStyleDef=function(A,B){this.Name=A;this.Element=B.toUpperCase();this.IsObjectElement=FCKRegexLib.ObjectElements.test(this.Element);this.Attributes=new Object();};FCKStyleDef.prototype.AddAttribute=function(A,B){this.Attributes[A]=B;};FCKStyleDef.prototype.GetOpenerTag=function(){var s='<'+this.Element;for (var a in this.Attributes) s+=' '+a+'="'+this.Attributes[a]+'"';return s+'>';};FCKStyleDef.prototype.GetCloserTag=function(){return '</'+this.Element+'>';};FCKStyleDef.prototype.RemoveFromSelection=function(){if (FCKSelection.GetType()=='Control') this._RemoveMe(FCKSelection.GetSelectedElement());else this._RemoveMe(FCKSelection.GetParentElement());}
22
FCKStyleDef.prototype.ApplyToSelection=function(){var oSelection=FCK.EditorDocument.selection;if (oSelection.type=='Text'){var oRange=oSelection.createRange();var e=document.createElement(this.Element);e.innerHTML=oRange.htmlText;this._AddAttributes(e);this._RemoveDuplicates(e);oRange.pasteHTML(e.outerHTML);}else if (oSelection.type=='Control'){var oControl=FCKSelection.GetSelectedElement();if (oControl.tagName==this.Element) this._AddAttributes(oControl);};};FCKStyleDef.prototype._AddAttributes=function(targetElement){for (var a in this.Attributes){if (a.toLowerCase()=='style') targetElement.style.cssText=this.Attributes[a];else targetElement.setAttribute(a,this.Attributes[a],0);};};FCKStyleDef.prototype._RemoveDuplicates=function(parent){for (var i=0;i<parent.children.length;i++){var oChild=parent.children[i];this._RemoveDuplicates(oChild);if (this.IsEqual(oChild)){oChild.insertAdjacentHTML('beforeBegin',oChild.innerHTML);oChild.parentElement.removeChild(oChild);};};};FCKStyleDef.prototype.IsEqual=function(e){if (e.tagName!=this.Element) return false;for (var a in this.Attributes){switch (a.toLowerCase()){case 'style':if (e.style.cssText.toLowerCase()!=this.Attributes[a].toLowerCase()) return false;break;case 'class':if (e.getAttribute('className',0)!=this.Attributes[a]) return false;break;default:if (e.getAttribute(a,0)!=this.Attributes[a]) return false;};};return true;};FCKStyleDef.prototype._RemoveMe=function(elementToCheck){if (!elementToCheck) return;var oParent=elementToCheck.parentElement;if (this.IsEqual(elementToCheck)){if (this.IsObjectElement){for (var a in this.Attributes){switch (a.toLowerCase()){case 'class':elementToCheck.removeAttribute('className',0);break;default:elementToCheck.removeAttribute(a,0);};};return;}else FCKTools.RemoveOuterTags(elementToCheck);};this._RemoveMe(oParent);}
24
FCKStyleDef.prototype.ApplyToSelection=function(){var A=FCK.EditorDocument.selection;if (A.type=='Text'){var B=A.createRange();var e=document.createElement(this.Element);e.innerHTML=B.htmlText;this._AddAttributes(e);this._RemoveDuplicates(e);B.pasteHTML(e.outerHTML);}else if (A.type=='Control'){var C=FCKSelection.GetSelectedElement();if (C.tagName==this.Element) this._AddAttributes(C);};};FCKStyleDef.prototype._AddAttributes=function(A){for (var a in this.Attributes){if (a.toLowerCase()=='style') A.style.cssText=this.Attributes[a];else A.setAttribute(a,this.Attributes[a],0);};};FCKStyleDef.prototype._RemoveDuplicates=function(A){for (var i=0;i<A.children.length;i++){var B=A.children[i];this._RemoveDuplicates(B);if (this.IsEqual(B)){B.insertAdjacentHTML('beforeBegin',B.innerHTML);B.parentElement.removeChild(B);};};};FCKStyleDef.prototype.IsEqual=function(e){if (e.tagName!=this.Element) return false;for (var a in this.Attributes){switch (a.toLowerCase()){case 'style':if (e.style.cssText.toLowerCase()!=this.Attributes[a].toLowerCase()) return false;break;case 'class':if (e.getAttribute('className',0)!=this.Attributes[a]) return false;break;default:if (e.getAttribute(a,0)!=this.Attributes[a]) return false;};};return true;};FCKStyleDef.prototype._RemoveMe=function(A){if (!A) return;var B=A.parentElement;if (this.IsEqual(A)){if (this.IsObjectElement){for (var a in this.Attributes){switch (a.toLowerCase()){case 'class':A.removeAttribute('className',0);break;default:A.removeAttribute(a,0);};};return;}else FCKTools.RemoveOuterTags(A);};this._RemoveMe(B);}
23
var FCKStylesLoader=function(){this.Styles=new Object();this.StyleGroups=new Object();this.Loaded=false;this.HasObjectElements=false;};FCKStylesLoader.prototype.Load=function(stylesXmlUrl){var oXml=new FCKXml();oXml.LoadUrl(stylesXmlUrl);var aStyleNodes=oXml.SelectNodes('Styles/Style');for (var i=0;i<aStyleNodes.length;i++){var sElement=aStyleNodes[i].attributes.getNamedItem('element').value.toUpperCase();var oStyleDef=new FCKStyleDef(aStyleNodes[i].attributes.getNamedItem('name').value,sElement);if (oStyleDef.IsObjectElement) this.HasObjectElements=true;var aAttNodes=oXml.SelectNodes('Attribute',aStyleNodes[i]);for (var j=0;j<aAttNodes.length;j++){var sAttName=aAttNodes[j].attributes.getNamedItem('name').value;var sAttValue=aAttNodes[j].attributes.getNamedItem('value').value;if (sAttName.toLowerCase()=='style'){var oTempE=document.createElement('SPAN');oTempE.style.cssText=sAttValue;sAttValue=oTempE.style.cssText;};oStyleDef.AddAttribute(sAttName,sAttValue);};this.Styles[oStyleDef.Name]=oStyleDef;var aGroup=this.StyleGroups[sElement];if (aGroup==null){this.StyleGroups[sElement]=new Array();aGroup=this.StyleGroups[sElement];};aGroup[aGroup.length]=oStyleDef;};this.Loaded=true;}
25
var FCKStylesLoader=function(){this.Styles=new Object();this.StyleGroups=new Object();this.Loaded=false;this.HasObjectElements=false;};FCKStylesLoader.prototype.Load=function(A){var B=new FCKXml();B.LoadUrl(A);var C=B.SelectNodes('Styles/Style');for (var i=0;i<C.length;i++){var D=C[i].attributes.getNamedItem('element').value.toUpperCase();var E=new FCKStyleDef(C[i].attributes.getNamedItem('name').value,D);if (E.IsObjectElement) this.HasObjectElements=true;var F=B.SelectNodes('Attribute',C[i]);for (var j=0;j<F.length;j++){var G=F[j].attributes.getNamedItem('name').value;var H=F[j].attributes.getNamedItem('value').value;if (G.toLowerCase()=='style'){var I=document.createElement('SPAN');I.style.cssText=H;H=I.style.cssText;};E.AddAttribute(G,H);};this.Styles[E.Name]=E;var J=this.StyleGroups[D];if (J==null){this.StyleGroups[D]=new Array();J=this.StyleGroups[D];};J[J.length]=E;};this.Loaded=true;}
24
var FCKNamedCommand=function(commandName){this.Name=commandName;};FCKNamedCommand.prototype.Execute=function(){FCK.ExecuteNamedCommand(this.Name);};FCKNamedCommand.prototype.GetState=function(){return FCK.GetNamedCommandState(this.Name);};
26
var FCKNamedCommand=function(A){this.Name=A;};FCKNamedCommand.prototype.Execute=function(){FCK.ExecuteNamedCommand(this.Name);};FCKNamedCommand.prototype.GetState=function(){return FCK.GetNamedCommandState(this.Name);};
25
var FCKDialogCommand=function(name,title,url,width,height,getStateFunction,getStateParam){this.Name=name;this.Title=title;this.Url=url;this.Width=width;this.Height=height;this.GetStateFunction=getStateFunction;this.GetStateParam=getStateParam;};FCKDialogCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_'+this.Name,this.Title,this.Url,this.Width,this.Height);};FCKDialogCommand.prototype.GetState=function(){if (this.GetStateFunction) return this.GetStateFunction(this.GetStateParam);else return FCK_TRISTATE_OFF;};var FCKUndefinedCommand=function(){this.Name='Undefined';};FCKUndefinedCommand.prototype.Execute=function(){alert(FCKLang.NotImplemented);};FCKUndefinedCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKFontNameCommand=function(){this.Name='FontName';};FCKFontNameCommand.prototype.Execute=function(fontName){if (fontName==null||fontName==""){}else FCK.ExecuteNamedCommand('FontName',fontName);};FCKFontNameCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontName');};var FCKFontSizeCommand=function(){this.Name='FontSize';};FCKFontSizeCommand.prototype.Execute=function(fontSize){if (typeof(fontSize)=='string') fontSize=parseInt(fontSize);if (fontSize==null||fontSize==''){FCK.ExecuteNamedCommand('FontSize',3);}else FCK.ExecuteNamedCommand('FontSize',fontSize);};FCKFontSizeCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontSize');};var FCKFormatBlockCommand=function(){this.Name='FormatBlock';};FCKFormatBlockCommand.prototype.Execute=function(formatName){if (formatName==null||formatName=='') FCK.ExecuteNamedCommand('FormatBlock','<P>');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;if (typeof(oForm.onsubmit)=='function'){var bRet=oForm.onsubmit();if (bRet!=null&&bRet===false) return;};oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();FCK.SetHTML('');};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){if (FCKBrowserInfo.IsGecko){var iWidth=screen.width*0.65;var iHeight=screen.height*0.65;FCKDialog.OpenDialog('FCKDialog_Source',FCKLang.Source,'dialog/fck_source.html',iWidth,iHeight,null,null,true);}else FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);};var FCKUndoCommand=function(){this.Name='Undo';};FCKUndoCommand.prototype.Execute=function(){if (FCKBrowserInfo.IsIE) FCKUndo.Undo();else FCK.ExecuteNamedCommand('Undo');};FCKUndoCommand.prototype.GetState=function(){if (FCKBrowserInfo.IsIE) return (FCKUndo.Typing||FCKUndo.CurrentIndex>0?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED);else return FCK.GetNamedCommandState('Undo');};var FCKRedoCommand=function(){this.Name='Redo';};FCKRedoCommand.prototype.Execute=function(){if (FCKBrowserInfo.IsIE) FCKUndo.Redo();else FCK.ExecuteNamedCommand('Redo');};FCKRedoCommand.prototype.GetState=function(){if (FCKBrowserInfo.IsIE) return (!FCKUndo.Typing&&FCKUndo.CurrentIndex<(FCKUndo.SavedData.length-1)?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED);else return FCK.GetNamedCommandState('Redo');}
27
var FCKDialogCommand=function(A,B,C,D,E,F,G){this.Name=A;this.Title=B;this.Url=C;this.Width=D;this.Height=E;this.GetStateFunction=F;this.GetStateParam=G;};FCKDialogCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_'+this.Name,this.Title,this.Url,this.Width,this.Height);};FCKDialogCommand.prototype.GetState=function(){if (this.GetStateFunction) return this.GetStateFunction(this.GetStateParam);else return FCK_TRISTATE_OFF;};var FCKUndefinedCommand=function(){this.Name='Undefined';};FCKUndefinedCommand.prototype.Execute=function(){alert(FCKLang.NotImplemented);};FCKUndefinedCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKFontNameCommand=function(){this.Name='FontName';};FCKFontNameCommand.prototype.Execute=function(A){if (A==null||A==""){}else FCK.ExecuteNamedCommand('FontName',A);};FCKFontNameCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontName');};var FCKFontSizeCommand=function(){this.Name='FontSize';};FCKFontSizeCommand.prototype.Execute=function(A){if (typeof(A)=='string') A=parseInt(A);if (A==null||A==''){FCK.ExecuteNamedCommand('FontSize',3);}else FCK.ExecuteNamedCommand('FontSize',A);};FCKFontSizeCommand.prototype.GetState=function(){return FCK.GetNamedCommandValue('FontSize');};var FCKFormatBlockCommand=function(){this.Name='FormatBlock';};FCKFormatBlockCommand.prototype.Execute=function(A){if (A==null||A=='') FCK.ExecuteNamedCommand('FormatBlock','<P>');else FCK.ExecuteNamedCommand('FormatBlock','<'+A+'>');};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 A=FCK.LinkedField.form;if (typeof(A.onsubmit)=='function'){var B=A.onsubmit();if (B!=null&&B===false) return;};A.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();FCK.SetHTML('');FCKUndo.Typing=true;};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){if (FCKBrowserInfo.IsGecko){var A=FCKConfig.ScreenWidth*0.65;var B=FCKConfig.ScreenHeight*0.65;FCKDialog.OpenDialog('FCKDialog_Source',FCKLang.Source,'dialog/fck_source.html',A,B,null,null,true);}else FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);};var FCKUndoCommand=function(){this.Name='Undo';};FCKUndoCommand.prototype.Execute=function(){if (FCKBrowserInfo.IsIE) FCKUndo.Undo();else FCK.ExecuteNamedCommand('Undo');};FCKUndoCommand.prototype.GetState=function(){if (FCKBrowserInfo.IsIE) return (FCKUndo.CheckUndoState()?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED);else return FCK.GetNamedCommandState('Undo');};var FCKRedoCommand=function(){this.Name='Redo';};FCKRedoCommand.prototype.Execute=function(){if (FCKBrowserInfo.IsIE) FCKUndo.Redo();else FCK.ExecuteNamedCommand('Redo');};FCKRedoCommand.prototype.GetState=function(){if (FCKBrowserInfo.IsIE) return (FCKUndo.CheckRedoState()?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED);else return FCK.GetNamedCommandState('Redo');}
26
var FCKSpellCheckCommand=function(){this.Name='SpellCheck';this.IsEnabled=(FCKConfig.SpellChecker=='ieSpell'||FCKConfig.SpellChecker=='SpellerPages');};FCKSpellCheckCommand.prototype.Execute=function(){switch (FCKConfig.SpellChecker){case 'ieSpell':this._RunIeSpell();break;case 'SpellerPages':FCKDialog.OpenDialog('FCKDialog_SpellCheck','Spell Check','dialog/fck_spellerpages.html',440,480);break;};};FCKSpellCheckCommand.prototype._RunIeSpell=function(){try{var oIeSpell=new ActiveXObject("ieSpell.ieSpellExtension");oIeSpell.CheckAllLinkedDocuments(FCK.EditorDocument);}catch(e){if(e.number==-2146827859){if (confirm(FCKLang.IeSpellDownload)) window.open(FCKConfig.IeSpellDownloadUrl,'IeSpellDownload');}else alert('Error Loading ieSpell: '+e.message+' ('+e.number+')');};};FCKSpellCheckCommand.prototype.GetState=function(){return this.IsEnabled?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;}
28
var FCKSpellCheckCommand=function(){this.Name='SpellCheck';this.IsEnabled=(FCKConfig.SpellChecker=='ieSpell'||FCKConfig.SpellChecker=='SpellerPages');};FCKSpellCheckCommand.prototype.Execute=function(){switch (FCKConfig.SpellChecker){case 'ieSpell':this._RunIeSpell();break;case 'SpellerPages':FCKDialog.OpenDialog('FCKDialog_SpellCheck','Spell Check','dialog/fck_spellerpages.html',440,480);break;};};FCKSpellCheckCommand.prototype._RunIeSpell=function(){try{var A=new ActiveXObject("ieSpell.ieSpellExtension");A.CheckAllLinkedDocuments(FCK.EditorDocument);}catch(e){if(e.number==-2146827859){if (confirm(FCKLang.IeSpellDownload)) window.open(FCKConfig.IeSpellDownloadUrl,'IeSpellDownload');}else alert('Error Loading ieSpell: '+e.message+' ('+e.number+')');};};FCKSpellCheckCommand.prototype.GetState=function(){return this.IsEnabled?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;}
27
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;};function FCKTextColorCommand_OnMouseOver()	{ this.className='ColorSelected';};function FCKTextColorCommand_OnMouseOut()	{ this.className='ColorDeselected';};function FCKTextColorCommand_OnClick(){this.className='ColorDeselected';this.Command.SetColor('#'+this.Color);this.Command._Panel.Hide();};function FCKTextColorCommand_AutoOnClick(){this.className='ColorDeselected';this.Command.SetColor('');this.Command._Panel.Hide();};function FCKTextColorCommand_MoreOnClick(){this.className='ColorDeselected';this.Command._Panel.Hide();FCKDialog.OpenDialog('FCKDialog_Color',FCKLang.DlgColorTitle,'dialog/fck_colorselector.html',400,330,this.Command.SetColor);};FCKTextColorCommand.prototype._CreatePanelBody=function(targetDocument,targetDiv){function CreateSelectionDiv(){var oDiv=targetDocument.createElement("DIV");oDiv.className='ColorDeselected';oDiv.onmouseover=FCKTextColorCommand_OnMouseOver;oDiv.onmouseout=FCKTextColorCommand_OnMouseOut;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='<table cellspacing="0" cellpadding="0" width="100%" border="0">\ <tr>\ <td><div class="ColorBoxBorder"><div class="ColorBox" style="background-color: #000000"></div></div></td>\ <td nowrap width="100%" align="center" unselectable="on">'+FCKLang.ColorAutomatic+'</td>\ </tr>\ </table>';oDiv.Command=this;oDiv.onclick=FCKTextColorCommand_AutoOnClick;var aColors=FCKConfig.FontColors.toString().split(',');var iCounter=0;while (iCounter<aColors.length){var oRow=oTable.insertRow(-1);for (var i=0;i<8&&iCounter<aColors.length;i++,iCounter++){var oDiv=oRow.insertCell(-1).appendChild(CreateSelectionDiv());oDiv.Color=aColors[iCounter];oDiv.innerHTML='<div class="ColorBoxBorder"><div class="ColorBox" style="background-color: #'+aColors[iCounter]+'"></div></div>';oDiv.Command=this;oDiv.onclick=FCKTextColorCommand_OnClick;};};var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td nowrap align="center">'+FCKLang.ColorMoreColors+'</td></tr></table>';oDiv.Command=this;oDiv.onclick=FCKTextColorCommand_MoreOnClick;}
29
var FCKTextColorCommand=function(A){this.Name=A=='ForeColor'?'TextColor':'BGColor';this.Type=A;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(A,B,C){FCK._ActiveColorPanelType=this.Type;this._Panel.Show(A,B,C);};FCKTextColorCommand.prototype.SetColor=function(A){if (FCK._ActiveColorPanelType=='ForeColor') FCK.ExecuteNamedCommand('ForeColor',A);else if (FCKBrowserInfo.IsGecko) FCK.ExecuteNamedCommand('hilitecolor',A);else FCK.ExecuteNamedCommand('BackColor',A);delete FCK._ActiveColorPanelType;};FCKTextColorCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};function FCKTextColorCommand_OnMouseOver()	{ this.className='ColorSelected';};function FCKTextColorCommand_OnMouseOut()	{ this.className='ColorDeselected';};function FCKTextColorCommand_OnClick(){this.className='ColorDeselected';this.Command.SetColor('#'+this.Color);this.Command._Panel.Hide();};function FCKTextColorCommand_AutoOnClick(){this.className='ColorDeselected';this.Command.SetColor('');this.Command._Panel.Hide();};function FCKTextColorCommand_MoreOnClick(){this.className='ColorDeselected';this.Command._Panel.Hide();FCKDialog.OpenDialog('FCKDialog_Color',FCKLang.DlgColorTitle,'dialog/fck_colorselector.html',400,330,this.Command.SetColor);};FCKTextColorCommand.prototype._CreatePanelBody=function(A,B){function CreateSelectionDiv(){var C=A.createElement("DIV");C.className='ColorDeselected';C.onmouseover=FCKTextColorCommand_OnMouseOver;C.onmouseout=FCKTextColorCommand_OnMouseOut;return C;};var D=B.appendChild(A.createElement("TABLE"));D.style.tableLayout='fixed';D.cellPadding=0;D.cellSpacing=0;D.border=0;D.width=150;var E=D.insertRow(-1).insertCell(-1);E.colSpan=8;var C=E.appendChild(CreateSelectionDiv());C.innerHTML='<table cellspacing="0" cellpadding="0" width="100%" border="0">\<tr>\<td><div class="ColorBoxBorder"><div class="ColorBox" style="background-color: #000000"></div></div></td>\<td nowrap width="100%" align="center" unselectable="on">' + FCKLang.ColorAutomatic + '</td>\</tr>\</table>';C.Command=this;C.onclick=FCKTextColorCommand_AutoOnClick;var G=FCKConfig.FontColors.toString().split(',');var H=0;while (H<G.length){var I=D.insertRow(-1);for (var i=0;i<8&&H<G.length;i++,H++){C=I.insertCell(-1).appendChild(CreateSelectionDiv());C.Color=G[H];C.innerHTML='<div class="ColorBoxBorder"><div class="ColorBox" style="background-color: #'+G[H]+'"></div></div>';C.Command=this;C.onclick=FCKTextColorCommand_OnClick;};};E=D.insertRow(-1).insertCell(-1);E.colSpan=8;C=E.appendChild(CreateSelectionDiv());C.innerHTML='<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td nowrap align="center">'+FCKLang.ColorMoreColors+'</td></tr></table>';C.Command=this;C.onclick=FCKTextColorCommand_MoreOnClick;}
28
var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');};
30
var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');};
29
var FCKPasteWordCommand=function(){this.Name='PasteWord';};FCKPasteWordCommand.prototype.Execute=function(){FCK.PasteFromWord();};FCKPasteWordCommand.prototype.GetState=function(){if (FCKConfig.ForcePasteAsPlainText) return FCK_TRISTATE_DISABLED;else return FCK.GetNamedCommandState('Paste');};
31
var FCKPasteWordCommand=function(){this.Name='PasteWord';};FCKPasteWordCommand.prototype.Execute=function(){FCK.PasteFromWord();};FCKPasteWordCommand.prototype.GetState=function(){if (FCKConfig.ForcePasteAsPlainText) return FCK_TRISTATE_DISABLED;else return FCK.GetNamedCommandState('Paste');};
30
var FCKTableCommand=function(command){this.Name=command;};FCKTableCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();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;}
32
var FCKTableCommand=function(A){this.Name=A;};FCKTableCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();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;}
31
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 (styleComboItem.Selected) styleComboItem.Style.RemoveFromSelection();else styleComboItem.Style.ApplyToSelection();FCK.Focus();FCK.Events.FireEvent("OnSelectionChange");};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;if (element.nodeType==1){var aStyleGroup=this.StylesLoader.StyleGroups[element.tagName];if (aStyleGroup){for (var i=0;i<aStyleGroup.length;i++){if (aStyleGroup[i].IsEqual(element)) targetArray[targetArray.length]=aStyleGroup[i];};};};if (checkParent) this._CheckStyle(element.parentNode,targetArray,checkParent);}
33
var FCKStyleCommand=function(){this.Name='Style';this.StylesLoader=new FCKStylesLoader();this.StylesLoader.Load(FCKConfig.StylesXmlPath);this.Styles=this.StylesLoader.Styles;};FCKStyleCommand.prototype.Execute=function(A,B){if (B.Selected) B.Style.RemoveFromSelection();else B.Style.ApplyToSelection();FCK.Focus();FCK.Events.FireEvent("OnSelectionChange");};FCKStyleCommand.prototype.GetState=function(){var A=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;};return FCK_TRISTATE_OFF;};FCKStyleCommand.prototype.GetActiveStyles=function(){var A=new Array();if (FCKSelection.GetType()=='Control') this._CheckStyle(FCKSelection.GetSelectedElement(),A,false);else this._CheckStyle(FCKSelection.GetParentElement(),A,true);return A;};FCKStyleCommand.prototype._CheckStyle=function(A,B,C){if (!A) return;if (A.nodeType==1){var D=this.StylesLoader.StyleGroups[A.tagName];if (D){for (var i=0;i<D.length;i++){if (D[i].IsEqual(A)) B[B.length]=D[i];};};};if (C) this._CheckStyle(A.parentNode,B,C);}
32
var FCKCommands=FCK.Commands=new Object();FCKCommands.LoadedCommands=new Object();FCKCommands.RegisterCommand=function(commandName,command){this.LoadedCommands[commandName]=command;};FCKCommands.GetCommand=function(commandName){var oCommand=FCKCommands.LoadedCommands[commandName];if (oCommand) return oCommand;switch (commandName){case 'DocProps':oCommand=new FCKDialogCommand('DocProps',FCKLang.DocProps,'dialog/fck_docprops.html',400,390,FCKCommands.GetFullPageState);break;case 'Templates':oCommand=new FCKDialogCommand('Templates',FCKLang.DlgTemplatesTitle,'dialog/fck_template.html',380,450);break;case 'Link':oCommand=new FCKDialogCommand('Link',FCKLang.DlgLnkWindowTitle,'dialog/fck_link.html',400,330,FCK.GetNamedCommandState,'CreateLink');break;case 'Anchor':oCommand=new FCKDialogCommand('Anchor',FCKLang.DlgAnchorTitle,'dialog/fck_anchor.html',370,170);break;case 'BulletedList':oCommand=new FCKDialogCommand('BulletedList',FCKLang.BulletedListProp,'dialog/fck_listprop.html',370,170);break;case 'NumberedList':oCommand=new FCKDialogCommand('NumberedList',FCKLang.NumberedListProp,'dialog/fck_listprop.html',370,170);break;case 'About':oCommand=new FCKDialogCommand('About',FCKLang.About,'dialog/fck_about.html',400,330);break;case 'Find':oCommand=new FCKDialogCommand('Find',FCKLang.DlgFindTitle,'dialog/fck_find.html',340,170);break;case 'Replace':oCommand=new FCKDialogCommand('Replace',FCKLang.DlgReplaceTitle,'dialog/fck_replace.html',340,200);break;case 'Image':oCommand=new FCKDialogCommand('Image',FCKLang.DlgImgTitle,'dialog/fck_image.html',450,400);break;case 'Flash':oCommand=new FCKDialogCommand('Flash',FCKLang.DlgFlashTitle,'dialog/fck_flash.html',450,400);break;case 'SpecialChar':oCommand=new FCKDialogCommand('SpecialChar',FCKLang.DlgSpecialCharTitle,'dialog/fck_specialchar.html',400,300);break;case 'Smiley':oCommand=new FCKDialogCommand('Smiley',FCKLang.DlgSmileyTitle,'dialog/fck_smiley.html',FCKConfig.SmileyWindowWidth,FCKConfig.SmileyWindowHeight);break;case 'Table':oCommand=new FCKDialogCommand('Table',FCKLang.DlgTableTitle,'dialog/fck_table.html',400,250);break;case 'TableProp':oCommand=new FCKDialogCommand('Table',FCKLang.DlgTableTitle,'dialog/fck_table.html?Parent',400,250);break;case 'TableCellProp':oCommand=new FCKDialogCommand('TableCell',FCKLang.DlgCellTitle,'dialog/fck_tablecell.html',500,250);break;case 'UniversalKey':oCommand=new FCKDialogCommand('UniversalKey',FCKLang.UniversalKeyboard,'dialog/fck_universalkey.html',415,300);break;case 'Style':oCommand=new FCKStyleCommand();break;case 'FontName':oCommand=new FCKFontNameCommand();break;case 'FontSize':oCommand=new FCKFontSizeCommand();break;case 'FontFormat':oCommand=new FCKFormatBlockCommand();break;case 'Source':oCommand=new FCKSourceCommand();break;case 'Preview':oCommand=new FCKPreviewCommand();break;case 'Save':oCommand=new FCKSaveCommand();break;case 'NewPage':oCommand=new FCKNewPageCommand();break;case 'TextColor':oCommand=new FCKTextColorCommand('ForeColor');break;case 'BGColor':oCommand=new FCKTextColorCommand('BackColor');break;case 'PasteText':oCommand=new FCKPastePlainTextCommand();break;case 'PasteWord':oCommand=new FCKPasteWordCommand();break;case 'TableInsertRow':oCommand=new FCKTableCommand('TableInsertRow');break;case 'TableDeleteRows':oCommand=new FCKTableCommand('TableDeleteRows');break;case 'TableInsertColumn':oCommand=new FCKTableCommand('TableInsertColumn');break;case 'TableDeleteColumns':oCommand=new FCKTableCommand('TableDeleteColumns');break;case 'TableInsertCell':oCommand=new FCKTableCommand('TableInsertCell');break;case 'TableDeleteCells':oCommand=new FCKTableCommand('TableDeleteCells');break;case 'TableMergeCells':oCommand=new FCKTableCommand('TableMergeCells');break;case 'TableSplitCell':oCommand=new FCKTableCommand('TableSplitCell');break;case 'Form':oCommand=new FCKDialogCommand('Form',FCKLang.Form,'dialog/fck_form.html',380,230);break;case 'Checkbox':oCommand=new FCKDialogCommand('Checkbox',FCKLang.Checkbox,'dialog/fck_checkbox.html',380,230);break;case 'Radio':oCommand=new FCKDialogCommand('Radio',FCKLang.RadioButton,'dialog/fck_radiobutton.html',380,230);break;case 'TextField':oCommand=new FCKDialogCommand('TextField',FCKLang.TextField,'dialog/fck_textfield.html',380,230);break;case 'Textarea':oCommand=new FCKDialogCommand('Textarea',FCKLang.Textarea,'dialog/fck_textarea.html',380,230);break;case 'HiddenField':oCommand=new FCKDialogCommand('HiddenField',FCKLang.HiddenField,'dialog/fck_hiddenfield.html',380,230);break;case 'Button':oCommand=new FCKDialogCommand('Button',FCKLang.Button,'dialog/fck_button.html',380,230);break;case 'Select':oCommand=new FCKDialogCommand('Select',FCKLang.SelectionField,'dialog/fck_select.html',400,380);break;case 'ImageButton':oCommand=new FCKDialogCommand('ImageButton',FCKLang.ImageButton,'dialog/fck_image.html?ImageButton',450,400);break;case 'SpellCheck':oCommand=new FCKSpellCheckCommand();break;case 'Undo':oCommand=new FCKUndoCommand();break;case 'Redo':oCommand=new FCKRedoCommand();break;case 'Undefined':oCommand=new FCKUndefinedCommand();break;default:if (FCKRegexLib.NamedCommands.test(commandName)) oCommand=new FCKNamedCommand(commandName);else{alert(FCKLang.UnknownCommand.replace(/%1/g,commandName));return;};};FCKCommands.LoadedCommands[commandName]=oCommand;return oCommand;};FCKCommands.GetFullPageState=function(){return FCKConfig.FullPage?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;};
34
var FCKCommands=FCK.Commands=new Object();FCKCommands.LoadedCommands=new Object();FCKCommands.RegisterCommand=function(A,B){this.LoadedCommands[A]=B;};FCKCommands.GetCommand=function(A){var B=FCKCommands.LoadedCommands[A];if (B) return B;switch (A){case 'DocProps':B=new FCKDialogCommand('DocProps',FCKLang.DocProps,'dialog/fck_docprops.html',400,390,FCKCommands.GetFullPageState);break;case 'Templates':B=new FCKDialogCommand('Templates',FCKLang.DlgTemplatesTitle,'dialog/fck_template.html',380,450);break;case 'Link':B=new FCKDialogCommand('Link',FCKLang.DlgLnkWindowTitle,'dialog/fck_link.html',400,330,FCK.GetNamedCommandState,'CreateLink');break;case 'Anchor':B=new FCKDialogCommand('Anchor',FCKLang.DlgAnchorTitle,'dialog/fck_anchor.html',370,170);break;case 'BulletedList':B=new FCKDialogCommand('BulletedList',FCKLang.BulletedListProp,'dialog/fck_listprop.html',370,170);break;case 'NumberedList':B=new FCKDialogCommand('NumberedList',FCKLang.NumberedListProp,'dialog/fck_listprop.html',370,170);break;case 'About':B=new FCKDialogCommand('About',FCKLang.About,'dialog/fck_about.html',400,330);break;case 'Find':B=new FCKDialogCommand('Find',FCKLang.DlgFindTitle,'dialog/fck_find.html',340,170);break;case 'Replace':B=new FCKDialogCommand('Replace',FCKLang.DlgReplaceTitle,'dialog/fck_replace.html',340,200);break;case 'Image':B=new FCKDialogCommand('Image',FCKLang.DlgImgTitle,'dialog/fck_image.html',450,400);break;case 'Flash':B=new FCKDialogCommand('Flash',FCKLang.DlgFlashTitle,'dialog/fck_flash.html',450,400);break;case 'SpecialChar':B=new FCKDialogCommand('SpecialChar',FCKLang.DlgSpecialCharTitle,'dialog/fck_specialchar.html',400,300);break;case 'Smiley':B=new FCKDialogCommand('Smiley',FCKLang.DlgSmileyTitle,'dialog/fck_smiley.html',FCKConfig.SmileyWindowWidth,FCKConfig.SmileyWindowHeight);break;case 'Table':B=new FCKDialogCommand('Table',FCKLang.DlgTableTitle,'dialog/fck_table.html',400,250);break;case 'TableProp':B=new FCKDialogCommand('Table',FCKLang.DlgTableTitle,'dialog/fck_table.html?Parent',400,250);break;case 'TableCellProp':B=new FCKDialogCommand('TableCell',FCKLang.DlgCellTitle,'dialog/fck_tablecell.html',500,250);break;case 'UniversalKey':B=new FCKDialogCommand('UniversalKey',FCKLang.UniversalKeyboard,'dialog/fck_universalkey.html',415,300);break;case 'Style':B=new FCKStyleCommand();break;case 'FontName':B=new FCKFontNameCommand();break;case 'FontSize':B=new FCKFontSizeCommand();break;case 'FontFormat':B=new FCKFormatBlockCommand();break;case 'Source':B=new FCKSourceCommand();break;case 'Preview':B=new FCKPreviewCommand();break;case 'Save':B=new FCKSaveCommand();break;case 'NewPage':B=new FCKNewPageCommand();break;case 'TextColor':B=new FCKTextColorCommand('ForeColor');break;case 'BGColor':B=new FCKTextColorCommand('BackColor');break;case 'PasteText':B=new FCKPastePlainTextCommand();break;case 'PasteWord':B=new FCKPasteWordCommand();break;case 'TableInsertRow':B=new FCKTableCommand('TableInsertRow');break;case 'TableDeleteRows':B=new FCKTableCommand('TableDeleteRows');break;case 'TableInsertColumn':B=new FCKTableCommand('TableInsertColumn');break;case 'TableDeleteColumns':B=new FCKTableCommand('TableDeleteColumns');break;case 'TableInsertCell':B=new FCKTableCommand('TableInsertCell');break;case 'TableDeleteCells':B=new FCKTableCommand('TableDeleteCells');break;case 'TableMergeCells':B=new FCKTableCommand('TableMergeCells');break;case 'TableSplitCell':B=new FCKTableCommand('TableSplitCell');break;case 'Form':B=new FCKDialogCommand('Form',FCKLang.Form,'dialog/fck_form.html',380,230);break;case 'Checkbox':B=new FCKDialogCommand('Checkbox',FCKLang.Checkbox,'dialog/fck_checkbox.html',380,230);break;case 'Radio':B=new FCKDialogCommand('Radio',FCKLang.RadioButton,'dialog/fck_radiobutton.html',380,230);break;case 'TextField':B=new FCKDialogCommand('TextField',FCKLang.TextField,'dialog/fck_textfield.html',380,230);break;case 'Textarea':B=new FCKDialogCommand('Textarea',FCKLang.Textarea,'dialog/fck_textarea.html',380,230);break;case 'HiddenField':B=new FCKDialogCommand('HiddenField',FCKLang.HiddenField,'dialog/fck_hiddenfield.html',380,230);break;case 'Button':B=new FCKDialogCommand('Button',FCKLang.Button,'dialog/fck_button.html',380,230);break;case 'Select':B=new FCKDialogCommand('Select',FCKLang.SelectionField,'dialog/fck_select.html',400,380);break;case 'ImageButton':B=new FCKDialogCommand('ImageButton',FCKLang.ImageButton,'dialog/fck_image.html?ImageButton',450,400);break;case 'SpellCheck':B=new FCKSpellCheckCommand();break;case 'Undo':B=new FCKUndoCommand();break;case 'Redo':B=new FCKRedoCommand();break;case 'Undefined':B=new FCKUndefinedCommand();break;default:if (FCKRegexLib.NamedCommands.test(A)) B=new FCKNamedCommand(A);else{alert(FCKLang.UnknownCommand.replace(/%1/g,A));return null;};};FCKCommands.LoadedCommands[A]=B;return B;};FCKCommands.GetFullPageState=function(){return FCKConfig.FullPage?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;};
33
var FCKToolbarButton=function(commandName,label,tooltip,style,sourceView,contextSensitive){this.Command=FCKCommands.GetCommand(commandName);this.Label=label?label:commandName;this.Tooltip=tooltip?tooltip:(label?label:commandName);this.Style=style?style:FCK_TOOLBARITEM_ONLYICON;this.SourceView=sourceView?true:false;this.ContextSensitive=contextSensitive?true:false;this.IconPath=FCKConfig.SkinPath+'toolbar/'+commandName.toLowerCase()+'.gif';this.State=FCK_UNKNOWN;};FCKToolbarButton.prototype.CreateInstance=function(parentToolbar){this.DOMDiv=document.createElement('div');this.DOMDiv.className='TB_Button_Off';this.DOMDiv.FCKToolbarButton=this;var sHtml='<table title="'+this.Tooltip+'" cellspacing="0" cellpadding="0" border="0" unselectable="on">'+'<tr>';if (this.Style!=FCK_TOOLBARITEM_ONLYTEXT) sHtml+='<td class="TB_Icon" unselectable="on"><img src="'+this.IconPath+'" width="21" height="21" unselectable="on"></td>';if (this.Style!=FCK_TOOLBARITEM_ONLYICON) sHtml+='<td class="TB_Text" unselectable="on" nowrap>'+this.Label+'</td>';sHtml+='</tr>'+'</table>';this.DOMDiv.innerHTML=sHtml;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';this.DOMDiv.onmouseover=FCKToolbarButton_OnMouseOnOver;this.DOMDiv.onmouseout=FCKToolbarButton_OnMouseOnOut;this.DOMDiv.onclick=FCKToolbarButton_OnClick;break;case FCK_TRISTATE_OFF:this.DOMDiv.className='TB_Button_Off';this.DOMDiv.onmouseover=FCKToolbarButton_OnMouseOffOver;this.DOMDiv.onmouseout=FCKToolbarButton_OnMouseOffOut;this.DOMDiv.onclick=FCKToolbarButton_OnClick;break;default:this.Disable();break;};};function FCKToolbarButton_OnMouseOnOver(){this.className='TB_Button_On TB_Button_On_Over';};function FCKToolbarButton_OnMouseOnOut(){this.className='TB_Button_On';};function FCKToolbarButton_OnMouseOffOver(){this.className='TB_Button_On TB_Button_Off_Over';};function FCKToolbarButton_OnMouseOffOut(){this.className='TB_Button_Off';};function FCKToolbarButton_OnClick(e){this.FCKToolbarButton.Click(e);return false;};FCKToolbarButton.prototype.Click=function(){this.Command.Execute();};FCKToolbarButton.prototype.Enable=function(){this.RefreshState();};FCKToolbarButton.prototype.Disable=function(){this.State=FCK_TRISTATE_DISABLED;this.DOMDiv.className='TB_Button_Disabled';this.DOMDiv.onmouseover=null;this.DOMDiv.onmouseout=null;this.DOMDiv.onclick=null;}
35
var FCKToolbarButton=function(A,B,C,D,E,F){this.Command=FCKCommands.GetCommand(A);this.Label=B?B:A;this.Tooltip=C?C:(B?B:A);this.Style=D?D:FCK_TOOLBARITEM_ONLYICON;this.SourceView=E?true:false;this.ContextSensitive=F?true:false;this.IconPath=FCKConfig.SkinPath+'toolbar/'+A.toLowerCase()+'.gif';this.State=FCK_UNKNOWN;};FCKToolbarButton.prototype.CreateInstance=function(A){this.DOMDiv=document.createElement('div');this.DOMDiv.className='TB_Button_Off';this.DOMDiv.FCKToolbarButton=this;var B='<table title="'+this.Tooltip+'" cellspacing="0" cellpadding="0" border="0" unselectable="on">'+'<tr>';if (this.Style!=FCK_TOOLBARITEM_ONLYTEXT) B+='<td class="TB_Icon" unselectable="on"><img src="'+this.IconPath+'" width="21" height="21" unselectable="on"></td>';if (this.Style!=FCK_TOOLBARITEM_ONLYICON) B+='<td class="TB_Text" unselectable="on" nowrap>'+this.Label+'</td>';B+='</tr>'+'</table>';this.DOMDiv.innerHTML=B;var C=A.DOMRow.insertCell(-1);C.appendChild(this.DOMDiv);this.RefreshState();};FCKToolbarButton.prototype.RefreshState=function(){var A=this.Command.GetState();if (A==this.State) return;this.State=A;switch (this.State){case FCK_TRISTATE_ON:this.DOMDiv.className='TB_Button_On';this.DOMDiv.onmouseover=FCKToolbarButton_OnMouseOnOver;this.DOMDiv.onmouseout=FCKToolbarButton_OnMouseOnOut;this.DOMDiv.onclick=FCKToolbarButton_OnClick;break;case FCK_TRISTATE_OFF:this.DOMDiv.className='TB_Button_Off';this.DOMDiv.onmouseover=FCKToolbarButton_OnMouseOffOver;this.DOMDiv.onmouseout=FCKToolbarButton_OnMouseOffOut;this.DOMDiv.onclick=FCKToolbarButton_OnClick;break;default:this.Disable();break;};};function FCKToolbarButton_OnMouseOnOver(){this.className='TB_Button_On TB_Button_On_Over';};function FCKToolbarButton_OnMouseOnOut(){this.className='TB_Button_On';};function FCKToolbarButton_OnMouseOffOver(){this.className='TB_Button_On TB_Button_Off_Over';};function FCKToolbarButton_OnMouseOffOut(){this.className='TB_Button_Off';};function FCKToolbarButton_OnClick(e){this.FCKToolbarButton.Click(e);return false;};FCKToolbarButton.prototype.Click=function(){this.Command.Execute();};FCKToolbarButton.prototype.Enable=function(){this.RefreshState();};FCKToolbarButton.prototype.Disable=function(){this.State=FCK_TRISTATE_DISABLED;this.DOMDiv.className='TB_Button_Disabled';this.DOMDiv.onmouseover=null;this.DOMDiv.onmouseout=null;this.DOMDiv.onclick=null;}
34
var FCKSpecialCombo=function(caption){this.FieldWidth=80;this.PanelWidth=130;this.PanelMaxHeight=150;this.Label='&nbsp;';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='<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>';this._ItemsHolderEl=this._Panel.PanelDiv.getElementsByTagName('TD')[0];};function FCKSpecialCombo_ItemOnMouseOver(){this.className+=' SC_ItemOver';};function FCKSpecialCombo_ItemOnMouseOut(){this.className=this.originalClass;};function FCKSpecialCombo_ItemOnClick(){this.FCKSpecialCombo._Panel.Hide();this.FCKSpecialCombo.SetLabel(this.FCKItemLabel);if (typeof(this.FCKSpecialCombo.OnSelect)=='function') this.FCKSpecialCombo.OnSelect(this.FCKItemID,this);};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=FCKSpecialCombo_ItemOnMouseOver;oDiv.onmouseout=FCKSpecialCombo_ItemOnMouseOut;oDiv.onclick=FCKSpecialCombo_ItemOnClick;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){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?'&nbsp;':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='<table width="100%" cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;" unselectable="on"><tbody><tr><td class="SC_FieldLabel" unselectable="on"><label unselectable="on">&nbsp;</label></td><td class="SC_FieldButton" unselectable="on">&nbsp;</td></tr></tbody></table>';this._LabelEl=oField.getElementsByTagName('label')[0];this._LabelEl.innerHTML=this.Label;oField.SpecialCombo=this;oField.onmouseover=FCKSpecialCombo_OnMouseOver;oField.onmouseout=FCKSpecialCombo_OnMouseOut;oField.onclick=FCKSpecialCombo_OnClick;};function FCKSpecialCombo_OnMouseOver(){if (this.SpecialCombo.Enabled) this.className='SC_Field SC_FieldOver';};function FCKSpecialCombo_OnMouseOut(){this.className='SC_Field';};function FCKSpecialCombo_OnClick(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;};
36
var FCKSpecialCombo=function(A){this.FieldWidth=80;this.PanelWidth=130;this.PanelMaxHeight=150;this.Label='&nbsp;';this.Caption=A;this.Tooltip=A;this.Style=FCK_TOOLBARITEM_ICONTEXT;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='<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>';this._ItemsHolderEl=this._Panel.PanelDiv.getElementsByTagName('TD')[0];};function FCKSpecialCombo_ItemOnMouseOver(){this.className+=' SC_ItemOver';};function FCKSpecialCombo_ItemOnMouseOut(){this.className=this.originalClass;};function FCKSpecialCombo_ItemOnClick(){this.FCKSpecialCombo._Panel.Hide();this.FCKSpecialCombo.SetLabel(this.FCKItemLabel);if (typeof(this.FCKSpecialCombo.OnSelect)=='function') this.FCKSpecialCombo.OnSelect(this.FCKItemID,this);};FCKSpecialCombo.prototype.AddItem=function(A,B,C){var D=this._ItemsHolderEl.appendChild(this._Panel.Document.createElement('DIV'));D.className=D.originalClass='SC_Item';D.innerHTML=B;D.FCKItemID=A;D.FCKItemLabel=C?C:A;D.FCKSpecialCombo=this;D.Selected=false;D.onmouseover=FCKSpecialCombo_ItemOnMouseOver;D.onmouseout=FCKSpecialCombo_ItemOnMouseOut;D.onclick=FCKSpecialCombo_ItemOnClick;this.Items[A.toString().toLowerCase()]=D;return D;};FCKSpecialCombo.prototype.SelectItem=function(A){A=A?A.toString().toLowerCase():'';var B=this.Items[A];if (B){B.className=B.originalClass='SC_ItemSelected';B.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(A){A=A?A.toString().toLowerCase():'';var B=this.Items[A];this.SetLabel(B?B.FCKItemLabel:'');};FCKSpecialCombo.prototype.SetLabel=function(A){this.Label=A.length==0?'&nbsp;':A;if (this._LabelEl) this._LabelEl.innerHTML=this.Label;};FCKSpecialCombo.prototype.SetEnabled=function(A){this.Enabled=A;this._OuterTable.className=A?'':'SC_FieldDisabled';};FCKSpecialCombo.prototype.Create=function(A){this._OuterTable=A.appendChild(document.createElement('TABLE'));this._OuterTable.cellPadding=0;this._OuterTable.cellSpacing=0;this._OuterTable.insertRow(-1);var B;var C;switch (this.Style){case FCK_TOOLBARITEM_ONLYICON:B='TB_ButtonType_Icon';C=false;break;case FCK_TOOLBARITEM_ONLYTEXT:B='TB_ButtonType_Text';C=false;break;case FCK_TOOLBARITEM_ICONTEXT:C=true;break;};if (this.Caption&&this.Caption.length>0&&C){var D=this._OuterTable.rows[0].insertCell(-1);D.unselectable='on';D.innerHTML=this.Caption;D.className='SC_FieldCaption';};var E=this._OuterTable.rows[0].insertCell(-1).appendChild(document.createElement('DIV'));if (C){E.className='SC_Field';E.style.width=this.FieldWidth+'px';E.innerHTML='<table width="100%" cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;" unselectable="on"><tbody><tr><td class="SC_FieldLabel" unselectable="on"><label unselectable="on">&nbsp;</label></td><td class="SC_FieldButton" unselectable="on">&nbsp;</td></tr></tbody></table>';this._LabelEl=E.getElementsByTagName('label')[0];this._LabelEl.innerHTML=this.Label;}else{E.className='TB_Button_Off';E.innerHTML='<table cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;" unselectable="on"><tbody><tr><td class="SC_FieldButton" style="border-left: none;" unselectable="on">&nbsp;</td></tr></tbody></table>';E.innerHTML='<table title="'+this.Tooltip+'" class="'+B+'" cellspacing="0" cellpadding="0" border="0" unselectable="on">'+'<tr>'+'<td class="TB_Text" unselectable="on">'+this.Caption+'</td>'+'<td class="TB_ButtonArrow" unselectable="on"><img src="'+FCKConfig.SkinPath+'images/toolbar.buttonarrow.gif" width="5" height="3"></td>'+'</tr>'+'</table>';};E.SpecialCombo=this;E.onmouseover=FCKSpecialCombo_OnMouseOver;E.onmouseout=FCKSpecialCombo_OnMouseOut;E.onclick=FCKSpecialCombo_OnClick;};function FCKSpecialCombo_OnMouseOver(){if (this.SpecialCombo.Enabled){switch (this.SpecialCombo.Style){case FCK_TOOLBARITEM_ONLYICON:this.className='TB_Button_On';break;case FCK_TOOLBARITEM_ONLYTEXT:this.className='TB_Button_On';break;case FCK_TOOLBARITEM_ICONTEXT:this.className='SC_Field SC_FieldOver';break;};};};function FCKSpecialCombo_OnMouseOut(){switch (this.SpecialCombo.Style){case FCK_TOOLBARITEM_ONLYICON:this.className='TB_Button_Off';break;case FCK_TOOLBARITEM_ONLYTEXT:this.className='TB_Button_Off';break;case FCK_TOOLBARITEM_ICONTEXT:this.className='SC_Field';break;};};function FCKSpecialCombo_OnClick(e){if (e){e.stopPropagation();FCKPanelEventHandlers.OnDocumentClick(e);};if (this.SpecialCombo.Enabled){var oPanel=this.SpecialCombo._Panel;if (typeof(this.SpecialCombo.OnBeforeClick)=='function') this.SpecialCombo.OnBeforeClick(this.SpecialCombo);if (this.SpecialCombo._ItemsHolderEl.offsetHeight>this.SpecialCombo.PanelMaxHeight) oPanel.PanelDiv.style.height=this.SpecialCombo.PanelMaxHeight+'px';else oPanel.PanelDiv.style.height=this.SpecialCombo._ItemsHolderEl.offsetHeight+'px';oPanel.PanelDiv.style.width=this.SpecialCombo.PanelWidth+'px';if (FCKBrowserInfo.IsGecko) oPanel.PanelDiv.style.overflow='-moz-scrollbars-vertical';oPanel.Show(0,this.offsetHeight,this,null,this.SpecialCombo.PanelMaxHeight,true);};return false;};
35
var FCKToolbarSpecialCombo=function(){this.SourceView=false;this.ContextSensitive=true;};function FCKToolbarSpecialCombo_OnSelect(itemId,item){this.Command.Execute(itemId,item);};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=FCKToolbarSpecialCombo_OnSelect;};function FCKToolbarSpecialCombo_RefreshActiveItems(combo,value){combo.DeselectAll();combo.SelectItem(value);combo.SetLabelById(value);};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(this._Combo,sValue);else FCKToolbarSpecialCombo_RefreshActiveItems(this._Combo,sValue);}else eState=FCK_TRISTATE_DISABLED;if (eState==this.State) return;if (eState==FCK_TRISTATE_DISABLED){this._Combo.DeselectAll();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();this._Combo.SetLabel('');this._Combo.SetEnabled(false);}
37
var FCKToolbarSpecialCombo=function(){this.SourceView=false;this.ContextSensitive=true;};function FCKToolbarSpecialCombo_OnSelect(itemId,item){this.Command.Execute(itemId,item);};FCKToolbarSpecialCombo.prototype.CreateInstance=function(A){this._Combo=new FCKSpecialCombo(this.GetLabel());this._Combo.FieldWidth=this.FieldWidth!=null?this.FieldWidth:100;this._Combo.PanelWidth=this.PanelWidth!=null?this.PanelWidth:150;this._Combo.PanelMaxHeight=this.PanelMaxHeight!=null?this.PanelMaxHeight:150;this._Combo.Tooltip=this.Tooltip;this._Combo.Style=this.Style;this.CreateItems(this._Combo);this._Combo.Create(A.DOMRow.insertCell(-1));this._Combo.Command=this.Command;this._Combo.OnSelect=FCKToolbarSpecialCombo_OnSelect;};function FCKToolbarSpecialCombo_RefreshActiveItems(combo,value){combo.DeselectAll();combo.SelectItem(value);combo.SetLabelById(value);};FCKToolbarSpecialCombo.prototype.RefreshState=function(){var A;var B=this.Command.GetState();if (B!=FCK_TRISTATE_DISABLED){A=FCK_TRISTATE_ON;if (this.RefreshActiveItems) this.RefreshActiveItems(this._Combo,B);else FCKToolbarSpecialCombo_RefreshActiveItems(this._Combo,B);}else A=FCK_TRISTATE_DISABLED;if (A==this.State) return;if (A==FCK_TRISTATE_DISABLED){this._Combo.DeselectAll();this._Combo.SetLabel('');};this.State=A;this._Combo.SetEnabled(A!=FCK_TRISTATE_DISABLED);};FCKToolbarSpecialCombo.prototype.Enable=function(){this.RefreshState();};FCKToolbarSpecialCombo.prototype.Disable=function(){this.State=FCK_TRISTATE_DISABLED;this._Combo.DeselectAll();this._Combo.SetLabel('');this._Combo.SetEnabled(false);}
36
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.length;i++) this._Combo.AddItem(aFonts[i],'<span style="font-family: \''+aFonts[i]+'\'; font-size: 12px;">'+aFonts[i]+'</span>');}
38
var FCKToolbarFontsCombo=function(A,B){this.Command=FCKCommands.GetCommand('FontName');this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:FCK_TOOLBARITEM_ICONTEXT;};FCKToolbarFontsCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarFontsCombo.prototype.GetLabel=function(){return FCKLang.Font;};FCKToolbarFontsCombo.prototype.CreateItems=function(A){var B=FCKConfig.FontNames.split(';');for (var i=0;i<B.length;i++) this._Combo.AddItem(B[i],'<span style="font-family: \''+B[i]+'\'; font-size: 12px;">'+B[i]+'</span>');}
37
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<aSizes.length;i++){var aSizeParts=aSizes[i].split('/');this._Combo.AddItem(aSizeParts[0],'<font size="'+aSizeParts[0]+'">'+aSizeParts[1]+'</font>',aSizeParts[1]);};}
39
var FCKToolbarFontSizeCombo=function(A,B){this.Command=FCKCommands.GetCommand('FontSize');this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:FCK_TOOLBARITEM_ICONTEXT;};FCKToolbarFontSizeCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarFontSizeCombo.prototype.GetLabel=function(){return FCKLang.FontSize;};FCKToolbarFontSizeCombo.prototype.CreateItems=function(A){A.FieldWidth=70;var B=FCKConfig.FontSizes.split(';');for (var i=0;i<B.length;i++){var C=B[i].split('/');this._Combo.AddItem(C[0],'<font size="'+C[0]+'">'+C[1]+'</font>',C[1]);};}
38
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<aTags.length;i++){if (aTags[i]=='div'&&FCKBrowserInfo.IsGecko) continue;this._Combo.AddItem(aTags[i],'<'+aTags[i]+'>'+oNames[aTags[i]]+'</'+aTags[i]+'>',oNames[aTags[i]]);};}
40
var FCKToolbarFontFormatCombo=function(A,B){this.Command=FCKCommands.GetCommand('FontFormat');this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:FCK_TOOLBARITEM_ICONTEXT;this.PanelWidth=190;};FCKToolbarFontFormatCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarFontFormatCombo.prototype.GetLabel=function(){return FCKLang.FontFormat;};FCKToolbarFontFormatCombo.prototype.CreateItems=function(A){var B=FCKLang['FontFormats'].split(';');var C={p:B[0],pre:B[1],address:B[2],h1:B[3],h2:B[4],h3:B[5],h4:B[6],h5:B[7],h6:B[8],div:B[9]};var D=FCKConfig.FontFormats.split(';');for (var i=0;i<D.length;i++){if (D[i]=='div'&&FCKBrowserInfo.IsGecko) continue;this._Combo.AddItem(D[i],'<'+D[i]+'>'+C[D[i]]+'</'+D[i]+'>',C[D[i]]);};}
39
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<aStyles.length;i++) targetSpecialCombo.SelectItem(aStyles[i].Name);targetSpecialCombo.SetLabelById(aStyles[0].Name);}else targetSpecialCombo.SetLabel('');};FCKToolbarStyleCombo.prototype.RefreshVisibleItems=function(targetSpecialCombo){if (FCKSelection.GetType()=='Control') var sTagName=FCKSelection.GetSelectedElement().tagName;for (var i in targetSpecialCombo.Items){var oItem=targetSpecialCombo.Items[i];if ((sTagName&&oItem.Style.Element==sTagName)||(!sTagName&&!oItem.Style.IsObjectElement)) oItem.style.display='';else oItem.style.display='none';};}
41
var FCKToolbarStyleCombo=function(A,B){this.Command=FCKCommands.GetCommand('Style');this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:FCK_TOOLBARITEM_ICONTEXT;};FCKToolbarStyleCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarStyleCombo.prototype.GetLabel=function(){return FCKLang.Style;};FCKToolbarStyleCombo.prototype.CreateItems=function(A){FCKTools.AppendStyleSheet(A._Panel.Document,FCKConfig.EditorAreaCSS);if (!FCKBrowserInfo.IsGecko) A.OnBeforeClick=this.RefreshVisibleItems;for (var s in this.Command.Styles){var B=this.Command.Styles[s];var C;if (B.IsObjectElement) C=A.AddItem(s,s);else C=A.AddItem(s,B.GetOpenerTag()+s+B.GetCloserTag());C.Style=B;};};FCKToolbarStyleCombo.prototype.RefreshActiveItems=function(A){A.DeselectAll();var B=this.Command.GetActiveStyles();if (B.length>0){for (var i=0;i<B.length;i++) A.SelectItem(B[i].Name);A.SetLabelById(B[0].Name);}else A.SetLabel('');};FCKToolbarStyleCombo.prototype.RefreshVisibleItems=function(A){if (FCKSelection.GetType()=='Control') var B=FCKSelection.GetSelectedElement().tagName;for (var i in A.Items){var C=A.Items[i];if ((B&&C.Style.Element==B)||(!B&&!C.Style.IsObjectElement)) C.style.display='';else C.style.display='none';};}
40
var FCKToolbarPanelButton=function(commandName,label,tooltip,style){this.Command=FCKCommands.GetCommand(commandName);this.Label=label?label:commandName;this.Tooltip=tooltip?tooltip:(label?label:commandName);this.Style=style?style:FCK_TOOLBARITEM_ONLYICON;this.State=FCK_UNKNOWN;};FCKToolbarPanelButton.prototype.Click=function(e){if (e){e.stopPropagation();FCKPanelEventHandlers.OnDocumentClick(e);};if (this.State!=FCK_TRISTATE_DISABLED){this.Command.Execute(0,this.DOMDiv.offsetHeight,this.DOMDiv);};return false;};FCKToolbarPanelButton.prototype.CreateInstance=function(parentToolbar){this.DOMDiv=document.createElement('div');this.DOMDiv.className='TB_Button_Off';this.DOMDiv.FCKToolbarButton=this;var sHtml='<table title="'+this.Tooltip+'" cellspacing="0" cellpadding="0" border="0" unselectable="on">'+'<tr>';if (this.Style!=FCK_TOOLBARITEM_ONLYTEXT) sHtml+='<td class="TB_Icon" unselectable="on"><img src="'+FCKConfig.SkinPath+'toolbar/'+this.Command.Name.toLowerCase()+'.gif" width="21" height="21" unselectable="on"></td>';if (this.Style!=FCK_TOOLBARITEM_ONLYICON) sHtml+='<td class="TB_Text" unselectable="on" nowrap>'+this.Label+'</td>';sHtml+='<td class="TB_ButtonArrow" unselectable="on"><img src="'+FCKConfig.SkinPath+'images/toolbar.buttonarrow.gif" width="5" height="3"></td>'+'</tr>'+'</table>';this.DOMDiv.innerHTML=sHtml;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;
42
var FCKToolbarPanelButton=function(A,B,C,D){this.Command=FCKCommands.GetCommand(A);this.Label=B?B:A;this.Tooltip=C?C:(B?B:A);this.Style=D?D:FCK_TOOLBARITEM_ONLYICON;this.State=FCK_UNKNOWN;};FCKToolbarPanelButton.prototype.Click=function(e){if (e){e.stopPropagation();FCKPanelEventHandlers.OnDocumentClick(e);};if (this.State!=FCK_TRISTATE_DISABLED){this.Command.Execute(0,this.DOMDiv.offsetHeight,this.DOMDiv);};return false;};FCKToolbarPanelButton.prototype.CreateInstance=function(A){this.DOMDiv=document.createElement('div');this.DOMDiv.className='TB_Button_Off';this.DOMDiv.FCKToolbarButton=this;var B='<table title="'+this.Tooltip+'" cellspacing="0" cellpadding="0" border="0" unselectable="on">'+'<tr>';if (this.Style!=FCK_TOOLBARITEM_ONLYTEXT) B+='<td class="TB_Icon" unselectable="on"><img src="'+FCKConfig.SkinPath+'toolbar/'+this.Command.Name.toLowerCase()+'.gif" width="21" height="21" unselectable="on"></td>';if (this.Style!=FCK_TOOLBARITEM_ONLYICON) B+='<td class="TB_Text" unselectable="on" nowrap>'+this.Label+'</td>';B+='<td class="TB_ButtonArrow" unselectable="on"><img src="'+FCKConfig.SkinPath+'images/toolbar.buttonarrow.gif" width="5" height="3"></td>'+'</tr>'+'</table>';this.DOMDiv.innerHTML=B;var C=A.DOMRow.insertCell(-1);C.appendChild(this.DOMDiv);this.RefreshState();};FCKToolbarPanelButton.prototype.RefreshState=FCKToolbarButton.prototype.RefreshState;FCKToolbarPanelButton.prototype.Enable=FCKToolbarButton.prototype.Enable;FCKToolbarPanelButton.prototype.Disable=FCKToolbarButton.prototype.Disable;
41
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 'Templates':oItem=new FCKToolbarButton('Templates',FCKLang.Templates);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);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 'Flash':oItem=new FCKToolbarButton('Flash',FCKLang.InsertFlashLbl,FCKLang.InsertFlash);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,null,false,true);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;}
43
var FCKToolbarItems=new Object();FCKToolbarItems.LoadedItems=new Object();FCKToolbarItems.RegisterItem=function(A,B){this.LoadedItems[A]=B;};FCKToolbarItems.GetItem=function(A){var B=FCKToolbarItems.LoadedItems[A];if (B) return B;switch (A){case 'Source':B=new FCKToolbarButton('Source',FCKLang.Source,null,FCK_TOOLBARITEM_ICONTEXT,true,true);break;case 'DocProps':B=new FCKToolbarButton('DocProps',FCKLang.DocProps);break;case 'Templates':B=new FCKToolbarButton('Templates',FCKLang.Templates);break;case 'Save':B=new FCKToolbarButton('Save',FCKLang.Save,null,null,true);break;case 'NewPage':B=new FCKToolbarButton('NewPage',FCKLang.NewPage,null,null,true);break;case 'Preview':B=new FCKToolbarButton('Preview',FCKLang.Preview,null,null,true);break;case 'About':B=new FCKToolbarButton('About',FCKLang.About,null,null,true);break;case 'Cut':B=new FCKToolbarButton('Cut',FCKLang.Cut,null,null,false,true);break;case 'Copy':B=new FCKToolbarButton('Copy',FCKLang.Copy,null,null,false,true);break;case 'Paste':B=new FCKToolbarButton('Paste',FCKLang.Paste,null,null,false,true);break;case 'PasteText':B=new FCKToolbarButton('PasteText',FCKLang.PasteText,null,null,false,true);break;case 'PasteWord':B=new FCKToolbarButton('PasteWord',FCKLang.PasteWord,null,null,false,true);break;case 'Print':B=new FCKToolbarButton('Print',FCKLang.Print,null,null,false,true);break;case 'SpellCheck':B=new FCKToolbarButton('SpellCheck',FCKLang.SpellCheck);break;case 'Undo':B=new FCKToolbarButton('Undo',FCKLang.Undo,null,null,false,true);break;case 'Redo':B=new FCKToolbarButton('Redo',FCKLang.Redo,null,null,false,true);break;case 'SelectAll':B=new FCKToolbarButton('SelectAll',FCKLang.SelectAll);break;case 'RemoveFormat':B=new FCKToolbarButton('RemoveFormat',FCKLang.RemoveFormat,null,null,false,true);break;case 'Bold':B=new FCKToolbarButton('Bold',FCKLang.Bold,null,null,false,true);break;case 'Italic':B=new FCKToolbarButton('Italic',FCKLang.Italic,null,null,false,true);break;case 'Underline':B=new FCKToolbarButton('Underline',FCKLang.Underline,null,null,false,true);break;case 'StrikeThrough':B=new FCKToolbarButton('StrikeThrough',FCKLang.StrikeThrough,null,null,false,true);break;case 'Subscript':B=new FCKToolbarButton('Subscript',FCKLang.Subscript,null,null,false,true);break;case 'Superscript':B=new FCKToolbarButton('Superscript',FCKLang.Superscript,null,null,false,true);break;case 'OrderedList':B=new FCKToolbarButton('InsertOrderedList',FCKLang.NumberedListLbl,FCKLang.NumberedList,null,false,true);break;case 'UnorderedList':B=new FCKToolbarButton('InsertUnorderedList',FCKLang.BulletedListLbl,FCKLang.BulletedList,null,false,true);break;case 'Outdent':B=new FCKToolbarButton('Outdent',FCKLang.DecreaseIndent,null,null,false,true);break;case 'Indent':B=new FCKToolbarButton('Indent',FCKLang.IncreaseIndent,null,null,false,true);break;case 'Link':B=new FCKToolbarButton('Link',FCKLang.InsertLinkLbl,FCKLang.InsertLink,null,false,true);break;case 'Unlink':B=new FCKToolbarButton('Unlink',FCKLang.RemoveLink,null,null,false,true);break;case 'Anchor':B=new FCKToolbarButton('Anchor',FCKLang.Anchor);break;case 'Image':B=new FCKToolbarButton('Image',FCKLang.InsertImageLbl,FCKLang.InsertImage);break;case 'Flash':B=new FCKToolbarButton('Flash',FCKLang.InsertFlashLbl,FCKLang.InsertFlash);break;case 'Table':B=new FCKToolbarButton('Table',FCKLang.InsertTableLbl,FCKLang.InsertTable);break;case 'SpecialChar':B=new FCKToolbarButton('SpecialChar',FCKLang.InsertSpecialCharLbl,FCKLang.InsertSpecialChar);break;case 'Smiley':B=new FCKToolbarButton('Smiley',FCKLang.InsertSmileyLbl,FCKLang.InsertSmiley);break;case 'UniversalKey':B=new FCKToolbarButton('UniversalKey',FCKLang.UniversalKeyboard);break;case 'Rule':B=new FCKToolbarButton('InsertHorizontalRule',FCKLang.InsertLineLbl,FCKLang.InsertLine,null,false,true);break;case 'JustifyLeft':B=new FCKToolbarButton('JustifyLeft',FCKLang.LeftJustify,null,null,false,true);break;case 'JustifyCenter':B=new FCKToolbarButton('JustifyCenter',FCKLang.CenterJustify,null,null,false,true);break;case 'JustifyRight':B=new FCKToolbarButton('JustifyRight',FCKLang.RightJustify,null,null,false,true);break;case 'JustifyFull':B=new FCKToolbarButton('JustifyFull',FCKLang.BlockJustify,null,null,false,true);break;case 'Style':B=new FCKToolbarStyleCombo();break;case 'FontName':B=new FCKToolbarFontsCombo();break;case 'FontSize':B=new FCKToolbarFontSizeCombo();break;case 'FontFormat':B=new FCKToolbarFontFormatCombo();break;case 'TextColor':B=new FCKToolbarPanelButton('TextColor',FCKLang.TextColor);break;case 'BGColor':B=new FCKToolbarPanelButton('BGColor',FCKLang.BGColor);break;case 'Find':B=new FCKToolbarButton('Find',FCKLang.Find);break;case 'Replace':B=new FCKToolbarButton('Replace',FCKLang.Replace);break;case 'Form':B=new FCKToolbarButton('Form',FCKLang.Form);break;case 'Checkbox':B=new FCKToolbarButton('Checkbox',FCKLang.Checkbox);break;case 'Radio':B=new FCKToolbarButton('Radio',FCKLang.RadioButton);break;case 'TextField':B=new FCKToolbarButton('TextField',FCKLang.TextField);break;case 'Textarea':B=new FCKToolbarButton('Textarea',FCKLang.Textarea);break;case 'HiddenField':B=new FCKToolbarButton('HiddenField',FCKLang.HiddenField);break;case 'Button':B=new FCKToolbarButton('Button',FCKLang.Button);break;case 'Select':B=new FCKToolbarButton('Select',FCKLang.SelectionField);break;case 'ImageButton':B=new FCKToolbarButton('ImageButton',FCKLang.ImageButton);break;default:alert(FCKLang.UnknownToolbarItem.replace(/%1/g,A));return null;};FCKToolbarItems.LoadedItems[A]=B;return B;}
42
var FCKToolbar=function(){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;};this.DOMRow=this.DOMTable.insertRow(-1);var oCell=this.DOMRow.insertCell(-1);oCell.className='TB_Start';oCell.innerHTML='<img src="'+FCKConfig.SkinPath+'images/toolbar.start.gif" width="7" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = \'\';" unselectable="on">';FCKToolbarSet.DOMElement.appendChild(this.DOMTable);};FCKToolbar.prototype.AddItem=function(toolbarItem){this.Items[this.Items.length]=toolbarItem;toolbarItem.CreateInstance(this);};FCKToolbar.prototype.AddSeparator=function(){var oCell=this.DOMRow.insertCell(-1);oCell.unselectable='on';oCell.innerHTML='<img src="'+FCKConfig.SkinPath+'images/toolbar.separator.gif" width="5" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = \'\';" unselectable="on">';};FCKToolbar.prototype.AddTerminator=function(){var oCell=this.DOMRow.insertCell(-1);oCell.className='TB_End';oCell.innerHTML='<img src="'+FCKConfig.SkinPath+'images/toolbar.end.gif" width="12" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = \'\';" unselectable="on">';};
44
var FCKToolbar=function(){this.Items=new Array();var e=this.DOMTable=document.createElement('table');e.className='TB_Toolbar';e.style.styleFloat=e.style.cssFloat=FCKLang.Dir=='rtl'?'right':'left';e.cellPadding=0;e.cellSpacing=0;e.border=0;this.DOMRow=e.insertRow(-1);var A=this.DOMRow.insertCell(-1);A.className='TB_Start';A.innerHTML='<img src="'+FCKConfig.SkinPath+'images/toolbar.start.gif" width="7" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = \'\';" unselectable="on">';FCKToolbarSet.DOMElement.appendChild(e);};FCKToolbar.prototype.AddItem=function(A){this.Items[this.Items.length]=A;A.CreateInstance(this);};FCKToolbar.prototype.AddSeparator=function(){var A=this.DOMRow.insertCell(-1);A.unselectable='on';A.innerHTML='<img src="'+FCKConfig.SkinPath+'images/toolbar.separator.gif" width="5" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = \'\';" unselectable="on">';};FCKToolbar.prototype.AddTerminator=function(){var A=this.DOMRow.insertCell(-1);A.className='TB_End';A.innerHTML='<img src="'+FCKConfig.SkinPath+'images/toolbar.end.gif" width="12" height="21" style="VISIBILITY: hidden" onload="this.style.visibility = \'\';" unselectable="on">';};
43
var FCKToolbarBreak=function(){var oBreakDiv=document.createElement('div');oBreakDiv.className='TB_Break';oBreakDiv.style.clear=FCKLang.Dir=='rtl'?'left':'right';FCKToolbarSet.DOMElement.appendChild(oBreakDiv);}
45
var FCKToolbarBreak=function(){var A=document.createElement('div');A.className='TB_Break';A.style.clear=FCKLang.Dir=='rtl'?'left':'right';FCKToolbarSet.DOMElement.appendChild(A);}
44
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<ToolbarSet.length;x++){var oToolbarItems=ToolbarSet[x];var oToolbar;if (typeof(oToolbarItems)=='string'){if (oToolbarItems=='/') oToolbar=new FCKToolbarBreak();}else{var oToolbar=new FCKToolbar();for (var j=0;j<oToolbarItems.length;j++){var sItem=oToolbarItems[j];if (sItem=='-') oToolbar.AddSeparator();else{var oItem=FCKToolbarItems.GetItem(sItem);if (oItem){oToolbar.AddItem(oItem);if (!oItem.SourceView) this.ItemsWysiwygOnly[this.ItemsWysiwygOnly.length]=oItem;if (oItem.ContextSensitive) this.ItemsContextSensitive[this.ItemsContextSensitive.length]=oItem;};};};oToolbar.AddTerminator();};this.Toolbars[this.Toolbars.length]=oToolbar;};};FCKToolbarSet.RefreshModeState=function(){if (FCK.EditMode==FCK_EDITMODE_WYSIWYG){for (var i=0;i<FCKToolbarSet.ItemsWysiwygOnly.length;i++) FCKToolbarSet.ItemsWysiwygOnly[i].Enable();FCKToolbarSet.RefreshItemsState();}else{FCKToolbarSet.RefreshItemsState();for (var i=0;i<FCKToolbarSet.ItemsWysiwygOnly.length;i++) FCKToolbarSet.ItemsWysiwygOnly[i].Disable();};};FCKToolbarSet.RefreshItemsState=function(){for (var i=0;i<FCKToolbarSet.ItemsContextSensitive.length;i++) FCKToolbarSet.ItemsContextSensitive[i].RefreshState();};
46
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(A){this.DOMElement=document.getElementById('eToolbar');var B=FCKConfig.ToolbarSets[A];if (!B){alert(FCKLang.UnknownToolbarSet.replace(/%1/g,A));return;};this.Toolbars=new Array();for (var x=0;x<B.length;x++){var C=B[x];var D;if (typeof(C)=='string'){if (C=='/') D=new FCKToolbarBreak();}else{D=new FCKToolbar();for (var j=0;j<C.length;j++){var E=C[j];if (E=='-') D.AddSeparator();else{var F=FCKToolbarItems.GetItem(E);if (F){D.AddItem(F);if (!F.SourceView) this.ItemsWysiwygOnly[this.ItemsWysiwygOnly.length]=F;if (F.ContextSensitive) this.ItemsContextSensitive[this.ItemsContextSensitive.length]=F;};};};D.AddTerminator();};this.Toolbars[this.Toolbars.length]=D;};};FCKToolbarSet.RefreshModeState=function(){if (FCK.EditMode==FCK_EDITMODE_WYSIWYG){for (var i=0;i<FCKToolbarSet.ItemsWysiwygOnly.length;i++) FCKToolbarSet.ItemsWysiwygOnly[i].Enable();FCKToolbarSet.RefreshItemsState();}else{FCKToolbarSet.RefreshItemsState();for (var i=0;i<FCKToolbarSet.ItemsWysiwygOnly.length;i++) FCKToolbarSet.ItemsWysiwygOnly[i].Disable();};};FCKToolbarSet.RefreshItemsState=function(){for (var i=0;i<FCKToolbarSet.ItemsContextSensitive.length;i++) FCKToolbarSet.ItemsContextSensitive[i].RefreshState();};
45
var FCKDialog=new Object();FCKDialog.OpenDialog=function(dialogName,dialogTitle,dialogPage,width,height,customValue,parentWindow,resizable){var oDialogInfo=new Object();oDialogInfo.Title=dialogTitle;oDialogInfo.Page=dialogPage;oDialogInfo.Editor=window;oDialogInfo.CustomValue=customValue;var sUrl=FCKConfig.BasePath+'fckdialog.html';this.Show(oDialogInfo,dialogName,sUrl,width,height,parentWindow,resizable);};
47
var FCKDialog=new Object();FCKDialog.OpenDialog=function(A,B,C,D,E,F,G,H){var I=new Object();I.Title=B;I.Page=C;I.Editor=window;I.CustomValue=F;var J=FCKConfig.BasePath+'fckdialog.html';this.Show(I,A,J,D,E,G,H);};
46
FCKDialog.Show=function(dialogInfo,dialogName,pageUrl,dialogWidth,dialogHeight,parentWindow){if (!parentWindow) parentWindow=window;parentWindow.showModalDialog(pageUrl,dialogInfo,"dialogWidth:"+dialogWidth+"px;dialogHeight:"+dialogHeight+"px;help:no;scroll:no;status:no");};
48
FCKDialog.Show=function(A,B,C,D,E,F){if (!F) F=window;F.showModalDialog(C,A,"dialogWidth:"+D+"px;dialogHeight:"+E+"px;help:no;scroll:no;status:no");};
47
var FCKContextMenuItem=function(contextMenu,commandName,label,hasIcon){this.ContextMenu=contextMenu;this.Command=FCKCommands.GetCommand(commandName);this.Label=label?label:commandName;this.HasIcon=hasIcon?true:false;};function FCKContextMenuItem_OnMouseOver(){if (this.className!='CM_Disabled') this.className='CM_Over';};function FCKContextMenuItem_OnMouseOut(){if (this.className!='CM_Disabled') this.className='CM_Option';};function FCKContextMenuItem_OnClick(){if (this.className!='CM_Disabled'){this.FCKContextMenuItem.ContextMenu.Hide();this.FCKContextMenuItem.Command.Execute();};return false;};FCKContextMenuItem.prototype.CreateTableRow=function(targetTable){this._Row=targetTable.insertRow(-1);this._Row.className='CM_Disabled';this._Row.FCKContextMenuItem=this;this._Row.onmouseover=FCKContextMenuItem_OnMouseOver;this._Row.onmouseout=FCKContextMenuItem_OnMouseOut;this._Row.onclick=FCKContextMenuItem_OnClick;var oCell=this._Row.insertCell(-1);oCell.className='CM_Icon';if (this.HasIcon) oCell.innerHTML='<img alt="" src="'+FCKConfig.SkinPath+'toolbar/'+this.Command.Name.toLowerCase()+'.gif" width="21" height="20" unselectable="on">';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;};};
49
var FCKContextMenuItem=function(A,B,C,D){this.ContextMenu=A;this.Command=FCKCommands.GetCommand(B);this.Label=C?C:B;this.HasIcon=D?true:false;};function FCKContextMenuItem_OnMouseOver(){if (this.className!='CM_Disabled') this.className='CM_Over';};function FCKContextMenuItem_OnMouseOut(){if (this.className!='CM_Disabled') this.className='CM_Option';};function FCKContextMenuItem_OnClick(){if (this.className!='CM_Disabled'){this.FCKContextMenuItem.ContextMenu.Hide();this.FCKContextMenuItem.Command.Execute();};return false;};FCKContextMenuItem.prototype.CreateTableRow=function(A){this._Row=A.insertRow(-1);this._Row.className='CM_Disabled';this._Row.FCKContextMenuItem=this;this._Row.onmouseover=FCKContextMenuItem_OnMouseOver;this._Row.onmouseout=FCKContextMenuItem_OnMouseOut;this._Row.onclick=FCKContextMenuItem_OnClick;var B=this._Row.insertCell(-1);B.className='CM_Icon';if (this.HasIcon) B.innerHTML='<img alt="" src="'+FCKConfig.SkinPath+'toolbar/'+this.Command.Name.toLowerCase()+'.gif" width="21" height="20" unselectable="on">';B=this._Row.insertCell(-1);B.className='CM_Label';B.unselectable='on';B.noWrap=true;B.innerHTML=this.Label;};FCKContextMenuItem.prototype.SetVisible=function(A){this._Row.style.display=A?'':'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;};};
48
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='<div></div>';};FCKContextMenuSeparator.prototype.SetVisible=function(isVisible){this._Row.style.display=isVisible?'':'none';};FCKContextMenuSeparator.prototype.RefreshState=function(){};
50
var FCKContextMenuSeparator=function(){};FCKContextMenuSeparator.prototype.CreateTableRow=function(A){this._Row=A.insertRow(-1);this._Row.className='CM_Separator';var B=this._Row.insertCell(-1);B.className='CM_Icon';B=this._Row.insertCell(-1);B.className='CM_Label';B.innerHTML='<div></div>';};FCKContextMenuSeparator.prototype.SetVisible=function(A){this._Row.style.display=A?'':'none';};FCKContextMenuSeparator.prototype.RefreshState=function(){};
49
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;i<this.Items.length;i++){this.Items[i].CreateTableRow(table);};};FCKContextMenuGroup.prototype.SetVisible=function(isVisible){for (var i=0;i<this.Items.length;i++){this.Items[i].SetVisible(isVisible);};this.IsVisible=isVisible;};FCKContextMenuGroup.prototype.RefreshState=function(){if (!this.IsVisible) return;for (var i=0;i<this.Items.length;i++){this.Items[i].RefreshState();};}
51
var FCKContextMenuGroup=function(A,B,C,D,E){this.IsVisible=true;this.Items=new Array();if (A) this.Add(new FCKContextMenuSeparator());if (B&&C&&D) this.Add(new FCKContextMenuItem(B,C,D,E));this.ValidationFunction=null;};FCKContextMenuGroup.prototype.Add=function(A){this.Items[this.Items.length]=A;};FCKContextMenuGroup.prototype.CreateTableRows=function(A){for (var i=0;i<this.Items.length;i++){this.Items[i].CreateTableRow(A);};};FCKContextMenuGroup.prototype.SetVisible=function(A){for (var i=0;i<this.Items.length;i++){this.Items[i].SetVisible(A);};this.IsVisible=A;};FCKContextMenuGroup.prototype.RefreshState=function(){if (!this.IsVisible) return;for (var i=0;i<this.Items.length;i++){this.Items[i].RefreshState();};}
50
var FCKContextMenu=new Object();FCKContextMenu._IsLoaded=false;FCKContextMenu.Reload=function(){this._Div=this._Document.createElement('DIV');this._Div.className='CM_ContextMenu';this._Div.style.position='absolute';this._Div.style.visibility='hidden';this._Document.body.appendChild(this._Div);var oTable=this._Document.createElement('TABLE');oTable.cellSpacing=0;oTable.cellPadding=0;oTable.border=0;this._Div.appendChild(oTable);this.Groups=new Object();for (var i=0;i<FCKConfig.ContextMenu.length;i++){var sGroup=FCKConfig.ContextMenu[i];this.Groups[sGroup]=this._GetGroup(sGroup);this.Groups[sGroup].CreateTableRows(oTable);};this._IsLoaded=true;};FCKContextMenu._GetGroup=function(groupName){var oGroup;switch (groupName){case 'Generic':oGroup=new FCKContextMenuGroup();with (oGroup){Add(new FCKContextMenuItem(this,'Cut',FCKLang.Cut,true));Add(new FCKContextMenuItem(this,'Copy',FCKLang.Copy,true));Add(new FCKContextMenuItem(this,'Paste',FCKLang.Paste,true));};break;case 'Link':oGroup=new FCKContextMenuGroup();with (oGroup){Add(new FCKContextMenuSeparator());Add(new FCKContextMenuItem(this,'Link',FCKLang.EditLink,true));Add(new FCKContextMenuItem(this,'Unlink',FCKLang.RemoveLink,true));};break;case 'TableCell':oGroup=new FCKContextMenuGroup();with (oGroup){Add(new FCKContextMenuSeparator());Add(new FCKContextMenuItem(this,'TableInsertRow',FCKLang.InsertRow,true));Add(new FCKContextMenuItem(this,'TableDeleteRows',FCKLang.DeleteRows,true));Add(new FCKContextMenuSeparator());Add(new FCKContextMenuItem(this,'TableInsertColumn',FCKLang.InsertColumn,true));Add(new FCKContextMenuItem(this,'TableDeleteColumns',FCKLang.DeleteColumns,true));Add(new FCKContextMenuSeparator());Add(new FCKContextMenuItem(this,'TableInsertCell',FCKLang.InsertCell,true));Add(new FCKContextMenuItem(this,'TableDeleteCells',FCKLang.DeleteCells,true));Add(new FCKContextMenuItem(this,'TableMergeCells',FCKLang.MergeCells,true));Add(new FCKContextMenuItem(this,'TableSplitCell',FCKLang.SplitCell,true));Add(new FCKContextMenuSeparator());Add(new FCKContextMenuItem(this,'TableCellProp',FCKLang.CellProperties,true));Add(new FCKContextMenuItem(this,'TableProp',FCKLang.TableProperties,true));};break;case 'Table':return new FCKContextMenuGroup(true,this,'Table',FCKLang.TableProperties,true);case 'Image':return new FCKContextMenuGroup(true,this,'Image',FCKLang.ImageProperties,true);case 'Flash':return new FCKContextMenuGroup(true,this,'Flash',FCKLang.FlashProperties,true);case 'Form':return new FCKContextMenuGroup(true,this,'Form',FCKLang.FormProp,true);case 'Checkbox':return new FCKContextMenuGroup(true,this,'Checkbox',FCKLang.CheckboxProp,true);case 'Radio':return new FCKContextMenuGroup(true,this,'Radio',FCKLang.RadioButtonProp,true);case 'TextField':return new FCKContextMenuGroup(true,this,'TextField',FCKLang.TextFieldProp,true);case 'HiddenField':return new FCKContextMenuGroup(true,this,'HiddenField',FCKLang.HiddenFieldProp,true);case 'ImageButton':return new FCKContextMenuGroup(true,this,'ImageButton',FCKLang.ImageButtonProp,true);case 'Button':return new FCKContextMenuGroup(true,this,'Button',FCKLang.ButtonProp,true);case 'Select':return new FCKContextMenuGroup(true,this,'Select',FCKLang.SelectionFieldProp,true);case 'Textarea':return new FCKContextMenuGroup(true,this,'Textarea',FCKLang.TextareaProp,true);case 'BulletedList':return new FCKContextMenuGroup(true,this,'BulletedList',FCKLang.BulletedListProp,true);case 'NumberedList':return new FCKContextMenuGroup(true,this,'NumberedList',FCKLang.NumberedListProp,true);case 'Anchor':return new FCKContextMenuGroup(true,this,'Anchor',FCKLang.AnchorProp,true);};return oGroup;};FCKContextMenu.RefreshState=function(){var oTag=FCKSelection.GetSelectedElement();var sTagName;if (oTag){sTagName=oTag.tagName;};if (this.Groups['Link'])			this.Groups['Link'].SetVisible(/*!bIsAnchor &&*/ FCK.GetNamedCommandState('Unlink')!=FCK_TRISTATE_DISABLED);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'&&!oTag.getAttribute('_fckflash')&&!oTag.getAttribute('_fckanchor'));if (this.Groups['Flash'])			this.Groups['Flash'].SetVisible(sTagName=='IMG'&&oTag.getAttribute('_fckflash'));if (this.Groups['Anchor'])		this.Groups['Anchor'].SetVisible(sTagName=='IMG'&&oTag.getAttribute('_fckanchor'));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();};};
52
var FCKContextMenu=new Object();FCKContextMenu._IsLoaded=false;FCKContextMenu.Reload=function(){this._Div=this._Document.createElement('DIV');this._Div.className='CM_ContextMenu';this._Div.style.position='absolute';this._Div.style.visibility='hidden';this._Document.body.appendChild(this._Div);var A=this._Document.createElement('TABLE');A.cellSpacing=0;A.cellPadding=0;A.border=0;this._Div.appendChild(A);this.Groups=new Object();for (var i=0;i<FCKConfig.ContextMenu.length;i++){var B=FCKConfig.ContextMenu[i];this.Groups[B]=this._GetGroup(B);this.Groups[B].CreateTableRows(A);};this._IsLoaded=true;};FCKContextMenu._GetGroup=function(A){var B;switch (A){case 'Generic':B=new FCKContextMenuGroup();B.Add(new FCKContextMenuItem(this,'Cut',FCKLang.Cut,true));B.Add(new FCKContextMenuItem(this,'Copy',FCKLang.Copy,true));B.Add(new FCKContextMenuItem(this,'Paste',FCKLang.Paste,true));break;case 'Link':B=new FCKContextMenuGroup();B.Add(new FCKContextMenuSeparator());B.Add(new FCKContextMenuItem(this,'Link',FCKLang.EditLink,true));B.Add(new FCKContextMenuItem(this,'Unlink',FCKLang.RemoveLink,true));break;case 'TableCell':B=new FCKContextMenuGroup();B.Add(new FCKContextMenuSeparator());B.Add(new FCKContextMenuItem(this,'TableInsertRow',FCKLang.InsertRow,true));B.Add(new FCKContextMenuItem(this,'TableDeleteRows',FCKLang.DeleteRows,true));B.Add(new FCKContextMenuSeparator());B.Add(new FCKContextMenuItem(this,'TableInsertColumn',FCKLang.InsertColumn,true));B.Add(new FCKContextMenuItem(this,'TableDeleteColumns',FCKLang.DeleteColumns,true));B.Add(new FCKContextMenuSeparator());B.Add(new FCKContextMenuItem(this,'TableInsertCell',FCKLang.InsertCell,true));B.Add(new FCKContextMenuItem(this,'TableDeleteCells',FCKLang.DeleteCells,true));B.Add(new FCKContextMenuItem(this,'TableMergeCells',FCKLang.MergeCells,true));B.Add(new FCKContextMenuItem(this,'TableSplitCell',FCKLang.SplitCell,true));B.Add(new FCKContextMenuSeparator());B.Add(new FCKContextMenuItem(this,'TableCellProp',FCKLang.CellProperties,true));B.Add(new FCKContextMenuItem(this,'TableProp',FCKLang.TableProperties,true));break;case 'Table':return new FCKContextMenuGroup(true,this,'Table',FCKLang.TableProperties,true);case 'Image':return new FCKContextMenuGroup(true,this,'Image',FCKLang.ImageProperties,true);case 'Flash':return new FCKContextMenuGroup(true,this,'Flash',FCKLang.FlashProperties,true);case 'Form':return new FCKContextMenuGroup(true,this,'Form',FCKLang.FormProp,true);case 'Checkbox':return new FCKContextMenuGroup(true,this,'Checkbox',FCKLang.CheckboxProp,true);case 'Radio':return new FCKContextMenuGroup(true,this,'Radio',FCKLang.RadioButtonProp,true);case 'TextField':return new FCKContextMenuGroup(true,this,'TextField',FCKLang.TextFieldProp,true);case 'HiddenField':return new FCKContextMenuGroup(true,this,'HiddenField',FCKLang.HiddenFieldProp,true);case 'ImageButton':return new FCKContextMenuGroup(true,this,'ImageButton',FCKLang.ImageButtonProp,true);case 'Button':return new FCKContextMenuGroup(true,this,'Button',FCKLang.ButtonProp,true);case 'Select':return new FCKContextMenuGroup(true,this,'Select',FCKLang.SelectionFieldProp,true);case 'Textarea':return new FCKContextMenuGroup(true,this,'Textarea',FCKLang.TextareaProp,true);case 'BulletedList':return new FCKContextMenuGroup(true,this,'BulletedList',FCKLang.BulletedListProp,true);case 'NumberedList':return new FCKContextMenuGroup(true,this,'NumberedList',FCKLang.NumberedListProp,true);case 'Anchor':return new FCKContextMenuGroup(true,this,'Anchor',FCKLang.AnchorProp,true);};return B;};FCKContextMenu.RefreshState=function(){var A=FCKSelection.GetSelectedElement();var B;if (A) B=A.tagName;if (this.Groups['Link'])			this.Groups['Link'].SetVisible(FCK.GetNamedCommandState('Unlink')!=FCK_TRISTATE_DISABLED);if (this.Groups['TableCell'])		this.Groups['TableCell'].SetVisible(B!='TABLE'&&FCKSelection.HasAncestorNode('TABLE'));if (this.Groups['Table'])			this.Groups['Table'].SetVisible(B=='TABLE');if (this.Groups['Image'])			this.Groups['Image'].SetVisible(B=='IMG'&&!A.getAttribute('_fckflash')&&!A.getAttribute('_fckanchor'));if (this.Groups['Flash'])			this.Groups['Flash'].SetVisible(B=='IMG'&&A.getAttribute('_fckflash'));if (this.Groups['Anchor'])		this.Groups['Anchor'].SetVisible(B=='IMG'&&A.getAttribute('_fckanchor'));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(B=='SELECT');if (this.Groups['Textarea'])		this.Groups['Textarea'].SetVisible(B=='TEXTAREA');if (this.Groups['Form'])			this.Groups['Form'].SetVisible(FCKSelection.HasAncestorNode('FORM'));if (this.Groups['Checkbox'])		this.Groups['Checkbox'].SetVisible(B=='INPUT'&&A.type=='checkbox');if (this.Groups['Radio'])			this.Groups['Radio'].SetVisible(B=='INPUT'&&A.type=='radio');if (this.Groups['TextField'])		this.Groups['TextField'].SetVisible(B=='INPUT'&&(A.type=='text'||A.type=='password'));if (this.Groups['HiddenField'])	this.Groups['HiddenField'].SetVisible(B=='INPUT'&&A.type=='hidden');if (this.Groups['ImageButton'])	this.Groups['ImageButton'].SetVisible(B=='INPUT'&&A.type=='image');if (this.Groups['Button'])		this.Groups['Button'].SetVisible(B=='INPUT'&&(A.type=='button'||A.type=='submit'||A.type=='reset'));for (var o in this.Groups){this.Groups[o].RefreshState();};};
51
function FCKContextMenu_OnContextMenu() { return false;};FCKContextMenu.Show=function(x,y){if (!this._Popup){this._Popup=window.createPopup();this._Document=this._Popup.document;this._Document.createStyleSheet(FCKConfig.SkinPath+'fck_contextmenu.css');this._Document.oncontextmenu=FCKContextMenu_OnContextMenu;aCleanupDocs[aCleanupDocs.length]=this._Document;};if (!this._IsLoaded){this.Reload();this._Div.style.visibility='';};this.RefreshState();this._Popup.show(x,y,0,0);this._Popup.show(x,y,this._Div.offsetWidth,this._Div.offsetHeight);};FCKContextMenu.Hide=function(){if (this._Popup) this._Popup.hide();}
53
function FCKContextMenu_OnContextMenu() { return false;};FCKContextMenu.Show=function(x,y){if (!this._Popup){this._Popup=window.createPopup();this._Document=this._Popup.document;this._Document.createStyleSheet(FCKConfig.SkinPath+'fck_contextmenu.css');this._Document.oncontextmenu=FCKContextMenu_OnContextMenu;aCleanupDocs[aCleanupDocs.length]=this._Document;};if (!this._IsLoaded){this.Reload();this._Div.style.visibility='';};this.RefreshState();this._Popup.show(x,y,0,0);this._Popup.show(x,y,this._Div.offsetWidth,this._Div.offsetHeight);};FCKContextMenu.Hide=function(){if (this._Popup) this._Popup.hide();}
52
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');}
54
if (!FCKConfig.PluginsPath.endsWith('/')) FCKConfig.PluginsPath+='/';var FCKPlugin=function(A,B,C){this.Name=A;this.BasePath=C?C:FCKConfig.PluginsPath;this.Path=this.BasePath+A+'/';if (!B||B.length==0) this.AvailableLangs=new Array();else this.AvailableLangs=B.split(',');};FCKPlugin.prototype.Load=function(){if (this.AvailableLangs.length>0){var A;if (this.AvailableLangs.indexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) A=FCKLanguageManager.ActiveLanguage.Code;else A=this.AvailableLangs[0];FCKScriptLoader.AddScript(this.Path+'lang/'+A+'.js');};FCKScriptLoader.AddScript(this.Path+'fckplugin.js');}
53
var FCKPlugins=FCK.Plugins=new Object();FCKPlugins.ItemsCount=0;FCKPlugins.Loaded=false;FCKPlugins.Items=new Object();for (var i=0;i<FCKConfig.Plugins.Items.length;i++){var oItem=FCKConfig.Plugins.Items[i];FCKPlugins.Items[oItem[0]]=new FCKPlugin(oItem[0],oItem[1],oItem[2]);FCKPlugins.ItemsCount++;};FCKPlugins.Load=function(){for (var s in this.Items) this.Items[s].Load();this.Loaded=true;FCKPlugins.Load=null;}
55
var FCKPlugins=FCK.Plugins=new Object();FCKPlugins.ItemsCount=0;FCKPlugins.Loaded=false;FCKPlugins.Items=new Object();for (var i=0;i<FCKConfig.Plugins.Items.length;i++){var oItem=FCKConfig.Plugins.Items[i];FCKPlugins.Items[oItem[0]]=new FCKPlugin(oItem[0],oItem[1],oItem[2]);FCKPlugins.ItemsCount++;};FCKPlugins.Load=function(){for (var s in this.Items) this.Items[s].Load();this.Loaded=true;FCKPlugins.Load=null;}
54
if (FCKLang&&window.document.dir.toLowerCase()!=FCKLang.Dir.toLowerCase()) window.document.dir=FCKLang.Dir;if (FCKConfig.ForcePasteAsPlainText) FCK.Events.AttachEvent("OnPaste",FCK.Paste);if (FCKPlugins.ItemsCount>0){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);}
56
if (FCKLang&&window.document.dir.toLowerCase()!=FCKLang.Dir.toLowerCase()) window.document.dir=FCKLang.Dir;if (FCKConfig.ForcePasteAsPlainText) FCK.Events.AttachEvent("OnPaste",FCK.Paste);if (FCKBrowserInfo.IsGecko&&!FCKConfig.UseBROnCarriageReturn){FCK.Events.AttachEvent("OnEnter",FCK.Enter);FCK.Events.AttachEvent("OnBackSpace",FCK.BackSpace);};if (FCKPlugins.ItemsCount>0){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);}