Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Mon, Feb 3, 1:04 AM

in-portal

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: trunk/admin/editor/cmseditor/editor/_source/internals/fck_1.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/_source/internals/fck_1.js (revision 1998)
+++ trunk/admin/editor/cmseditor/editor/_source/internals/fck_1.js (revision 1999)
@@ -1,215 +1,216 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fck_1.js
* This is the first part of the "FCK" object creation. This is the main
* object that represents an editor instance.
*
* Version: 2.0 RC3
* Modified: 2005-02-27 21:46:32
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
FCK.Events = new FCKEvents( FCK ) ;
FCK.Toolbar = null ;
FCK.TempBaseTag = FCKConfig.BaseHref.length > 0 ? '<base href="' + FCKConfig.BaseHref + '" _fcktemp="true"></base>' : '' ;
FCK.StartEditor = function()
{
// Get the editor's window and document (DOM)
this.EditorWindow = window.frames[ 'eEditorArea' ] ;
this.EditorDocument = this.EditorWindow.document ;
// TODO: Wait stable version and remove the following commented lines.
// The Base Path of the editor is saved to rebuild relative URL (IE issue).
// this.BaseUrl = this.EditorDocument.location.protocol + '//' + this.EditorDocument.location.host ;
if ( FCKBrowserInfo.IsGecko )
this.MakeEditable() ;
// Set the editor's startup contents
this.SetHTML( FCKTools.GetLinkedFieldValue() ) ;
// Attach the editor to the form onsubmit event
FCKTools.AttachToLinkedFieldFormSubmit( this.UpdateLinkedField ) ;
-
this.SetStatus( FCK_STATUS_ACTIVE ) ;
+
}
FCK.SetStatus = function( newStatus )
{
this.Status = newStatus ;
if ( newStatus == FCK_STATUS_ACTIVE )
{
// Force the focus in the window to go to the editor.
window.onfocus = window.document.body.onfocus = FCK.Focus ;
// Force the focus in the editor.
if ( FCKConfig.StartupFocus )
FCK.Focus() ;
// @Packager.Compactor.Remove.Start
var sBrowserSuffix = FCKBrowserInfo.IsIE ? "ie" : "gecko" ;
FCKScriptLoader.AddScript( '_source/internals/fck_2.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fck_2_' + sBrowserSuffix + '.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fckselection.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fckselection_' + sBrowserSuffix + '.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fckpanel_' + sBrowserSuffix + '.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fcktablehandler.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fcktablehandler_' + sBrowserSuffix + '.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fckxml_' + sBrowserSuffix + '.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fckstyledef.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fckstyledef_' + sBrowserSuffix + '.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fckstylesloader.js' ) ;
FCKScriptLoader.AddScript( '_source/commandclasses/fcknamedcommand.js' ) ;
FCKScriptLoader.AddScript( '_source/commandclasses/fck_othercommands.js' ) ;
FCKScriptLoader.AddScript( '_source/commandclasses/fckspellcheckcommand_' + sBrowserSuffix + '.js' ) ;
FCKScriptLoader.AddScript( '_source/commandclasses/fcktextcolorcommand.js' ) ;
FCKScriptLoader.AddScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ;
FCKScriptLoader.AddScript( '_source/commandclasses/fckpastewordcommand.js' ) ;
FCKScriptLoader.AddScript( '_source/commandclasses/fcktablecommand.js' ) ;
FCKScriptLoader.AddScript( '_source/commandclasses/fckstylecommand.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fckcommands.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fcktoolbarbutton.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fcktoolbarcombo.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fckspecialcombo.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fcktoolbarspecialcombo.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fcktoolbarfontscombo.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fcktoolbarstylecombo.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fcktoolbarpanelbutton.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fcktoolbaritems.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fcktoolbar.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fcktoolbarbreak_' + sBrowserSuffix + '.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fcktoolbarset.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fckdialog.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fckdialog_' + sBrowserSuffix + '.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fckcontextmenuitem.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fckcontextmenuseparator.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fckcontextmenugroup.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fckcontextmenu.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fckcontextmenu_' + sBrowserSuffix + '.js' ) ;
FCKScriptLoader.AddScript( '_source/classes/fckplugin.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fckplugins.js' ) ;
FCKScriptLoader.AddScript( '_source/internals/fck_last.js' ) ;
// @Packager.Compactor.Remove.End
/* @Packager.Compactor.RemoveLine
if ( FCKBrowserInfo.IsIE )
FCKScriptLoader.AddScript( 'js/fckeditorcode_ie_2.js' ) ;
else
FCKScriptLoader.AddScript( 'js/fckeditorcode_gecko_2.js' ) ;
@Packager.Compactor.RemoveLine */
}
this.Events.FireEvent( 'OnStatusChange', newStatus ) ;
if ( this.OnStatusChange ) this.OnStatusChange( newStatus ) ;
-
+ if (typeof(FCKConfig.newBgColor) != 'undefined')
+ this.EditorDocument.bgColor = FCKConfig.newBgColor;
}
FCK.GetHTML = function( format )
{
var sHTML ;
if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
{
// TODO: Wait stable version and remove the following commented lines.
// if ( FCKBrowserInfo.IsIE )
// FCK.CheckRelativeLinks() ;
if ( FCKBrowserInfo.IsIE )
sHTML = this.EditorDocument.body.innerHTML.replace( FCKRegexLib.ToReplace, '$1' ) ;
else
sHTML = this.EditorDocument.body.innerHTML ;
}
else
sHTML = document.getElementById('eSourceField').value ;
if ( format )
return FCKCodeFormatter.Format( sHTML ) ;
else
return sHTML ;
}
FCK.GetXHTML = function( format )
{
var bSource = ( FCK.EditMode == FCK_EDITMODE_SOURCE ) ;
if ( bSource )
this.SwitchEditMode() ;
// TODO: Wait stable version and remove the following commented lines.
// if ( FCKBrowserInfo.IsIE )
// FCK.CheckRelativeLinks() ;
if ( FCKConfig.FullPage )
var sXHTML = FCKXHtml.GetXHTML( this.EditorDocument.getElementsByTagName( 'html' )[0], true, format ) ;
else
var sXHTML = FCKXHtml.GetXHTML( this.EditorDocument.body, false, format ) ;
if ( bSource )
this.SwitchEditMode() ;
if ( FCKBrowserInfo.IsIE )
sXHTML = sXHTML.replace( FCKRegexLib.ToReplace, '$1' ) ;
if ( FCK.DocTypeDeclaration && FCK.DocTypeDeclaration.length > 0 )
sXHTML = FCK.DocTypeDeclaration + '\n' + sXHTML ;
if ( FCK.XmlDeclaration && FCK.XmlDeclaration.length > 0 )
sXHTML = FCK.XmlDeclaration + '\n' + sXHTML ;
return sXHTML ;
}
FCK.UpdateLinkedField = function()
{
if ( FCKConfig.EnableXHTML )
FCKTools.SetLinkedFieldValue( FCK.GetXHTML( FCKConfig.FormatOutput ) ) ;
else
FCKTools.SetLinkedFieldValue( FCK.GetHTML( FCKConfig.FormatOutput ) ) ;
}
FCK.ShowContextMenu = function( x, y )
{
if ( this.Status != FCK_STATUS_COMPLETE )
return ;
FCKContextMenu.Show( x, y ) ;
this.Events.FireEvent( "OnContextMenu" ) ;
}
FCK.RegisteredDoubleClickHandlers = new Object() ;
FCK.OnDoubleClick = function( element )
{
var oHandler = FCK.RegisteredDoubleClickHandlers[ element.tagName ] ;
if ( oHandler )
{
oHandler( element ) ;
}
}
// Register objects that can handle double click operations.
FCK.RegisterDoubleClickHandler = function( handlerFunction, tag )
{
FCK.RegisteredDoubleClickHandlers[ tag.toUpperCase() ] = handlerFunction ;
}
Property changes on: trunk/admin/editor/cmseditor/editor/_source/internals/fck_1.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/_source/internals/fck.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/_source/internals/fck.js (revision 1998)
+++ trunk/admin/editor/cmseditor/editor/_source/internals/fck.js (revision 1999)
@@ -1,35 +1,36 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fck.js
* Creation and initialization of the "FCK" object. This is the main object
* that represents an editor instance.
*
* Version: 2.0 RC3
* Modified: 2005-02-23 20:51:12
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
// FCK represents the active editor instance
var FCK = new Object() ;
FCK.Name = FCKURLParams[ 'InstanceName' ] ;
FCK.Status = FCK_STATUS_NOTLOADED ;
FCK.EditMode = FCK_EDITMODE_WYSIWYG ;
FCK.PasteEnabled = false ;
// First try to get the Linked field using its ID.
FCK.LinkedField = window.parent.document.getElementById( FCK.Name ) ;
// If no linked field is available with that ID, try with the "Name".
+
if ( !FCK.LinkedField )
FCK.LinkedField = window.parent.document.getElementsByName( FCK.Name )[0] ;
Property changes on: trunk/admin/editor/cmseditor/editor/_source/internals/fck.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js (revision 1998)
+++ trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js (revision 1999)
@@ -1,236 +1,241 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fck_2.js
* This is the second part of the "FCK" object creation. This is the main
* object that represents an editor instance.
*
* Version: 2.0 RC3
* Modified: 2005-03-02 10:44:27
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
// This collection is used by the browser specific implementations to tell
// wich named commands must be handled separately.
FCK.RedirectNamedCommands = new Object() ;
+var oWindow = new Object() ;
FCK.ExecuteNamedCommand = function( commandName, commandParameter )
{
if ( FCK.RedirectNamedCommands[ commandName ] != null ) {
FCK.ExecuteRedirectedNamedCommand( commandName, commandParameter ) ;
}
else
{
FCK.Focus() ;
//alert(commandName);
if (commandName == "Undo")
{
if (confirm("This will delete everything on this page. Are you sure?"))
FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ;
} else
FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ;
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
}
}
FCK.GetNamedCommandState = function( commandName )
{
try
{
if (commandName == 'InsertHorizontalRule')
return FCK_TRISTATE_OFF;
if ( !FCK.EditorDocument.queryCommandEnabled( commandName ) )
return FCK_TRISTATE_DISABLED ;
else {
switch ( commandName )
{
/*
case 'CreateLink' :
case 'Unlink' :
oDocument = FCK.Selection.MoveToAncestorNode( 'A' ) ;
if ( oDocument )
{
//FCK.Selection.MoveToNode( oDocument ) ;
if (oDocument.getAttribute('label',2) == 'Doc')
return FCK_TRISTATE_DISABLED;
else
return FCK.EditorDocument.queryCommandState( commandName ) ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ;
} else
return FCK.EditorDocument.queryCommandState( commandName ) ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ;
break;
*/
default:
return FCK.EditorDocument.queryCommandState( commandName ) ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ;
}
}
}
catch ( e )
{
return FCK_TRISTATE_OFF ;
}
}
FCK.GetNamedCommandValue = function( commandName )
{
var sValue = '' ;
var eState = FCK.GetNamedCommandState( commandName ) ;
if ( eState == FCK_TRISTATE_DISABLED )
return null ;
try
{
sValue = this.EditorDocument.queryCommandValue( commandName ) ;
}
catch(e) {}
return sValue ? sValue : '' ;
}
FCK.CleanAndPaste = function( html )
{
// Remove all SPAN tags
html = html.replace(/<\/?SPAN[^>]*>/gi, "" );
// Remove Class attributes
html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
// Remove Style attributes
html = html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3") ;
// Remove Lang attributes
html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
// Remove XML elements and declarations
html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
// Remove Tags with XML namespace declarations: <o:p></o:p>
html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
// Replace the &nbsp;
html = html.replace(/&nbsp;/, " " );
// Transform <P> to <DIV>
var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ; // Different because of a IE 5.0 error
html = html.replace( re, "<div$2</div>" ) ;
FCK.InsertHtml( html ) ;
}
/*
FCK.Preview = function()
{
if (typeof(FCKConfig.template_name) != 'undefined' && FCKConfig.template_name != '')
{
var oWindow = window.open(FCKConfig.project_path+'index.php?t='+FCKConfig.template_name, 'prewiev', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes') ;
if ( FCKBrowserInfo.IsIE ) {
oWindow.attachEvent( "onload", FCK.SetPreview ) ;
}
else
oWindow.addEventListener( 'load', this.SetPreview, true ) ;
} else {
var oWindow = window.open( '', null, 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' ) ;
var sHTML = '<html><head><link href="' + FCKConfig.EditorAreaCSS + '" rel="stylesheet" type="text/css" /></head><body>' + FCK.GetHTML() + '</body></html>' ;
oWindow.document.write( sHTML );
oWindow.document.close();
}
}
FCK.SetPreview = function()
{
oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML = FCK.GetHTML();
}
function show_props(obj, objName) {
var result = "";
for (var i in obj) {
result = objName + "." + i + " = " + obj[i] + " \n";
alert(result);
}
//return result;
}
*/
FCK.Preview = function()
{
if (typeof(FCKConfig.template_name) != 'undefined' && FCKConfig.template_name != '')
{
- oWindow = window.open(FCKConfig.project_path+'index.php?t='+FCKConfig.template_name, 'prewiev', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes') ;
+ oWindow = window.open(FCKConfig.ProjectPath+'/index.php?t='+FCKConfig.template_name, 'prewiev', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes') ;
if ( FCKBrowserInfo.IsIE ) {
oWindow.attachEvent( "onload", FCK.SetPreview ) ;
}
else
oWindow.addEventListener( 'load', FCK.SetPreview, true ) ;
return ;
}
else {
+ if (typeof(FCKConfig.preview_width) != 'undefined' && typeof(FCKConfig.preview_height) != 'undefined' && FCKConfig.preview_width > 0 && FCKConfig.preview_height > 0)
+ var oWindowE = window.open( '', null, 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+FCKConfig.preview_width+',height='+FCKConfig.preview_height ) ;
+ else
var oWindowE = window.open( '', null, 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' ) ;
- var sHTML = '<html><head><link href="' + FCKConfig.EditorAreaCSS + '" rel="stylesheet" type="text/css" /></head><body>' + FCK.GetHTML() + '</body></html>' ;
- oWindowE.document.write( sHTML );
- oWindowE.document.close();
+ var sHTML = '<html><head><link href="' + FCKConfig.EditorAreaCSS + '" rel="stylesheet" type="text/css" /></head><body>' + FCK.GetHTML() + '</body></html>' ;
+ oWindowE.document.write( sHTML );
+ oWindowE.document.close();
}
}
FCK.SetPreview = function()
{
oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML = FCK.GetHTML();
}
FCK.SwitchEditMode = function()
{
// Check if the actual mode is WYSIWYG.
var bWYSIWYG = ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) ;
// Display/Hide the TRs.
document.getElementById('eWysiwyg').style.display = bWYSIWYG ? 'none' : '' ;
document.getElementById('eSource').style.display = bWYSIWYG ? '' : 'none' ;
// Update the HTML in the view output to show.
if ( bWYSIWYG )
document.getElementById('eSourceField').value = ( FCKConfig.EnableXHTML && FCKConfig.EnableSourceXHTML ? FCK.GetXHTML( FCKConfig.FormatSource ) : FCK.GetHTML( FCKConfig.FormatSource ) ) ;
else
FCK.SetHTML( FCK.GetHTML(), true ) ;
// Updates the actual mode status.
FCK.EditMode = bWYSIWYG ? FCK_EDITMODE_SOURCE : FCK_EDITMODE_WYSIWYG ;
// Update the toolbar.
FCKToolbarSet.RefreshModeState() ;
-
+ if (typeof(FCKConfig.newBgColor) != 'undefined')
+ FCK.EditorDocument.bgColor = FCKConfig.newBgColor;
// Set the Focus.
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] ;
}
}
}
Property changes on: trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.9
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/_source/internals/fck_onload.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/_source/internals/fck_onload.js (revision 1998)
+++ trunk/admin/editor/cmseditor/editor/_source/internals/fck_onload.js (revision 1999)
@@ -1,130 +1,130 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fck_onload.js
* This is the script that is called when the editor page is loaded inside
* its IFRAME. It's the editor startup.
*
* Version: 2.0 RC3
* Modified: 2005-02-19 13:00:42
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
// Disable the context menu in the editor (areas outside the editor area).
window.document.oncontextmenu = function( e )
{
if ( e )
e.preventDefault() ; // This is the Gecko way to do that.
return false ; // This is the IE way to do that.
}
// Gecko browsers doens't calculate well that IFRAME size so we must
// recalculate it every time the window size changes.
if ( ! FCKBrowserInfo.IsIE )
{
window.onresize = function()
{
var oFrame = document.getElementById('eEditorArea') ;
oFrame.height = 0 ;
var oCell = document.getElementById( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? 'eWysiwygCell' : 'eSource' ) ;
var iHeight = oCell.offsetHeight ;
oFrame.height = iHeight - 2 ;
}
}
// Start the editor as soon as the window is loaded.
window.onload = function()
{
// There is a bug on Netscape when rendering the frame. It goes over the
// right border. So we must correct it.
if ( FCKBrowserInfo.IsNetscape )
document.getElementById('eWysiwygCell').style.paddingRight = '2px' ;
FCKScriptLoader.OnEmpty = function()
{
FCKScriptLoader.OnEmpty = null ;
// Override the configurations passed throw the hidden field.
FCKConfig.LoadHiddenField() ;
// Load the custom configurations file (if defined).
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
FCKScriptLoader.AddScript( FCKConfig.CustomConfigurationsPath ) ;
// Load the styles for the configured skin.
LoadStyles() ;
}
-
// First of all load the configuration file.
FCKScriptLoader.AddScript( '../fckconfig.js' ) ;
}
function LoadStyles()
{
FCKScriptLoader.OnEmpty = LoadScripts ;
// Load the active skin CSS.
FCKScriptLoader.AddScript( FCKConfig.SkinPath + 'fck_editor.css' ) ;
FCKScriptLoader.AddScript( FCKConfig.SkinPath + 'fck_contextmenu.css' ) ;
}
function LoadScripts()
{
FCKScriptLoader.OnEmpty = null ;
// @Packager.Compactor.Remove.Start
var sSuffix = FCKBrowserInfo.IsIE ? 'ie' : 'gecko' ;
with ( FCKScriptLoader )
{
AddScript( '_source/internals/fckdebug.js' ) ;
AddScript( '_source/internals/fcktools.js' ) ;
AddScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
AddScript( '_source/internals/fckregexlib.js' ) ;
AddScript( '_source/internals/fcklanguagemanager.js' ) ;
AddScript( '_source/classes/fckevents.js' ) ;
AddScript( '_source/internals/fckxhtmlentities.js' ) ;
AddScript( '_source/internals/fckxhtml.js' ) ;
AddScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
AddScript( '_source/internals/fckcodeformatter.js' ) ;
AddScript( '_source/internals/fck_1.js' ) ;
AddScript( '_source/internals/fck_1_' + sSuffix + '.js' ) ;
}
// @Packager.Compactor.Remove.End
/* @Packager.Compactor.RemoveLine
if ( FCKBrowserInfo.IsIE )
FCKScriptLoader.AddScript( 'js/fckeditorcode_ie_1.js' ) ;
else
FCKScriptLoader.AddScript( 'js/fckeditorcode_gecko_1.js' ) ;
@Packager.Compactor.RemoveLine */
+
}
function LoadLanguageFile()
{
FCKScriptLoader.OnEmpty = function()
{
// Removes the OnEmpty listener.
FCKScriptLoader.OnEmpty = null ;
// Correct the editor layout to the correct language direction.
if ( FCKLang )
window.document.dir = FCKLang.Dir ;
// Starts the editor.
FCK.StartEditor() ;
}
FCKScriptLoader.AddScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
}
\ No newline at end of file
Property changes on: trunk/admin/editor/cmseditor/editor/_source/internals/fck_onload.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/_source/commandclasses/fck_othercommands.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/_source/commandclasses/fck_othercommands.js (revision 1998)
+++ trunk/admin/editor/cmseditor/editor/_source/commandclasses/fck_othercommands.js (revision 1999)
@@ -1,194 +1,196 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fck_othercommands.js
* Definition of other commands that are not available internaly in the
* browser (see FCKNamedCommand).
*
* Version: 2.0 RC3
* Modified: 2005-01-04 18:39:05
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
// ### General Dialog Box Commands.
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 ;
}
// Generic Undefined command (usually used when a command is under development).
var FCKUndefinedCommand = function()
{
this.Name = 'Undefined' ;
}
FCKUndefinedCommand.prototype.Execute = function()
{
alert( FCKLang.NotImplemented ) ;
}
FCKUndefinedCommand.prototype.GetState = function()
{
return FCK_TRISTATE_OFF ;
}
// ### FontName
var FCKFontNameCommand = function()
{
this.Name = 'FontName' ;
}
FCKFontNameCommand.prototype.Execute = function( fontName )
{
if (fontName == null || fontName == "")
{
// TODO: Remove font name attribute.
}
else
FCK.ExecuteNamedCommand( 'FontName', fontName ) ;
}
FCKFontNameCommand.prototype.GetState = function()
{
return FCK.GetNamedCommandValue( 'FontName' ) ;
}
// ### FontSize
var FCKFontSizeCommand = function()
{
this.Name = 'FontSize' ;
}
FCKFontSizeCommand.prototype.Execute = function( fontSize )
{
if ( typeof( fontSize ) == 'string' ) fontSize = parseInt(fontSize) ;
if ( fontSize == null || fontSize == '' )
{
// TODO: Remove font size attribute (Now it works with size 3. Will it work forever?)
FCK.ExecuteNamedCommand( 'FontSize', 3 ) ;
}
else
FCK.ExecuteNamedCommand( 'FontSize', fontSize ) ;
}
FCKFontSizeCommand.prototype.GetState = function()
{
return FCK.GetNamedCommandValue( 'FontSize' ) ;
}
// ### FormatBlock
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' ) ;
}
// ### Preview
var FCKPreviewCommand = function()
{
this.Name = 'Preview' ;
}
FCKPreviewCommand.prototype.Execute = function()
{
FCK.Preview() ;
}
FCKPreviewCommand.prototype.GetState = function()
{
return FCK_TRISTATE_OFF ;
}
// ### Save
var FCKSaveCommand = function()
{
this.Name = 'Save' ;
}
FCKSaveCommand.prototype.Execute = function()
{
// Get the linked field form.
var oForm = FCK.LinkedField.form ;
// Submit the form.
oForm.submit() ;
}
FCKSaveCommand.prototype.GetState = function()
{
return FCK_TRISTATE_OFF ;
}
// ### NewPage
var FCKNewPageCommand = function()
{
this.Name = 'NewPage' ;
}
FCKNewPageCommand.prototype.Execute = function()
{
FCK.SetHTML( FCKBrowserInfo.IsGecko ? '&nbsp;' : '' ) ;
+ if (typeof(FCKConfig.newBgColor) != 'undefined')
+ FCK.EditorDocument.bgColor = FCKConfig.newBgColor;
}
FCKNewPageCommand.prototype.GetState = function()
{
return FCK_TRISTATE_OFF ;
}
// ### Source button
var FCKSourceCommand = function()
{
this.Name = 'Source' ;
}
FCKSourceCommand.prototype.Execute = function()
{
FCK.SwitchEditMode() ;
}
FCKSourceCommand.prototype.GetState = function()
{
return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_ON ) ;
}
\ No newline at end of file
Property changes on: trunk/admin/editor/cmseditor/editor/_source/commandclasses/fck_othercommands.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php
===================================================================
--- trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php (revision 1998)
+++ trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php (revision 1999)
@@ -1 +1 @@
-<?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: commands.php * This is the File Manager Connector for ASP. * * Version: 2.0 RC3 * Modified: 2005-02-19 16:02:38 * * File Authors: * Frederico Caldeira Knabben (fredck@fckeditor.net) */ function GetFolders( $resourceType, $currentFolder ) { // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; // Open the "Folders" node. echo "<Folders>" ; $oCurrentFolder = opendir( $sServerDir ) ; while ( $sFile = readdir( $oCurrentFolder ) ) { if ( $sFile != '.' && $sFile != '..' && $sFile != 'CVS' && is_dir( $sServerDir . $sFile ) ) echo '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ; } closedir( $oCurrentFolder ) ; // Close the "Folders" node. echo "</Folders>" ; } /* function GetCmsTree() { $conn = GetADODbConnection(); $query="SELECT st.* , wb.eng_content AS page_title FROM structure_templates st LEFT JOIN working_blocks AS wb ON (st.st_id = wb.template_id) AND (wb.block_type = 3) WHERE st_id != '5' AND st_path != '/cms' GROUP BY st_id ORDER BY st_lastupdate desc"; $rs = $conn->Execute($query); if ($rs && !$rs->EOF) { $ret = "<CmsPages>"; while($rs && !$rs->EOF) { $ret.= '<CmsPage path="'.BASE_PATH.'/index.php?t='.$rs->fields['st_path'].'" title="'.$rs->fields['page_title'].'" />'; //echo $rs->fields['page_title']."<br>"; $rs->MoveNext(); } $ret.= '</CmsPages>'; echo $ret; } } */ function GetCmsTree() { global $Config; $ret = "<CmsPages>"; if (isset($Config['K4Mode'])) { $ret.= K4ReadCmsTree(0); } else { $ret.= ReadCmsTree(0); } $ret.= "</CmsPages>"; echo $ret; } function K4ReadCmsTree($cat_id, $level = 0) { $application =& kApplication::Instance(); $application->Init(); $query = 'SELECT Path, Title FROM '.TABLE_PREFIX.'Pages'; $pages = $application->DB->Query($query); $res = ''; foreach ($pages as $page) { $page_path = $page['Path'].'.html'; $title = $page['Title'].' ('.$page_path.')'; $res .= '<CmsPage path="'.$page_path.'" title="'.$prefix.htmlspecialchars($title,ENT_QUOTES).'" serverpath="'.BASE_PATH.'/" />'; } return $res; } function ReadCmsTree($st_id, $level = 0) { $conn = GetADODbConnection(); $query = "SELECT value FROM config WHERE name = 'cms_direct_mode'"; $rs = $conn->Execute($query); if ($rs && !$rs->EOF) { $cms_mode = $rs->fields['value']; } $query = "SELECT value FROM config WHERE name = 'email_templates_folder_id'"; $rs = $conn->Execute($query); if ($rs && !$rs->EOF) { $email_templates_folder_id = $rs->fields['value']; } if ( $email_templates_folder_id == "" ) $email_templates_folder_id = 0; if ( $cms_mode == 1 ) { $query = " SELECT st.*, IF(lb.eng_content='' OR lb.eng_content IS NULL, st.st_path, lb.eng_content ) AS page_title FROM structure_templates AS st LEFT JOIN live_blocks AS lb ON (st.st_id = lb.template_id) AND (lb.block_type = 3) WHERE st.st_parent_id = ".$st_id." AND st_id != ".$email_templates_folder_id." AND st_path != '/cms' ORDER BY st.st_order"; } else { $query = " SELECT st.*, IF(wb.eng_content='' OR wb.eng_content IS NULL, st.st_path, wb.eng_content ) AS page_title FROM structure_templates AS st LEFT JOIN working_blocks AS wb ON (st.st_id = wb.template_id) AND (wb.block_type = 3) WHERE st.st_parent_id = ".$st_id." AND st_id != ".$email_templates_folder_id." AND st_path != '/cms%' ORDER BY st.st_order"; } //echo $query." <br>"; $rs = $conn->Execute($query); if ($rs && !$rs->EOF) { while ($rs && !$rs->EOF) { $page_path = ltrim($rs->fields['st_path'], '/'); //$page_path = SERVER_NAME.BASE_PATH.'/index.php?t='.$page_path; //$page_path = $page_path; $prefix=''; for ($i = 0; $i < $level; $i++) $prefix .= '--'; if ($level > 0) $prefix=$prefix.'- '; $res .= '<CmsPage path="'.$page_path.'" title="'.$prefix.htmlspecialchars($rs->fields['page_title'],ENT_QUOTES).'" st_id="'.$rs->fields['st_id'].'" serverpath="'.BASE_PATH.'/index.php?t=" />'; $res .= ReadCmsTree($rs->fields['st_id'], $level+1); $rs->MoveNext(); } return $res; } } function GetFoldersAndFiles( $resourceType, $currentFolder ) { // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; // Initialize the output buffers for "Folders" and "Files". $sFolders = '<Folders>' ; $sFiles = '<Files>' ; $oCurrentFolder = opendir( $sServerDir ) ; while ( $sFile = readdir( $oCurrentFolder ) ) { if ( $sFile != '.' && $sFile != '..' && $sFile != 'CVS') { if ( is_dir( $sServerDir . $sFile ) ) $sFolders .= '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ; else { $iFileSize = filesize( $sServerDir . $sFile ) ; if ( $iFileSize > 0 ) { $iFileSize = round( $iFileSize / 1024 ) ; if ( $iFileSize < 1 ) $iFileSize = 1 ; } $sFiles .= '<File name="' . ConvertToXmlAttribute( $sFile ) . '" size="' . $iFileSize . '" />' ; } } } echo $sFolders ; // Close the "Folders" node. echo '</Folders>' ; echo $sFiles ; // Close the "Files" node. echo '</Files>' ; } function CreateFolder( $resourceType, $currentFolder ) { $sErrorNumber = '0' ; $sErrorMsg = '' ; if ( isset( $_GET['NewFolderName'] ) ) { $sNewFolderName = $_GET['NewFolderName'] ; // Map the virtual path to the local server path of the current folder. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; if ( is_writable( $sServerDir ) ) { $sServerDir .= $sNewFolderName ; $sErrorMsg = CreateServerFolder( $sServerDir ) ; switch ( $sErrorMsg ) { case '' : $sErrorNumber = '0' ; break ; case 'Invalid argument' : case 'No such file or directory' : $sErrorNumber = '102' ; // Path too long. break ; default : $sErrorNumber = '110' ; break ; } } else $sErrorNumber = '103' ; } else $sErrorNumber = '102' ; // Create the "Error" node. echo '<Error number="' . $sErrorNumber . '" originalDescription="' . ConvertToXmlAttribute( $sErrorMsg ) . '" />' ; } function FileUpload( $resourceType, $currentFolder ) { $sErrorNumber = '0' ; $sFileName = '' ; if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) ) { $oFile = $_FILES['NewFile'] ; // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; // Get the uploaded file name. $sFileName = $oFile['name'] ; $sOriginalFileName = $sFileName ; $sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ; global $Config ; $arAllowed = $Config['AllowedExtensions'][$resourceType] ; $arDenied = $Config['DeniedExtensions'][$resourceType] ; if ( ( count($arAllowed) == 0 || in_array( $sExtension, $arAllowed ) ) && ( count($arDenied) == 0 || !in_array( $sExtension, $arDenied ) ) ) { $iCounter = 0 ; while ( true ) { $sFilePath = $sServerDir . $sFileName ; if ( is_file( $sFilePath ) ) { $iCounter++ ; $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ; $sErrorNumber = '201' ; } else { move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; if ( is_file( $sFilePath ) ) { $oldumask = umask(0) ; chmod( $sFilePath, 0777 ) ; umask( $oldumask ) ; } break ; } } } else $sErrorNumber = '202' ; } else $sErrorNumber = '202' ; echo '<script type="text/javascript">' ; echo 'window.parent.frames["frmUpload"].OnUploadCompleted(' . $sErrorNumber . ',"' . str_replace( '"', '\\"', $sFileName ) . '") ;' ; echo '</script>' ; exit ; } ?>
\ No newline at end of file
+<?php /* * FCKeditor - The text editor for internet * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * File Name: commands.php * This is the File Manager Connector for ASP. * * Version: 2.0 RC3 * Modified: 2005-02-19 16:02:38 * * File Authors: * Frederico Caldeira Knabben (fredck@fckeditor.net) */ function GetFolders( $resourceType, $currentFolder ) { // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; // Open the "Folders" node. echo "<Folders>" ; $oCurrentFolder = opendir( $sServerDir ) ; while ( $sFile = readdir( $oCurrentFolder ) ) { if ( $sFile != '.' && $sFile != '..' && $sFile != 'CVS' && is_dir( $sServerDir . $sFile ) ) echo '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ; } closedir( $oCurrentFolder ) ; // Close the "Folders" node. echo "</Folders>" ; } /* function GetCmsTree() { $conn = GetADODbConnection(); $query="SELECT st.* , wb.eng_content AS page_title FROM structure_templates st LEFT JOIN working_blocks AS wb ON (st.st_id = wb.template_id) AND (wb.block_type = 3) WHERE st_id != '5' AND st_path != '/cms' GROUP BY st_id ORDER BY st_lastupdate desc"; $rs = $conn->Execute($query); if ($rs && !$rs->EOF) { $ret = "<CmsPages>"; while($rs && !$rs->EOF) { $ret.= '<CmsPage path="'.BASE_PATH.'/index.php?t='.$rs->fields['st_path'].'" title="'.$rs->fields['page_title'].'" />'; //echo $rs->fields['page_title']."<br>"; $rs->MoveNext(); } $ret.= '</CmsPages>'; echo $ret; } } */ function GetCmsTree() { global $Config; $ret = "<CmsPages>"; if (isset($Config['K4Mode'])) { $ret.= K4ReadCmsTree(0); } else { $ret.= ReadCmsTree(0); } $ret.= "</CmsPages>"; echo $ret; } function K4ReadCmsTree($cat_id, $level = 0) { $application =& kApplication::Instance(); $application->Init(); $query = 'SELECT Path, Title FROM '.TABLE_PREFIX.'Pages'; $pages = $application->DB->Query($query); $res = ''; foreach ($pages as $page) { $page_path = $page['Path'].'.html'; $title = $page['Title'].' ('.$page_path.')'; $res .= '<CmsPage path="'.$page_path.'" title="'.$prefix.htmlspecialchars($title,ENT_QUOTES).'" serverpath="'.BASE_PATH.'/" />'; } return $res; } function ReadCmsTree($st_id, $level = 0) { $conn = GetADODbConnection(); $query = "SELECT value FROM config WHERE name = 'cms_direct_mode'"; $rs = $conn->Execute($query); if ($rs && !$rs->EOF) { $cms_mode = $rs->fields['value']; } $query = "SELECT value FROM config WHERE name = 'email_templates_folder_id'"; $rs = $conn->Execute($query); if ($rs && !$rs->EOF) { $email_templates_folder_id = $rs->fields['value']; } $query = "SELECT value FROM config WHERE name = 'custom_cms'"; $rs = $conn->Execute($query); if ($rs && !$rs->EOF) { $custom_cms = $rs->fields['value']; } if ( $email_templates_folder_id == "" ) $email_templates_folder_id = 0; if ( $cms_mode == 1 ) { $query = " SELECT st.*, IF(lb.eng_content='' OR lb.eng_content IS NULL, st.st_path, lb.eng_content ) AS page_title FROM structure_templates AS st LEFT JOIN live_blocks AS lb ON (st.st_id = lb.template_id) AND (lb.block_type = 3) WHERE st.st_parent_id = ".$st_id." AND st_id != ".$email_templates_folder_id." AND st_path != '/cms' AND st_name NOT IN (".$custom_cms.") ORDER BY st.st_order"; } else { $query = " SELECT st.*, IF(wb.eng_content='' OR wb.eng_content IS NULL, st.st_path, wb.eng_content ) AS page_title FROM structure_templates AS st LEFT JOIN working_blocks AS wb ON (st.st_id = wb.template_id) AND (wb.block_type = 3) WHERE st.st_parent_id = ".$st_id." AND st_id != ".$email_templates_folder_id." AND st_path != '/cms%' AND st_name NOT IN (".$custom_cms.") ORDER BY st.st_order"; } //echo $query." <br>"; $rs = $conn->Execute($query); if ($rs && !$rs->EOF) { while ($rs && !$rs->EOF) { $page_path = ltrim($rs->fields['st_path'], '/'); //$page_path = SERVER_NAME.BASE_PATH.'/index.php?t='.$page_path; //$page_path = $page_path; $prefix=''; for ($i = 0; $i < $level; $i++) $prefix .= '--'; if ($level > 0) $prefix=$prefix.'- '; $res .= '<CmsPage path="'.$page_path.'" title="'.$prefix.htmlspecialchars($rs->fields['page_title'],ENT_QUOTES).'" st_id="'.$rs->fields['st_id'].'" serverpath="'.BASE_PATH.'/index.php?t=" />'; $res .= ReadCmsTree($rs->fields['st_id'], $level+1); $rs->MoveNext(); } return $res; } } function GetFoldersAndFiles( $resourceType, $currentFolder ) { // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; // Initialize the output buffers for "Folders" and "Files". $sFolders = '<Folders>' ; $sFiles = '<Files>' ; $oCurrentFolder = opendir( $sServerDir ) ; while ( $sFile = readdir( $oCurrentFolder ) ) { if ( $sFile != '.' && $sFile != '..' && $sFile != 'CVS') { if ( is_dir( $sServerDir . $sFile ) ) $sFolders .= '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ; else { $iFileSize = filesize( $sServerDir . $sFile ) ; if ( $iFileSize > 0 ) { $iFileSize = round( $iFileSize / 1024 ) ; if ( $iFileSize < 1 ) $iFileSize = 1 ; } $sFiles .= '<File name="' . ConvertToXmlAttribute( $sFile ) . '" size="' . $iFileSize . '" />' ; } } } echo $sFolders ; // Close the "Folders" node. echo '</Folders>' ; echo $sFiles ; // Close the "Files" node. echo '</Files>' ; } function CreateFolder( $resourceType, $currentFolder ) { $sErrorNumber = '0' ; $sErrorMsg = '' ; if ( isset( $_GET['NewFolderName'] ) ) { $sNewFolderName = $_GET['NewFolderName'] ; // Map the virtual path to the local server path of the current folder. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; if ( is_writable( $sServerDir ) ) { $sServerDir .= $sNewFolderName ; $sErrorMsg = CreateServerFolder( $sServerDir ) ; switch ( $sErrorMsg ) { case '' : $sErrorNumber = '0' ; break ; case 'Invalid argument' : case 'No such file or directory' : $sErrorNumber = '102' ; // Path too long. break ; default : $sErrorNumber = '110' ; break ; } } else $sErrorNumber = '103' ; } else $sErrorNumber = '102' ; // Create the "Error" node. echo '<Error number="' . $sErrorNumber . '" originalDescription="' . ConvertToXmlAttribute( $sErrorMsg ) . '" />' ; } function FileUpload( $resourceType, $currentFolder ) { $sErrorNumber = '0' ; $sFileName = '' ; if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) ) { $oFile = $_FILES['NewFile'] ; // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; // Get the uploaded file name. $sFileName = $oFile['name'] ; $sOriginalFileName = $sFileName ; $sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ; global $Config ; $arAllowed = $Config['AllowedExtensions'][$resourceType] ; $arDenied = $Config['DeniedExtensions'][$resourceType] ; if ( ( count($arAllowed) == 0 || in_array( $sExtension, $arAllowed ) ) && ( count($arDenied) == 0 || !in_array( $sExtension, $arDenied ) ) ) { $iCounter = 0 ; while ( true ) { $sFilePath = $sServerDir . $sFileName ; if ( is_file( $sFilePath ) ) { $iCounter++ ; $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ; $sErrorNumber = '201' ; } else { move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; if ( is_file( $sFilePath ) ) { $oldumask = umask(0) ; chmod( $sFilePath, 0777 ) ; umask( $oldumask ) ; } break ; } } } else $sErrorNumber = '202' ; } else $sErrorNumber = '202' ; echo '<script type="text/javascript">' ; echo 'window.parent.frames["frmUpload"].OnUploadCompleted(' . $sErrorNumber . ',"' . str_replace( '"', '\\"', $sFileName ) . '") ;' ; echo '</script>' ; exit ; } ?>
\ No newline at end of file
Property changes on: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.8
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_1.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_1.js (revision 1998)
+++ trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_1.js (revision 1999)
@@ -1,25 +1,25 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* This file has been compacted for best loading performance.
*/
var FCKDebug=new Object();if (FCKConfig.Debug){FCKDebug.Output=function(message,color){if (!FCKConfig.Debug) return;if (message!=null&&isNaN(message)) message=message.replace(/</g,"&lt;");if (!this.DebugWindow||this.DebugWindow.closed) this.DebugWindow=window.open('fckdebug.html','FCKeditorDebug','menubar=no,scrollbars=no,resizable=yes,location=no,toolbar=no,width=600,height=500',true);if (this.DebugWindow.Output) this.DebugWindow.Output(message,color);};}else FCKDebug.Output=function() {};
var FCKTools=new Object();FCKTools.GetLinkedFieldValue=function(){return FCK.LinkedField.value;};FCKTools.SetLinkedFieldValue=function(value){if (FCKConfig.FormatOutput) FCK.LinkedField.value=FCKCodeFormatter.Format(value);else FCK.LinkedField.value=value;};FCKTools.AttachToLinkedFieldFormSubmit=function(functionPointer){var oForm=FCK.LinkedField.form;if (!oForm) return;if (FCKBrowserInfo.IsIE) oForm.attachEvent("onsubmit",functionPointer);else oForm.addEventListener('submit',functionPointer,true);if (!oForm.updateFCKEditor) oForm.updateFCKEditor=new Array();oForm.updateFCKEditor[oForm.updateFCKEditor.length]=functionPointer;if (!oForm.originalSubmit&&(typeof(oForm.submit)=='function'||(!oForm.submit.tagName&&!oForm.submit.length))){oForm.originalSubmit=oForm.submit;oForm.submit=function(){if (this.updateFCKEditor){for (var i=0;i<this.updateFCKEditor.length;i++) this.updateFCKEditor[i]();};this.originalSubmit();};};};FCKTools.AddSelectOption=function(targetDocument,selectElement,optionText,optionValue){var oOption=targetDocument.createElement("OPTION");oOption.text=optionText;oOption.value=optionValue;selectElement.options.add(oOption);return oOption;};FCKTools.RemoveAllSelectOptions=function(selectElement){for (var i=selectElement.options.length-1;i>=0;i--){selectElement.options.remove(i);};};FCKTools.SelectNoCase=function(selectElement,value,defaultValue){var sNoCaseValue=value.toString().toLowerCase();for (var i=0;i<selectElement.options.length;i++){if (sNoCaseValue==selectElement.options[i].value.toLowerCase()){selectElement.selectedIndex=i;return;};};if (defaultValue!=null) FCKTools.SelectNoCase(selectElement,defaultValue);};FCKTools.HTMLEncode=function(text){text=text.replace(/"/g,"&quot;");text=text.replace(/</g,"&lt;");text=text.replace(/>/g,"&gt;");text=text.replace(/'/g,"&#39;");return text;};FCKTools.GetResultingArray=function(arraySource,separator){switch (typeof(arraySource)){case "string":return arraySource.split(separator);case "function":return separator();default:if (isArray(arraySource)) return arraySource;else return new Array();};};FCKTools.GetElementPosition=function(el){var c={ X:0,Y:0 };while (el){c.X+=el.offsetLeft;c.Y+=el.offsetTop;el=el.offsetParent;};return c;};FCKTools.GetElementAscensor=function(element,ascensorTagName){var e=element.parentNode;while (e){if (e.nodeName==ascensorTagName) return e;e=e.parentNode;};};FCKTools.Pause=function(miliseconds){var oStart=new Date();while (true){var oNow=new Date();if (miliseconds<oNow-oStart) return;};};
FCKTools.AppendStyleSheet=function(documentElement,cssFileUrl){var e=documentElement.createElement('LINK');e.rel='stylesheet';e.type='text/css';e.href=cssFileUrl;documentElement.getElementsByTagName("HEAD")[0].appendChild(e);};FCKTools.ClearElementAttributes=function(element){for (var i=0;i<element.attributes.length;i++){element.removeAttribute(element.attributes[i].name,0);};};FCKTools.GetAllChildrenIds=function(parentElement){var aIds=new Array();var fGetIds=function(parent){for (var i=0;i<parent.childNodes.length;i++){var sId=parent.childNodes[i].id;if (sId&&sId.length>0) aIds[aIds.length]=sId;fGetIds(parent.childNodes[i]);};};fGetIds(parentElement);return aIds;};FCKTools.RemoveOuterTags=function(e){var oFragment=e.ownerDocument.createDocumentFragment();for (var i=0;i<e.childNodes.length;i++) oFragment.appendChild(e.childNodes[i]);e.parentNode.replaceChild(oFragment,e);};FCKTools.CreateXmlObject=function(object){switch (object){case 'XmlHttp':return new XMLHttpRequest();case 'DOMDocument':return document.implementation.createDocument('','',null);};}
var FCKRegexLib=new Object();FCKRegexLib.AposEntity=/&apos;/gi;FCKRegexLib.ObjectElements=/^(?:IMG|TABLE|TR|TD|INPUT|SELECT|TEXTAREA|HR|OBJECT)$/i;FCKRegexLib.BlockElements=/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI)$/i;FCKRegexLib.EmptyElements=/^(?:BASE|META|LINK|HR|BR|PARAM|IMG|AREA|INPUT)$/i;FCKRegexLib.NamedCommands=/^(?:Cut|Copy|Paste|Print|SelectAll|RemoveFormat|Unlink|Undo|Redo|Bold|Italic|Underline|StrikeThrough|Subscript|Superscript|JustifyLeft|JustifyCenter|JustifyRight|JustifyFull|Outdent|Indent|InsertOrderedList|InsertUnorderedList|InsertHorizontalRule)$/i;FCKRegexLib.BodyContents=/([\s\S]*\<body[^\>]*\>)([\s\S]*)(\<\/body\>[\s\S]*)/i;FCKRegexLib.ToReplace=/___fcktoreplace:([\w]+)/ig;FCKRegexLib.MetaHttpEquiv=/http-equiv\s*=\s*["']?([^"' ]+)/i;FCKRegexLib.HasBaseTag=/<base /i;FCKRegexLib.HeadCloser=/<\/head\s*>/i;FCKRegexLib.TableBorderClass=/\s*FCK__ShowTableBorders\s*/;
FCKLanguageManager.GetActiveLanguage=function(){if (FCKConfig.AutoDetectLanguage){var sUserLang;if (navigator.userLanguage) sUserLang=navigator.userLanguage.toLowerCase();else if (navigator.language) sUserLang=navigator.language.toLowerCase();else{return FCKConfig.DefaultLanguage;};FCKDebug.Output('Navigator Language = '+sUserLang);if (sUserLang.length>=5){sUserLang=sUserLang.substr(0,5);if (this.AvailableLanguages[sUserLang]) return sUserLang;};if (sUserLang.length>=2){sUserLang=sUserLang.substr(0,2);if (this.AvailableLanguages[sUserLang]) return sUserLang;};};return this.DefaultLanguage;};FCKLanguageManager.TranslateElements=function(targetDocument,tag,propertyToSet){var aInputs=targetDocument.getElementsByTagName(tag);for (var i=0;i<aInputs.length;i++){var sKey=aInputs[i].getAttribute('fckLang');if (sKey){var s=FCKLang[sKey];if (s) eval('aInputs[i].'+propertyToSet+' = s');};};};FCKLanguageManager.TranslatePage=function(targetDocument){this.TranslateElements(targetDocument,'INPUT','value');this.TranslateElements(targetDocument,'SPAN','innerHTML');this.TranslateElements(targetDocument,'LABEL','innerHTML');this.TranslateElements(targetDocument,'OPTION','innerHTML');};if (FCKLanguageManager.AvailableLanguages[FCKConfig.DefaultLanguage]) FCKLanguageManager.DefaultLanguage=FCKConfig.DefaultLanguage;else FCKLanguageManager.DefaultLanguage='en';FCKLanguageManager.ActiveLanguage=new Object();FCKLanguageManager.ActiveLanguage.Code=FCKLanguageManager.GetActiveLanguage();FCKLanguageManager.ActiveLanguage.Name=FCKLanguageManager.AvailableLanguages[FCKLanguageManager.ActiveLanguage.Code];FCK.Language=FCKLanguageManager;LoadLanguageFile();
var FCKEvents=function(eventsOwner){this.Owner=eventsOwner;this.RegisteredEvents=new Object();};FCKEvents.prototype.AttachEvent=function(eventName,functionPointer){if (!this.RegisteredEvents[eventName]) this.RegisteredEvents[eventName]=new Array();this.RegisteredEvents[eventName][this.RegisteredEvents[eventName].length]=functionPointer;};FCKEvents.prototype.FireEvent=function(eventName,params){var bReturnValue=true;var oCalls=this.RegisteredEvents[eventName];if (oCalls){for (var i=0;i<oCalls.length;i++) bReturnValue=(oCalls[i](params)&&bReturnValue);};return bReturnValue;}
FCKXHtmlEntities=new Object();FCKXHtmlEntities.Entities={' ':'nbsp','¡':'iexcl','¢':'cent','£':'pound','¤':'curren','¥':'yen','¦':'brvbar','§':'sect','¨':'uml','©':'copy','ª':'ordf','«':'laquo','¬':'not','­':'shy','®':'reg','¯':'macr','°':'deg','±':'plusmn','²':'sup2','³':'sup3','´':'acute','µ':'micro','¶':'para','·':'middot','¸':'cedil','¹':'sup1','º':'ordm','»':'raquo','¼':'frac14','½':'frac12','¾':'frac34','¿':'iquest','À':'Agrave','Á':'Aacute','Â':'Acirc','Ã':'Atilde','Ä':'Auml','Å':'Aring','Æ':'AElig','Ç':'Ccedil','È':'Egrave','É':'Eacute','Ê':'Ecirc','Ë':'Euml','Ì':'Igrave','Í':'Iacute','Î':'Icirc','Ï':'Iuml','Ð':'ETH','Ñ':'Ntilde','Ò':'Ograve','Ó':'Oacute','Ô':'Ocirc','Õ':'Otilde','Ö':'Ouml','×':'times','Ø':'Oslash','Ù':'Ugrave','Ú':'Uacute','Û':'Ucirc','Ü':'Uuml','Ý':'Yacute','Þ':'THORN','ß':'szlig','à':'agrave','á':'aacute','â':'acirc','ã':'atilde','ä':'auml','å':'aring','æ':'aelig','ç':'ccedil','è':'egrave','é':'eacute','ê':'ecirc','ë':'euml','ì':'igrave','í':'iacute','î':'icirc','ï':'iuml','ð':'eth','ñ':'ntilde','ò':'ograve','ó':'oacute','ô':'ocirc','õ':'otilde','ö':'ouml','÷':'divide','ø':'oslash','ù':'ugrave','ú':'uacute','û':'ucirc','ü':'uuml','ý':'yacute','þ':'thorn','ÿ':'yuml','ƒ':'fnof','Α':'Alpha','Β':'Beta','Γ':'Gamma','Δ':'Delta','Ε':'Epsilon','Ζ':'Zeta','Η':'Eta','Θ':'Theta','Ι':'Iota','Κ':'Kappa','Λ':'Lambda','Μ':'Mu','Ν':'Nu','Ξ':'Xi','Ο':'Omicron','Π':'Pi','Ρ':'Rho','Σ':'Sigma','Τ':'Tau','Υ':'Upsilon','Φ':'Phi','Χ':'Chi','Ψ':'Psi','Ω':'Omega','α':'alpha','β':'beta','γ':'gamma','δ':'delta','ε':'epsilon','ζ':'zeta','η':'eta','θ':'theta','ι':'iota','κ':'kappa','λ':'lambda','μ':'mu','ν':'nu','ξ':'xi','ο':'omicron','π':'pi','ρ':'rho','ς':'sigmaf','σ':'sigma','τ':'tau','υ':'upsilon','φ':'phi','χ':'chi','ψ':'psi','ω':'omega','ϑ':'thetasym','ϒ':'upsih','ϖ':'piv','•':'bull','…':'hellip','′':'prime','″':'Prime','‾':'oline','⁄':'frasl','℘':'weierp','ℑ':'image','ℜ':'real','™':'trade','ℵ':'alefsym','←':'larr','↑':'uarr','→':'rarr','↓':'darr','↔':'harr','↵':'crarr','⇐':'lArr','⇑':'uArr','⇒':'rArr','⇓':'dArr','⇔':'hArr','∀':'forall','∂':'part','∃':'exist','∅':'empty','∇':'nabla','∈':'isin','∉':'notin','∋':'ni','∏':'prod','∑':'sum','−':'minus','∗':'lowast','√':'radic','∝':'prop','∞':'infin','∠':'ang','∧':'and','∨':'or','∩':'cap','∪':'cup','∫':'int','∴':'there4','∼':'sim','≅':'cong','≈':'asymp','≠':'ne','≡':'equiv','≤':'le','≥':'ge','⊂':'sub','⊃':'sup','⊄':'nsub','⊆':'sube','⊇':'supe','⊕':'oplus','⊗':'otimes','⊥':'perp','⋅':'sdot','⌈':'lceil','⌉':'rceil','⌊':'lfloor','⌋':'rfloor','〈':'lang','〉':'rang','◊':'loz','♠':'spades','♣':'clubs','♥':'hearts','♦':'diams','"':'quot','Œ':'OElig','œ':'oelig','Š':'Scaron','š':'scaron','Ÿ':'Yuml','ˆ':'circ','˜':'tilde',' ':'ensp',' ':'emsp',' ':'thinsp','‌':'zwnj','‍':'zwj','‎':'lrm','‏':'rlm','–':'ndash','—':'mdash','‘':'lsquo','’':'rsquo','‚':'sbquo','“':'ldquo','”':'rdquo','„':'bdquo','†':'dagger','‡':'Dagger','‰':'permil','‹':'lsaquo','›':'rsaquo','€':'euro'};FCKXHtmlEntities.Chars='';for (var e in FCKXHtmlEntities.Entities) FCKXHtmlEntities.Chars+=e;FCKXHtmlEntities.EntitiesRegex=new RegExp('','');FCKXHtmlEntities.EntitiesRegex.compile('['+FCKXHtmlEntities.Chars+']|[^'+FCKXHtmlEntities.Chars+']+','g');FCKXHtmlEntities.GeckoEntitiesMarkerRegex=/#\?-\:/g;
var FCKXHtml=new Object();FCKXHtml.CurrentJobNum=0;FCKXHtml.GetXHTML=function(node,includeNode,format){FCKXHtml.SpecialBlocks=new Array();this.XML=FCKTools.CreateXmlObject('DOMDocument');this.MainNode=this.XML.appendChild(this.XML.createElement('xhtml'));FCKXHtml.CurrentJobNum++;if (includeNode) this._AppendNode(this.MainNode,node);else this._AppendChildNodes(this.MainNode,node,false);var sXHTML=this._GetMainXmlString();sXHTML=sXHTML.substr(7,sXHTML.length-15).trim();if (FCKConfig.ForceSimpleAmpersand) sXHTML=sXHTML.replace(/___FCKAmp___/g,'&');if (format) sXHTML=FCKCodeFormatter.Format(sXHTML);for (var i=0;i<FCKXHtml.SpecialBlocks.length;i++){var oRegex=new RegExp('___FCKsi___'+i);sXHTML=sXHTML.replace(oRegex,FCKXHtml.SpecialBlocks[i]);};this.XML=null;return sXHTML};FCKXHtml._AppendAttribute=function(xmlNode,attributeName,attributeValue){try{var oXmlAtt=this.XML.createAttribute(attributeName);oXmlAtt.value=attributeValue?attributeValue:'';xmlNode.attributes.setNamedItem(oXmlAtt);}catch (e){};};FCKXHtml._AppendChildNodes=function(xmlNode,htmlNode,isBlockElement){if (htmlNode.hasChildNodes()){var oChildren=htmlNode.childNodes;for (var i=0;i<oChildren.length;i++) this._AppendNode(xmlNode,oChildren[i]);}else{if (isBlockElement&&FCKConfig.FillEmptyBlocks){this._AppendEntity(xmlNode,'nbsp');return;};if (!FCKRegexLib.EmptyElements.test(htmlNode.nodeName)) xmlNode.appendChild(this.XML.createTextNode(''));};};FCKXHtml._AppendNode=function(xmlNode,htmlNode){switch (htmlNode.nodeType){case 1:if (FCKBrowserInfo.IsGecko&&htmlNode.hasAttribute('_moz_editor_bogus_node')) return;var sNodeName=htmlNode.nodeName.toLowerCase();if (FCKBrowserInfo.IsGecko&&sNodeName=='br'&&htmlNode.hasAttribute('type')&&htmlNode.getAttribute('type',2)=='_moz') return;if (htmlNode._fckxhtmljob==FCKXHtml.CurrentJobNum) return;else htmlNode._fckxhtmljob=FCKXHtml.CurrentJobNum;if (sNodeName.length==0||sNodeName.substr(0,1)=='/') break;var oNode=this.XML.createElement(sNodeName);FCKXHtml._AppendAttributes(xmlNode,htmlNode,oNode,sNodeName);var oTagProcessor=FCKXHtml.TagProcessors[sNodeName];if (oTagProcessor){oNode=oTagProcessor(oNode,htmlNode);if (!oNode) break;}else this._AppendChildNodes(oNode,htmlNode,FCKRegexLib.BlockElements.test(sNodeName));xmlNode.appendChild(oNode);break;case 3:var asPieces=htmlNode.nodeValue.replaceNewLineChars(' ').match(FCKXHtmlEntities.EntitiesRegex);if (asPieces){for (var i=0;i<asPieces.length;i++){if (asPieces[i].length==1){var sEntity=FCKXHtmlEntities.Entities[asPieces[i]];if (sEntity!=null){this._AppendEntity(xmlNode,sEntity);continue;};};xmlNode.appendChild(this.XML.createTextNode(asPieces[i]));};};break;case 8:xmlNode.appendChild(this.XML.createComment(htmlNode.nodeValue));break;default:xmlNode.appendChild(this.XML.createComment("Element not supported - Type: "+htmlNode.nodeType+" Name: "+htmlNode.nodeName));break;};};FCKXHtml._AppendSpecialItem=function(item){return '___FCKsi___'+FCKXHtml.SpecialBlocks.addItem(item);};FCKXHtml.TagProcessors=new Object();FCKXHtml.TagProcessors['img']=function(node){if (!node.attributes.getNamedItem('alt')) FCKXHtml._AppendAttribute(node,'alt','');return node;};FCKXHtml.TagProcessors['script']=function(node,htmlNode){if (!node.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(node,'type','text/javascript');node.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(htmlNode.text)));return node;};FCKXHtml.TagProcessors['style']=function(node,htmlNode){if (htmlNode.getAttribute('_fcktemp')) return null;if (!node.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(node,'type','text/css');node.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(htmlNode.innerHTML)));return node;};FCKXHtml.TagProcessors['title']=function(node,htmlNode){node.appendChild(FCKXHtml.XML.createTextNode(FCK.EditorDocument.title));return node;};FCKXHtml.TagProcessors['base']=function(node,htmlNode){if (htmlNode.getAttribute('_fcktemp')) return null;return node;};FCKXHtml.TagProcessors['link']=function(node,htmlNode){if (htmlNode.getAttribute('_fcktemp')) return null;return node;};FCKXHtml.TagProcessors['table']=function(node,htmlNode){var oClassAtt=node.attributes.getNamedItem('class');if (oClassAtt&&FCKRegexLib.TableBorderClass.test(oClassAtt.nodeValue)){var sClass=oClassAtt.nodeValue.replace(FCKRegexLib.TableBorderClass,'');if (sClass.length==0) node.attributes.removeNamedItem('class');else FCKXHtml._AppendAttribute(node,'class',sClass);};FCKXHtml._AppendChildNodes(node,htmlNode,false);return node;}
FCKXHtml._GetMainXmlString=function(){var oSerializer=new XMLSerializer();return oSerializer.serializeToString(this.MainNode).replace(FCKXHtmlEntities.GeckoEntitiesMarkerRegex,'&');};FCKXHtml._AppendEntity=function(xmlNode,entity){xmlNode.appendChild(this.XML.createTextNode('#?-:'+entity+';'));};FCKXHtml._AppendAttributes=function(xmlNode,htmlNode,node){var aAttributes=htmlNode.attributes;for (var n=0;n<aAttributes.length;n++){var oAttribute=aAttributes[n];if (oAttribute.specified){var sAttName=oAttribute.nodeName.toLowerCase();if (sAttName=='_fckxhtmljob') continue;else if (sAttName.indexOf('_moz')==0) continue;else if (sAttName=='class') var sAttValue=oAttribute.nodeValue;else if (oAttribute.nodeValue===true) sAttValue=sAttName;else var sAttValue=htmlNode.getAttribute(sAttName,2);if (FCKConfig.ForceSimpleAmpersand&&sAttValue.replace) sAttValue=sAttValue.replace(/&/g,'___FCKAmp___');this._AppendAttribute(node,sAttName,sAttValue);};};}
var FCKCodeFormatter=new Object();FCKCodeFormatter.Regex=new Object();FCKCodeFormatter.Regex.BlocksOpener=/\<(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|AREA|OPTION)[^\>]*\>/gi;FCKCodeFormatter.Regex.BlocksCloser=/\<\/(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|AREA|OPTION)[^\>]*\>/gi;FCKCodeFormatter.Regex.NewLineTags=/\<(BR|HR)[^\>]\>/gi;FCKCodeFormatter.Regex.MainTags=/\<\/?(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR)[^\>]*\>/gi;FCKCodeFormatter.Regex.LineSplitter=/\s*\n+\s*/g;FCKCodeFormatter.Regex.IncreaseIndent=/^\<(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \/\>]/i;FCKCodeFormatter.Regex.DecreaseIndent=/^\<\/(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \>]/i;FCKCodeFormatter.Regex.FormatIndentatorRemove=new RegExp(FCKConfig.FormatIndentator);FCKCodeFormatter.Format=function(html){var sFormatted=html.replace(this.Regex.BlocksOpener,'\n$&');;sFormatted=sFormatted.replace(this.Regex.BlocksCloser,'$&\n');sFormatted=sFormatted.replace(this.Regex.NewLineTags,'$&\n');sFormatted=sFormatted.replace(this.Regex.MainTags,'\n$&\n');var sIndentation='';var asLines=sFormatted.split(this.Regex.LineSplitter);sFormatted='';for (var i=0;i<asLines.length;i++){var sLine=asLines[i];if (sLine.length==0) continue;if (this.Regex.DecreaseIndent.test(sLine)) sIndentation=sIndentation.replace(this.Regex.FormatIndentatorRemove,'');sFormatted+=sIndentation+sLine+'\n';if (this.Regex.IncreaseIndent.test(sLine)) sIndentation+=FCKConfig.FormatIndentator;};return sFormatted.trim();}
var FCKUndo=new Object();FCKUndo.SavedData=new Array();FCKUndo.CurrentIndex=-1;FCKUndo.SaveUndoStep=function(){FCKUndo.SavedData=FCKUndo.SavedData.slice(0,FCKUndo.CurrentIndex+1);var sHtml=FCK.EditorDocument.body.innerHTML;if (FCKUndo.CurrentIndex>=0&&sHtml==FCKUndo.SavedData[FCKUndo.CurrentIndex][0]) return;if (FCKUndo.CurrentIndex+1>=FCKConfig.MaxUndoLevels) FCKUndo.SavedData.shift();else FCKUndo.CurrentIndex++;var sBookmark;if (FCK.EditorDocument.selection.type=='Text') sBookmark=FCK.EditorDocument.selection.createRange().getBookmark();FCKUndo.SavedData[FCKUndo.CurrentIndex]=[sHtml,sBookmark];FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.Undo=function(){if (FCKUndo.CurrentIndex>0){if (FCKUndo.CurrentIndex==(FCKUndo.SavedData.length-1)){FCKUndo.SaveUndoStep();};FCKUndo._ApplyUndoLevel(--FCKUndo.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");};};FCKUndo.Redo=function(){if (FCKUndo.CurrentIndex<(FCKUndo.SavedData.length-1)){FCKUndo._ApplyUndoLevel(++FCKUndo.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");};};FCKUndo._ApplyUndoLevel=function(level){var oData=FCKUndo.SavedData[level];FCK.EditorDocument.body.innerHTML=oData[0];if (oData[1]){var oRange=FCK.EditorDocument.selection.createRange();oRange.moveToBookmark(oData[1]);oRange.select();};}
-FCK.Events=new FCKEvents(FCK);FCK.Toolbar=null;FCK.TempBaseTag=FCKConfig.BaseHref.length>0?'<base href="'+FCKConfig.BaseHref+'" _fcktemp="true"></base>':'';FCK.StartEditor=function(){this.EditorWindow=window.frames['eEditorArea'];this.EditorDocument=this.EditorWindow.document;if (FCKBrowserInfo.IsGecko) this.MakeEditable();this.SetHTML(FCKTools.GetLinkedFieldValue());FCKTools.AttachToLinkedFieldFormSubmit(this.UpdateLinkedField);this.SetStatus(FCK_STATUS_ACTIVE);};FCK.SetStatus=function(newStatus){this.Status=newStatus;if (newStatus==FCK_STATUS_ACTIVE){window.onfocus=window.document.body.onfocus=FCK.Focus;if (FCKConfig.StartupFocus) FCK.Focus();if (FCKBrowserInfo.IsIE) FCKScriptLoader.AddScript('js/fckeditorcode_ie_2.js');else FCKScriptLoader.AddScript('js/fckeditorcode_gecko_2.js');};this.Events.FireEvent('OnStatusChange',newStatus);if (this.OnStatusChange) this.OnStatusChange(newStatus);};FCK.GetHTML=function(format){var sHTML;if (FCK.EditMode==FCK_EDITMODE_WYSIWYG){if (FCKBrowserInfo.IsIE) sHTML=this.EditorDocument.body.innerHTML.replace(FCKRegexLib.ToReplace,'$1');else sHTML=this.EditorDocument.body.innerHTML;}else sHTML=document.getElementById('eSourceField').value;if (format) return FCKCodeFormatter.Format(sHTML);else return sHTML;};FCK.GetXHTML=function(format){var bSource=(FCK.EditMode==FCK_EDITMODE_SOURCE);if (bSource) this.SwitchEditMode();if (FCKConfig.FullPage) var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.getElementsByTagName('html')[0],true,format);else var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.body,false,format);if (bSource) this.SwitchEditMode();if (FCKBrowserInfo.IsIE) sXHTML=sXHTML.replace(FCKRegexLib.ToReplace,'$1');if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) sXHTML=FCK.DocTypeDeclaration+'\n'+sXHTML;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) sXHTML=FCK.XmlDeclaration+'\n'+sXHTML;return sXHTML;};FCK.UpdateLinkedField=function(){if (FCKConfig.EnableXHTML) FCKTools.SetLinkedFieldValue(FCK.GetXHTML(FCKConfig.FormatOutput));else FCKTools.SetLinkedFieldValue(FCK.GetHTML(FCKConfig.FormatOutput));};FCK.ShowContextMenu=function(x,y){if (this.Status!=FCK_STATUS_COMPLETE) return;FCKContextMenu.Show(x,y);this.Events.FireEvent("OnContextMenu");};FCK.RegisteredDoubleClickHandlers=new Object();FCK.OnDoubleClick=function(element){var oHandler=FCK.RegisteredDoubleClickHandlers[element.tagName];if (oHandler){oHandler(element);};};FCK.RegisterDoubleClickHandler=function(handlerFunction,tag){FCK.RegisteredDoubleClickHandlers[tag.toUpperCase()]=handlerFunction;};
+FCK.Events=new FCKEvents(FCK);FCK.Toolbar=null;FCK.TempBaseTag=FCKConfig.BaseHref.length>0?'<base href="'+FCKConfig.BaseHref+'" _fcktemp="true"></base>':'';FCK.StartEditor=function(){this.EditorWindow=window.frames['eEditorArea'];this.EditorDocument=this.EditorWindow.document;if (FCKBrowserInfo.IsGecko) this.MakeEditable();this.SetHTML(FCKTools.GetLinkedFieldValue());FCKTools.AttachToLinkedFieldFormSubmit(this.UpdateLinkedField);this.SetStatus(FCK_STATUS_ACTIVE);};FCK.SetStatus=function(newStatus){this.Status=newStatus;if (newStatus==FCK_STATUS_ACTIVE){window.onfocus=window.document.body.onfocus=FCK.Focus;if (FCKConfig.StartupFocus) FCK.Focus();if (FCKBrowserInfo.IsIE) FCKScriptLoader.AddScript('js/fckeditorcode_ie_2.js');else FCKScriptLoader.AddScript('js/fckeditorcode_gecko_2.js');};this.Events.FireEvent('OnStatusChange',newStatus);if (this.OnStatusChange) this.OnStatusChange(newStatus);if (typeof(FCKConfig.newBgColor)!='undefined') this.EditorDocument.bgColor=FCKConfig.newBgColor;};FCK.GetHTML=function(format){var sHTML;if (FCK.EditMode==FCK_EDITMODE_WYSIWYG){if (FCKBrowserInfo.IsIE) sHTML=this.EditorDocument.body.innerHTML.replace(FCKRegexLib.ToReplace,'$1');else sHTML=this.EditorDocument.body.innerHTML;}else sHTML=document.getElementById('eSourceField').value;if (format) return FCKCodeFormatter.Format(sHTML);else return sHTML;};FCK.GetXHTML=function(format){var bSource=(FCK.EditMode==FCK_EDITMODE_SOURCE);if (bSource) this.SwitchEditMode();if (FCKConfig.FullPage) var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.getElementsByTagName('html')[0],true,format);else var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.body,false,format);if (bSource) this.SwitchEditMode();if (FCKBrowserInfo.IsIE) sXHTML=sXHTML.replace(FCKRegexLib.ToReplace,'$1');if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) sXHTML=FCK.DocTypeDeclaration+'\n'+sXHTML;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) sXHTML=FCK.XmlDeclaration+'\n'+sXHTML;return sXHTML;};FCK.UpdateLinkedField=function(){if (FCKConfig.EnableXHTML) FCKTools.SetLinkedFieldValue(FCK.GetXHTML(FCKConfig.FormatOutput));else FCKTools.SetLinkedFieldValue(FCK.GetHTML(FCKConfig.FormatOutput));};FCK.ShowContextMenu=function(x,y){if (this.Status!=FCK_STATUS_COMPLETE) return;FCKContextMenu.Show(x,y);this.Events.FireEvent("OnContextMenu");};FCK.RegisteredDoubleClickHandlers=new Object();FCK.OnDoubleClick=function(element){var oHandler=FCK.RegisteredDoubleClickHandlers[element.tagName];if (oHandler){oHandler(element);};};FCK.RegisterDoubleClickHandler=function(handlerFunction,tag){FCK.RegisteredDoubleClickHandlers[tag.toUpperCase()]=handlerFunction;};
FCK.Description="FCKeditor for Gecko Browsers";FCK.InitializeBehaviors=function(){var oOnContextMenu=function(e){e.preventDefault();FCK.ShowContextMenu(e.clientX,e.clientY);};this.EditorDocument.addEventListener('contextmenu',oOnContextMenu,true);var oOnKeyDown=function(e){if (e.ctrlKey&&!e.shiftKey&&!e.altKey){if (e.which==86||e.which==118){if (FCK.Status==FCK_STATUS_COMPLETE){if (!FCK.Events.FireEvent("OnPaste")) e.preventDefault();}else e.preventDefault();};};};this.EditorDocument.addEventListener('keydown',oOnKeyDown,true);this.ExecOnSelectionChange=function(){FCK.Events.FireEvent("OnSelectionChange");};this.ExecOnSelectionChangeTimer=function(){if (FCK.LastOnChangeTimer) window.clearTimeout(FCK.LastOnChangeTimer);FCK.LastOnChangeTimer=window.setTimeout(FCK.ExecOnSelectionChange,100);};this.EditorDocument.addEventListener('mouseup',this.ExecOnSelectionChange,false);this.EditorDocument.addEventListener('keyup',this.ExecOnSelectionChangeTimer,false);this._DblClickListener=function(e){FCK.OnDoubleClick(e.target);e.stopPropagation();};this.EditorDocument.addEventListener('dblclick',this._DblClickListener,true);this._OnLoad=function(){if (this._FCK_HTML){this.document.body.innerHTML=this._FCK_HTML;this._FCK_HTML=null;};};this.EditorWindow.addEventListener('load',this._OnLoad,true);};FCK.MakeEditable=function(){this.EditorWindow.document.designMode='on';this.EditorWindow.document.execCommand('useCSS',false,!FCKConfig.GeckoUseSPAN);};FCK.Focus=function(){try{FCK.EditorWindow.focus();}catch(e) {};};FCK.SetHTML=function(html,forceWYSIWYG){if (forceWYSIWYG||FCK.EditMode==FCK_EDITMODE_WYSIWYG){this.EditorDocument.open();if (FCKConfig.FullPage&&FCKRegexLib.BodyContents.test(html)){if (FCK.TempBaseTag.length>0&&!FCKRegexLib.HasBaseTag.test(html)) html=html.replace(FCKRegexLib.HeadCloser,FCK.TempBaseTag+'</head>');html=html.replace(FCKRegexLib.HeadCloser,'<link href="'+FCKConfig.BasePath+'css/fck_internal.css'+'" rel="stylesheet" type="text/css" _fcktemp="true" /></head>');var oMatch=html.match(FCKRegexLib.BodyContents);var sOpener=oMatch[1];var sContents=oMatch[2];var sCloser=oMatch[3];this.EditorDocument.write(sOpener+'&nbsp;'+sCloser);}else{var sHtml='<html dir="'+FCKConfig.ContentLangDirection+'">'+'<head><title></title>'+'<link href="'+FCKConfig.EditorAreaCSS+'" rel="stylesheet" type="text/css" />'+'<link href="'+FCKConfig.BasePath+'css/fck_internal.css'+'" rel="stylesheet" type="text/css" _fcktemp="true" />';sHtml+=FCK.TempBaseTag;sHtml+='</head><body>&nbsp;</body></html>';this.EditorDocument.write(sHtml);};this.EditorDocument.close();if (this.EditorDocument.body) this.EditorDocument.body.innerHTML=sContents?sContents:html;else this.EditorWindow._FCK_HTML=sContents?sContents:html;this.InitializeBehaviors();this.Events.FireEvent('OnAfterSetHTML');}else document.getElementById('eSourceField').value=html;};
Property changes on: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_1.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_2.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_2.js (revision 1998)
+++ trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_2.js (revision 1999)
@@ -1,54 +1,54 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* This file has been compacted for best loading performance.
*/
-FCK.RedirectNamedCommands=new Object();FCK.ExecuteNamedCommand=function(commandName,commandParameter){if (FCK.RedirectNamedCommands[commandName]!=null) {FCK.ExecuteRedirectedNamedCommand(commandName,commandParameter);}else{FCK.Focus();if (commandName=="Undo"){if (confirm("This will delete everything on this page. Are you sure?")) FCK.EditorDocument.execCommand(commandName,false,commandParameter);} else FCK.EditorDocument.execCommand(commandName,false,commandParameter);FCK.Events.FireEvent('OnSelectionChange');};};FCK.GetNamedCommandState=function(commandName){try{if (commandName=='InsertHorizontalRule') return FCK_TRISTATE_OFF;if (!FCK.EditorDocument.queryCommandEnabled(commandName)) return FCK_TRISTATE_DISABLED;else {switch (commandName){default:return FCK.EditorDocument.queryCommandState(commandName)?FCK_TRISTATE_ON:FCK_TRISTATE_OFF;};};}catch (e){return FCK_TRISTATE_OFF;};};FCK.GetNamedCommandValue=function(commandName){var sValue='';var eState=FCK.GetNamedCommandState(commandName);if (eState==FCK_TRISTATE_DISABLED) return null;try{sValue=this.EditorDocument.queryCommandValue(commandName);}catch(e) {};return sValue?sValue:'';};FCK.CleanAndPaste=function(html){html=html.replace(/<\/?SPAN[^>]*>/gi,"");html=html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<\\?\?xml[^>]*>/gi,"");html=html.replace(/<\/?\w+:[^>]*>/gi,"");html=html.replace(/&nbsp;/," ");var re=new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi");html=html.replace(re,"<div$2</div>");FCK.InsertHtml(html);};FCK.Preview=function(){if (typeof(FCKConfig.template_name)!='undefined'&&FCKConfig.template_name!=''){oWindow=window.open(FCKConfig.project_path+'index.php?t='+FCKConfig.template_name,'prewiev','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');if (FCKBrowserInfo.IsIE) {oWindow.attachEvent("onload",FCK.SetPreview);}else oWindow.addEventListener('load',FCK.SetPreview,true);return;}else {var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML='<html><head><link href="'+FCKConfig.EditorAreaCSS+'" rel="stylesheet" type="text/css" /></head><body>'+FCK.GetHTML()+'</body></html>';oWindowE.document.write(sHTML);oWindowE.document.close();};};FCK.SetPreview=function(){oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML=FCK.GetHTML();};FCK.SwitchEditMode=function(){var bWYSIWYG=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=bWYSIWYG?'none':'';document.getElementById('eSource').style.display=bWYSIWYG?'':'none';if (bWYSIWYG) document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=bWYSIWYG?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();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];};};};
+FCK.RedirectNamedCommands=new Object();var oWindow=new Object();FCK.ExecuteNamedCommand=function(commandName,commandParameter){if (FCK.RedirectNamedCommands[commandName]!=null) {FCK.ExecuteRedirectedNamedCommand(commandName,commandParameter);}else{FCK.Focus();if (commandName=="Undo"){if (confirm("This will delete everything on this page. Are you sure?")) FCK.EditorDocument.execCommand(commandName,false,commandParameter);} else FCK.EditorDocument.execCommand(commandName,false,commandParameter);FCK.Events.FireEvent('OnSelectionChange');};};FCK.GetNamedCommandState=function(commandName){try{if (commandName=='InsertHorizontalRule') return FCK_TRISTATE_OFF;if (!FCK.EditorDocument.queryCommandEnabled(commandName)) return FCK_TRISTATE_DISABLED;else {switch (commandName){default:return FCK.EditorDocument.queryCommandState(commandName)?FCK_TRISTATE_ON:FCK_TRISTATE_OFF;};};}catch (e){return FCK_TRISTATE_OFF;};};FCK.GetNamedCommandValue=function(commandName){var sValue='';var eState=FCK.GetNamedCommandState(commandName);if (eState==FCK_TRISTATE_DISABLED) return null;try{sValue=this.EditorDocument.queryCommandValue(commandName);}catch(e) {};return sValue?sValue:'';};FCK.CleanAndPaste=function(html){html=html.replace(/<\/?SPAN[^>]*>/gi,"");html=html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<\\?\?xml[^>]*>/gi,"");html=html.replace(/<\/?\w+:[^>]*>/gi,"");html=html.replace(/&nbsp;/," ");var re=new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi");html=html.replace(re,"<div$2</div>");FCK.InsertHtml(html);};FCK.Preview=function(){if (typeof(FCKConfig.template_name)!='undefined'&&FCKConfig.template_name!=''){oWindow=window.open(FCKConfig.ProjectPath+'/index.php?t='+FCKConfig.template_name,'prewiev','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');if (FCKBrowserInfo.IsIE) {oWindow.attachEvent("onload",FCK.SetPreview);}else oWindow.addEventListener('load',FCK.SetPreview,true);return;}else {if (typeof(FCKConfig.preview_width)!='undefined'&&typeof(FCKConfig.preview_height)!='undefined'&&FCKConfig.preview_width>0&&FCKConfig.preview_height>0) var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+FCKConfig.preview_width+',height='+FCKConfig.preview_height);else var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML='<html><head><link href="'+FCKConfig.EditorAreaCSS+'" rel="stylesheet" type="text/css" /></head><body>'+FCK.GetHTML()+'</body></html>';oWindowE.document.write(sHTML);oWindowE.document.close();};};FCK.SetPreview=function(){oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML=FCK.GetHTML();};FCK.SwitchEditMode=function(){var bWYSIWYG=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=bWYSIWYG?'none':'';document.getElementById('eSource').style.display=bWYSIWYG?'':'none';if (bWYSIWYG) document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=bWYSIWYG?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;FCK.Focus();};FCK.CreateElement=function(tag){var e=FCK.EditorDocument.createElement(tag);return FCK.InsertElementAndGetIt(e);};FCK.InsertElementAndGetIt=function(e){e.setAttribute('__FCKTempLabel',1);this.InsertElement(e);var aEls=FCK.EditorDocument.getElementsByTagName(e.tagName);for (var i=0;i<aEls.length;i++){if (aEls[i].getAttribute('__FCKTempLabel')){aEls[i].removeAttribute('__FCKTempLabel');return aEls[i];};};};
FCK._BaseGetNamedCommandState=FCK.GetNamedCommandState;FCK.GetNamedCommandState=function(commandName){switch (commandName){default:return FCK._BaseGetNamedCommandState(commandName);};};FCK.RedirectNamedCommands={Print:true,Paste:true,Cut:true,Copy:true};FCK.ExecuteRedirectedNamedCommand=function(commandName,commandParameter){switch (commandName){case 'Print':FCK.EditorWindow.print();break;case 'Paste':try { if (FCK.Paste()) FCK._BaseExecuteNamedCommand('Paste');}catch (e) { alert(FCKLang.PasteErrorPaste);};break;case 'Cut':try { FCK._BaseExecuteNamedCommand('Cut');}catch (e) { alert(FCKLang.PasteErrorCut);};break;case 'Copy':try { FCK._BaseExecuteNamedCommand('Copy');}catch (e) { alert(FCKLang.PasteErrorCopy);};break;default:FCK.ExecuteNamedCommand(commandName,commandParameter);};};FCK.AttachToOnSelectionChange=function(functionPointer){this.Events.AttachEvent('OnSelectionChange',functionPointer);};FCK.Paste=function(){if (FCKConfig.ForcePasteAsPlainText){FCK.PasteAsPlainText();return false;}else if (FCKConfig.AutoDetectPasteFromWord&&FCKBrowserInfo.IsIE55OrMore){var sHTML=FCK.GetClipboardHTML();var re=/<\w[^>]* class="?MsoNormal"?/gi;if (re.test(sHTML)){if (confirm(FCKLang["PasteWordConfirm"])){FCK.CleanAndPaste(sHTML);return false;};};}else return true;};FCK.InsertHtml=function(html){var oSel=FCKSelection.Delete();var oRange=oSel.getRangeAt(0);var oFragment=oRange.createContextualFragment(html);var oLastNode=oFragment.lastChild;oRange.insertNode(oFragment);oRange.setEndAfter(oLastNode);oRange.setStartAfter(oLastNode);oSel.removeAllRanges();oSel=FCK.EditorWindow.getSelection();this.Focus();};FCK.InsertElement=function(element){var oSel=FCKSelection.Delete();var oRange=oSel.getRangeAt(0);oRange.insertNode(element);oRange.setEndAfter(element);oRange.setStartAfter(element);this.Focus();};FCK.PasteAsPlainText=function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteAsText,'dialog/fck_paste.html',400,330,'PlainText');};FCK.PasteFromWord=function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');};FCK.GetClipboardHTML=function(){return '';};FCK.CreateLink=function(url){FCK.ExecuteNamedCommand('Unlink');if (url.length>0){var sTempUrl='javascript:void(0);/*'+(new Date().getTime())+'*/';FCK.ExecuteNamedCommand('CreateLink',sTempUrl);var oLink=document.evaluate("//a[@href='"+sTempUrl+"']",this.EditorDocument.body,null,9,null).singleNodeValue;if (oLink){oLink.href=url;return oLink;};};};
var FCKSelection=new Object();FCK.Selection=FCKSelection;
FCKSelection.GetType=function(){this._Type='Text';var oSel=FCK.EditorWindow.getSelection();if (oSel&&oSel.rangeCount==1){var oRange=oSel.getRangeAt(0);if (oRange.startContainer==oRange.endContainer&&(oRange.endOffset-oRange.startOffset)==1) this._Type='Control';};return this._Type;};FCKSelection.GetSelectedElement=function(){if (this.GetType()=='Control'){var oSel=FCK.EditorWindow.getSelection();return oSel.anchorNode.childNodes[oSel.anchorOffset];};};FCKSelection.GetParentElement=function(){if (this.GetType()=='Control') return FCKSelection.GetSelectedElement().parentElement;else{var oSel=FCK.EditorWindow.getSelection();if (oSel){var oNode=oSel.anchorNode;while (oNode&&oNode.nodeType!=1) oNode=oNode.parentNode;return oNode;};};};FCKSelection.MoveToNode=function(node){var oSel=FCK.EditorWindow.getSelection();for (i=oSel.rangeCount-1;i>=0;i--){if (i==0) oSel.getRangeAt(i).selectNodeContents(node);else oSel.removeRange(oSel.getRangeAt(i));};};FCKSelection.HasAncestorNode=function(nodeTagName){var oContainer=this.GetSelectedElement();if (!oContainer&&FCK.EditorWindow){try { oContainer=FCK.EditorWindow.getSelection().getRangeAt(0).startContainer;}catch(e){};};while (oContainer){if (oContainer.tagName==nodeTagName) return true;oContainer=oContainer.parentNode;};return false;};FCKSelection.MoveToAncestorNode=function(nodeTagName){var oNode;var oContainer=this.GetSelectedElement();if (!oContainer) oContainer=FCK.EditorWindow.getSelection().getRangeAt(0).startContainer;while (oContainer){if (oContainer.tagName==nodeTagName) return oContainer;oContainer=oContainer.parentNode;};};FCKSelection.Delete=function(){var oSel=FCK.EditorWindow.getSelection();for (var i=0;i<oSel.rangeCount;i++){oSel.getRangeAt(i).deleteContents();};return oSel;};FCKSelection.SelectElement=function(element){var oRange=FCK.EditorDocument.createRange();oRange.selectNode(element);var oSel=FCK.EditorWindow.getSelection();oSel.removeAllRanges();oSel.addRange(oRange);}
var FCKPanel=function(parentWindow){if (parentWindow) this.Window=parentWindow;else{this.Window=window;while (this.Window!=window.top){try{if (this.Window.parent.document.body.tagName=='FRAMESET') break;}catch (e){break;};this.Window=this.Window.parent;};};};FCKPanel.prototype.Create=function(){this._IFrame=this.Window.document.body.appendChild(this.Window.document.createElement('IFRAME'));this._IFrame.src='about:blank';this._IFrame.frameBorder='0';this._IFrame.scrolling='no';this._IFrame.style.left='0px';this._IFrame.style.top='0px';this._IFrame.width=10;this._IFrame.height=10;this._IFrame.style.position='absolute';this._IFrame.style.visibility='hidden';this._IFrame.IsFCKPanel=true;this._IFrame.Panel=this;this.Document=this._IFrame.contentWindow.document;this.Document.open();this.Document.write('<html><head></head><body><\/body><\/html>');this.Document.close();this.Document.body.style.margin=this.Document.body.style.padding='0px';if (this.StyleSheet) FCKTools.AppendStyleSheet(this.Document,this.StyleSheet);this.OuterDiv=this.Document.body.appendChild(this.Document.createElement('DIV'));this.OuterDiv.style.cssFloat='left';this.PanelDiv=this.OuterDiv.appendChild(this.Document.createElement('DIV'));this.PanelDiv.className='FCK_Panel';this.Created=true;};FCKPanel.prototype.Show=function(panelX,panelY,relElement,width,height,autoSize){if (!this.Created) this.Create();if (width!=null&&autoSize&&width<this.OuterDiv.offsetWidth) this.PanelDiv.style.width=width;if (height!=null&&autoSize&&height<this.PanelDiv.offsetHeight) this.PanelDiv.style.height=height+'px';var oPos=this.GetElementPosition(relElement);panelX+=oPos.X;panelY+=oPos.Y;if (panelX+this.OuterDiv.offsetWidth>this.Window.innerWidth){panelX-=panelX+this.OuterDiv.offsetWidth-this.Window.innerWidth;};this._IFrame.style.left=panelX+'px';this._IFrame.style.top=panelY+'px';function SetOnClickListener(targetWindow,targetFunction){try{if (targetWindow==null||(targetWindow.frameElement&&targetWindow.frameElement.IsFCKPanel)) return;targetWindow.document.addEventListener('click',targetFunction,false);}catch (e) {};for (var i=0;i<targetWindow.frames.length;i++) SetOnClickListener(targetWindow.frames[i],targetFunction);};SetOnClickListener(window.top,FCKPanelEventHandlers.OnDocumentClick);this._IFrame.width=this.OuterDiv.offsetWidth;this._IFrame.height=this.OuterDiv.offsetHeight;this._IFrame.style.visibility='';};FCKPanel.prototype.GetElementPosition=function(el){var c={ X:0,Y:0 };while (el){c.X+=el.offsetLeft;c.Y+=el.offsetTop;if (el.offsetParent==null&&el.ownerDocument.defaultView!=this.Window) el=el.ownerDocument.defaultView.frameElement;else el=el.offsetParent;};return c;};FCKPanel.prototype.Hide=function(){this.PanelDiv.style.overflow='visible';this._IFrame.style.visibility='hidden';};var FCKPanelEventHandlers=new Object();FCKPanelEventHandlers.OnDocumentClick=function(e){var oWindow=e.target.ownerDocument.defaultView;if (!oWindow.IsFCKPanel){function RemoveOnClickListener(targetWindow){if (targetWindow==null) return;try{if (targetWindow.frameElement&&targetWindow.frameElement.IsFCKPanel) targetWindow.frameElement.Panel.Hide();else targetWindow.document.removeEventListener('click',FCKPanelEventHandlers.OnDocumentClick,false);}catch (e) {};for (var i=0;i<targetWindow.frames.length;i++) RemoveOnClickListener(targetWindow.frames[i]);};RemoveOnClickListener(window.top);};}
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');oCell.innerHTML='&nbsp;';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");oNewCell.innerHTML="&nbsp;";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++){aCells[i].innerHTML='&nbsp;';};}
FCKTableHandler.GetSelectedCells=function(){var aCells=new Array();var oSelection=FCK.EditorWindow.getSelection();if (oSelection.rangeCount==1&&oSelection.anchorNode.nodeType==3){var oParent=FCKTools.GetElementAscensor(oSelection.anchorNode,'TD');if (oParent){aCells[0]=oParent;return aCells;};};for (var i=0;i<oSelection.rangeCount;i++){var oRange=oSelection.getRangeAt(i);var oCell=oRange.startContainer.childNodes[oRange.startOffset];if (oCell.tagName=='TD') aCells[aCells.length]=oCell;};return aCells;};
var FCKXml=function(){};FCKXml.prototype.LoadUrl=function(urlToCall,asyncFunctionPointer){var oFCKXml=this;var bAsync=(typeof(asyncFunctionPointer)=='function');var oXmlHttp=FCKTools.CreateXmlObject('XmlHttp');oXmlHttp.open("GET",urlToCall,bAsync);if (bAsync){oXmlHttp.onreadystatechange=function(){if (oXmlHttp.readyState==4){oFCKXml.DOMDocument=oXmlHttp.responseXML;asyncFunctionPointer(oFCKXml);};};};oXmlHttp.send(null);if (!bAsync){if (oXmlHttp.status==200) this.DOMDocument=oXmlHttp.responseXML;else if (oXmlHttp.status==0&&oXmlHttp.readyState==4) this.DOMDocument=oXmlHttp.responseXML;else alert('Error loading "'+urlToCall+'"');};};FCKXml.prototype.SelectNodes=function(xpath,contextNode){var aNodeArray=new Array();var xPathResult=this.DOMDocument.evaluate(xpath,contextNode?contextNode:this.DOMDocument,this.DOMDocument.createNSResolver(this.DOMDocument.documentElement),XPathResult.ORDERED_NODE_ITERATOR_TYPE,null);if (xPathResult){var oNode=xPathResult.iterateNext();while(oNode){aNodeArray[aNodeArray.length]=oNode;oNode=xPathResult.iterateNext();};};return aNodeArray;};FCKXml.prototype.SelectSingleNode=function(xpath,contextNode){var xPathResult=this.DOMDocument.evaluate(xpath,contextNode?contextNode:this.DOMDocument,this.DOMDocument.createNSResolver(this.DOMDocument.documentElement),9,null);if (xPathResult&&xPathResult.singleNodeValue) return xPathResult.singleNodeValue;else return null;};
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());}
FCKStyleDef.prototype.ApplyToSelection=function(){if (FCKSelection.GetType()=='Text'&&!this.IsObjectElement){var oSelection=FCK.EditorWindow.getSelection();var e=FCK.EditorDocument.createElement(this.Element);for (var i=0;i<oSelection.rangeCount;i++){e.appendChild(oSelection.getRangeAt(i).extractContents());};this._AddAttributes(e);this._RemoveDuplicates(e);var oRange=oSelection.getRangeAt(0);oRange.insertNode(e);}else{var oControl=FCKSelection.GetSelectedElement();if (oControl.tagName==this.Element) this._AddAttributes(oControl);};};FCKStyleDef.prototype._AddAttributes=function(targetElement){for (var a in this.Attributes) targetElement.setAttribute(a,this.Attributes[a],0);};FCKStyleDef.prototype._RemoveDuplicates=function(parent){for (var i=0;i<parent.childNodes.length;i++){var oChild=parent.childNodes[i];if (oChild.nodeType!=1) continue;this._RemoveDuplicates(oChild);if (this.IsEqual(oChild)) FCKTools.RemoveOuterTags(oChild);};};FCKStyleDef.prototype.IsEqual=function(e){if (e.tagName!=this.Element) return false;for (var a in this.Attributes){if (e.getAttribute(a)!=this.Attributes[a]) return false;};return true;};FCKStyleDef.prototype._RemoveMe=function(elementToCheck){if (!elementToCheck) return;var oParent=elementToCheck.parentNode;if (elementToCheck.nodeType==1&&this.IsEqual(elementToCheck)){if (this.IsObjectElement){for (var a in this.Attributes) elementToCheck.removeAttribute(a,0);return;}else FCKTools.RemoveOuterTags(elementToCheck);};this._RemoveMe(oParent);}
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;}
var FCKNamedCommand=function(commandName){this.Name=commandName;};FCKNamedCommand.prototype.Execute=function(){FCK.ExecuteNamedCommand(this.Name);};FCKNamedCommand.prototype.GetState=function(){return FCK.GetNamedCommandState(this.Name);};
-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;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCK.SetHTML(FCKBrowserInfo.IsGecko?'&nbsp;':'');};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);}
+var 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;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCK.SetHTML(FCKBrowserInfo.IsGecko?'&nbsp;':'');if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);}
var FCKSpellCheckCommand=function(){this.Name='SpellCheck';this.IsEnabled=(FCKConfig.SpellChecker=='SpellerPages');};FCKSpellCheckCommand.prototype.Execute=function(){FCKDialog.OpenDialog('FCKDialog_SpellCheck','Spell Check','dialog/fck_spellerpages.html',440,480);};FCKSpellCheckCommand.prototype.GetState=function(){return this.IsEnabled?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;}
var FCKTextColorCommand=function(type){this.Name=type=='ForeColor'?'TextColor':'BGColor';this.Type=type;this._Panel=new FCKPanel();this._Panel.StyleSheet=FCKConfig.SkinPath+'fck_contextmenu.css';this._Panel.Create();this._CreatePanelBody(this._Panel.Document,this._Panel.PanelDiv);};FCKTextColorCommand.prototype.Execute=function(panelX,panelY,relElement){FCK._ActiveColorPanelType=this.Type;this._Panel.Show(panelX,panelY,relElement);};FCKTextColorCommand.prototype.SetColor=function(color){if (FCK._ActiveColorPanelType=='ForeColor') FCK.ExecuteNamedCommand('ForeColor',color);else if (FCKBrowserInfo.IsGecko) FCK.ExecuteNamedCommand('hilitecolor',color);else FCK.ExecuteNamedCommand('BackColor',color);delete FCK._ActiveColorPanelType;};FCKTextColorCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};FCKTextColorCommand.prototype._CreatePanelBody=function(targetDocument,targetDiv){function CreateSelectionDiv(){var oDiv=targetDocument.createElement("DIV");oDiv.className='ColorDeselected';oDiv.onmouseover=function() { this.className='ColorSelected';};oDiv.onmouseout=function() { this.className='ColorDeselected';};return oDiv;};var oTable=targetDiv.appendChild(targetDocument.createElement("TABLE"));oTable.style.tableLayout='fixed';oTable.cellPadding=0;oTable.cellSpacing=0;oTable.border=0;oTable.width=150;var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='<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=function(){this.className='ColorDeselected';this.Command.SetColor('');this.Command._Panel.Hide();};var aColors=FCKConfig.FontColors.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=function(){this.className='ColorDeselected';this.Command.SetColor('#'+this.Color);this.Command._Panel.Hide();};};};var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td nowrap align="center">'+FCKLang.ColorMoreColors+'</td></tr></table>';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command._Panel.Hide();FCKDialog.OpenDialog('FCKDialog_Color',FCKLang.DlgColorTitle,'dialog/fck_colorselector.html',400,330,this.Command.SetColor);};}
var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');};
var FCKPasteWordCommand=function(){this.Name='PasteWord';};FCKPasteWordCommand.prototype.Execute=function(){FCK.PasteFromWord();};FCKPasteWordCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');};
var FCKTableCommand=function(command){this.Name=command;};FCKTableCommand.prototype.Execute=function(){switch (this.Name){case 'TableInsertRow':FCKTableHandler.InsertRow();break;case 'TableDeleteRows':FCKTableHandler.DeleteRows();break;case 'TableInsertColumn':FCKTableHandler.InsertColumn();break;case 'TableDeleteColumns':FCKTableHandler.DeleteColumns();break;case 'TableInsertCell':FCKTableHandler.InsertCell();break;case 'TableDeleteCells':FCKTableHandler.DeleteCells();break;case 'TableMergeCells':FCKTableHandler.MergeCells();break;case 'TableSplitCell':FCKTableHandler.SplitCell();break;default:alert(FCKLang.UnknownCommand.replace(/%1/g,this.Name));};};FCKTableCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;}
var FCKStyleCommand=function(){this.Name='Style';this.StylesLoader=new FCKStylesLoader();this.StylesLoader.Load(FCKConfig.StylesXmlPath);this.Styles=this.StylesLoader.Styles;};FCKStyleCommand.prototype.Execute=function(styleName,styleComboItem){if (styleName=="Clear Styles"){if (FCKBrowserInfo.IsIE){var selected=FCKSelection.GetParentElement();RemoveStyles(selected.childNodes);} else FCK.ExecuteNamedCommand('RemoveFormat');return;};if (styleComboItem.Selected) styleComboItem.Style.RemoveFromSelection();else styleComboItem.Style.ApplyToSelection();FCK.Focus();FCK.Events.FireEvent("OnSelectionChange");};function show_props(obj,objName) {var result="";for (var i in obj) {result=objName+"."+i+" = "+obj[i]+" \n";alert(result);};};FCKStyleCommand.prototype.GetState=function(){var oSelection=FCK.EditorDocument.selection;if (FCKSelection.GetType()=='Control'){var e=FCKSelection.GetSelectedElement();if (e) return this.StylesLoader.StyleGroups[e.tagName]?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;else FCK_TRISTATE_OFF;}else return FCK_TRISTATE_OFF;};FCKStyleCommand.prototype.GetActiveStyles=function(){var aActiveStyles=new Array();if (FCKSelection.GetType()=='Control') this._CheckStyle(FCKSelection.GetSelectedElement(),aActiveStyles,false);else this._CheckStyle(FCKSelection.GetParentElement(),aActiveStyles,true);return aActiveStyles;};FCKStyleCommand.prototype._CheckStyle=function(element,targetArray,checkParent){if (!element) return;var style_exist=false;if (element.nodeType==1){var aStyleGroup=this.StylesLoader.StyleGroups[element.tagName];if (aStyleGroup){for (var i=0;i<aStyleGroup.length;i++){if (aStyleGroup[i].IsEqual(element)) {targetArray[targetArray.length]=aStyleGroup[i];};};};};if (checkParent) this._CheckStyle(element.parentNode,targetArray,checkParent);}
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 '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?ImageButton',450,400);break;case 'Document':oCommand=new FCKDialogCommand('Document',FCKLang.DlgDocTitle,'dialog/fck_document.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 '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;};
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;this.DOMDiv.onmouseover=function(){if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED){this.className='TB_Button_On';};};this.DOMDiv.onmouseout=function(){if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED&&this.FCKToolbarButton.State!=FCK_TRISTATE_ON){this.className='TB_Button_Off';};};this.DOMDiv.onclick=function(){if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED) this.FCKToolbarButton.Command.Execute();return false;};var sClass;switch (this.Style){case FCK_TOOLBARITEM_ONLYICON:sClass='TB_ButtonType_Icon';break;case FCK_TOOLBARITEM_ONLYTEXT:sClass='TB_ButtonType_Text';break;case FCK_TOOLBARITEM_ICONTEXT:sClass='';break;};this.DOMDiv.innerHTML='<table title="'+this.Tooltip+'" class="'+sClass+'" cellspacing="0" cellpadding="0" border="0" unselectable="on">'+'<tr>'+'<td class="TB_Icon" unselectable="on"><img src="'+this.IconPath+'" width="21" height="21" unselectable="on"></td>'+'<td class="TB_Text" unselectable="on">'+this.Label+'</td>'+'</tr>'+'</table>';var oCell=parentToolbar.DOMRow.insertCell(-1);oCell.appendChild(this.DOMDiv);this.RefreshState();};FCKToolbarButton.prototype.RefreshState=function(){var eState=this.Command.GetState();if (eState==this.State) return;this.State=eState;switch (this.State){case FCK_TRISTATE_ON:this.DOMDiv.className='TB_Button_On';break;case FCK_TRISTATE_OFF:this.DOMDiv.className='TB_Button_Off';break;default:this.DOMDiv.className='TB_Button_Disabled';break;};};FCKToolbarButton.prototype.Enable=function(){this.RefreshState();};FCKToolbarButton.prototype.Disable=function(){this.State=FCK_TRISTATE_DISABLED;this.DOMDiv.className='TB_Button_Disabled';}
var FCKSpecialCombo=function(caption){this.FieldWidth=80;this.PanelWidth=130;this.PanelMaxHeight=150;this.Label='&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];};FCKSpecialCombo.prototype.AddItem=function(id,html,label){var oDiv=this._ItemsHolderEl.appendChild(this._Panel.Document.createElement('DIV'));oDiv.className=oDiv.originalClass='SC_Item';oDiv.innerHTML=html;oDiv.FCKItemID=id;oDiv.FCKItemLabel=label?label:id;oDiv.FCKSpecialCombo=this;oDiv.Selected=false;oDiv.onmouseover=function(){this.className+=' SC_ItemOver';};oDiv.onmouseout=function(){this.className=this.originalClass;};oDiv.onclick=function(){this.FCKSpecialCombo._Panel.Hide();this.FCKSpecialCombo.SetLabel(this.FCKItemLabel);if (typeof(this.FCKSpecialCombo.OnSelect)=='function') this.FCKSpecialCombo.OnSelect(this.FCKItemID,this);};this.Items[id.toString().toLowerCase()]=oDiv;return oDiv;};FCKSpecialCombo.prototype.SelectItem=function(itemId){itemId=itemId?itemId.toString().toLowerCase():'';var oDiv=this.Items[itemId];if (oDiv){oDiv.className=oDiv.originalClass='SC_ItemSelected';oDiv.Selected=true;};};FCKSpecialCombo.prototype.DeselectAll=function(){for (var i in this.Items){this.Items[i].className=this.Items[i].originalClass='SC_Item';this.Items[i].Selected=false;};};FCKSpecialCombo.prototype.SetLabelById=function(id){FCKDebug.Output(this.Caption+': '+id,'#0000FF');id=id?id.toString().toLowerCase():'';var oDiv=this.Items[id];this.SetLabel(oDiv?oDiv.FCKItemLabel:'');};FCKSpecialCombo.prototype.SetLabel=function(text){this.Label=text.length==0?'&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=function(){if (this.SpecialCombo.Enabled) this.className='SC_Field SC_FieldOver';};oField.onmouseout=function(){this.className='SC_Field';};oField.onclick=function(e){if (e){e.stopPropagation();FCKPanelEventHandlers.OnDocumentClick(e);};if (this.SpecialCombo.Enabled){if (typeof(this.SpecialCombo.OnBeforeClick)=='function') this.SpecialCombo.OnBeforeClick(this.SpecialCombo);if (this.SpecialCombo._ItemsHolderEl.offsetHeight>this.SpecialCombo.PanelMaxHeight) this.SpecialCombo._Panel.PanelDiv.style.height=this.SpecialCombo.PanelMaxHeight+'px';else this.SpecialCombo._Panel.PanelDiv.style.height=this.SpecialCombo._ItemsHolderEl.offsetHeight+'px';this.SpecialCombo._Panel.PanelDiv.style.width=this.SpecialCombo.PanelWidth+'px';if (FCKBrowserInfo.IsGecko) this.SpecialCombo._Panel.PanelDiv.style.overflow='-moz-scrollbars-vertical';this.SpecialCombo._Panel.Show(0,this.offsetHeight,this,null,this.SpecialCombo.PanelMaxHeight,true);};return false;};};
var FCKToolbarSpecialCombo=function(){this.SourceView=false;this.ContextSensitive=true;};FCKToolbarSpecialCombo.prototype.CreateInstance=function(parentToolbar){this._Combo=new FCKSpecialCombo(this.GetLabel());this._Combo.FieldWidth=100;this._Combo.PanelWidth=150;this._Combo.PanelMaxHeight=150;this.CreateItems(this._Combo);this._Combo.Create(parentToolbar.DOMRow.insertCell(-1));this._Combo.Command=this.Command;this._Combo.OnSelect=function(itemId,item){this.Command.Execute(itemId,item);};};FCKToolbarSpecialCombo.prototype.RefreshState=function(){var eState;var sValue=this.Command.GetState();if (sValue!=FCK_TRISTATE_DISABLED){eState=FCK_TRISTATE_ON;if (!this.RefreshActiveItems){this.RefreshActiveItems=function(combo,value){this._Combo.DeselectAll();this._Combo.SelectItem(value);this._Combo.SetLabelById(value);};};this.RefreshActiveItems(this._Combo,sValue);}else eState=FCK_TRISTATE_DISABLED;if (eState==this.State) return;if (eState==FCK_TRISTATE_DISABLED){this._Combo.DeselectAll();if (typeof(FCKConfig.DefaultClass)!='undefined') this._Combo.SetLabel(FCKConfig.DefaultClass);else this._Combo.SetLabel(' ');};this.State=eState;this._Combo.SetEnabled(eState!=FCK_TRISTATE_DISABLED);};FCKToolbarSpecialCombo.prototype.Enable=function(){this.RefreshState();};FCKToolbarSpecialCombo.prototype.Disable=function(){this.State=FCK_TRISTATE_DISABLED;this._Combo.DeselectAll();if (typeof(FCKConfig.DefaultClass)!='undefined') this._Combo.SetLabel(FCKConfig.DefaultClass);else this._Combo.SetLabel(' ');this._Combo.SetEnabled(false);}
var FCKToolbarFontsCombo=function(){this.Command=FCKCommands.GetCommand('FontName');};FCKToolbarFontsCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarFontsCombo.prototype.GetLabel=function(){return FCKLang.Font;};FCKToolbarFontsCombo.prototype.CreateItems=function(targetSpecialCombo){var aFonts=FCKConfig.FontNames.split(';');for (var i=0;i<aFonts.length;i++) this._Combo.AddItem(aFonts[i],'<span style="font-family: \''+aFonts[i]+'\'; font-size: 12px;">'+aFonts[i]+'</span>');}
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]);};}
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]]);};}
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 {if (typeof(FCKConfig.DefaultClass)!='undefined') {targetSpecialCombo.SelectItem();targetSpecialCombo.SetLabel(FCKConfig.DefaultClass);} 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';};}
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.CreateInstance=function(parentToolbar){this.DOMDiv=document.createElement('div');this.DOMDiv.className='TB_Button_Off';this.DOMDiv.FCKToolbarButton=this;this.DOMDiv.onmouseover=function(){if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED){this.className='TB_Button_On';};};this.DOMDiv.onmouseout=function(){if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED&&this.FCKToolbarButton.State!=FCK_TRISTATE_ON){this.className='TB_Button_Off';};};this.DOMDiv.onclick=function(e){if (e){e.stopPropagation();FCKPanelEventHandlers.OnDocumentClick(e);};if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED){this.FCKToolbarButton.Command.Execute(0,this.FCKToolbarButton.DOMDiv.offsetHeight,this.FCKToolbarButton.DOMDiv);};return false;};var sClass;switch (this.Style){case FCK_TOOLBARITEM_ONLYICON:sClass='TB_ButtonType_Icon';break;case FCK_TOOLBARITEM_ONLYTEXT:sClass='TB_ButtonType_Text';break;case FCK_TOOLBARITEM_ICONTEXT:sClass='';break;};this.DOMDiv.innerHTML='<table title="'+this.Tooltip+'" class="'+sClass+'" cellspacing="0" cellpadding="0" border="0" unselectable="on">'+'<tr>'+'<td class="TB_Icon" unselectable="on"><img src="'+FCKConfig.SkinPath+'toolbar/'+this.Command.Name.toLowerCase()+'.gif" width="21" height="21" unselectable="on"></td>'+'<td class="TB_Text" unselectable="on">'+this.Label+'</td>'+'<td class="TB_ButtonArrow" unselectable="on"><img src="'+FCKConfig.SkinPath+'images/toolbar.buttonarrow.gif" width="5" height="3"></td>'+'</tr>'+'</table>';var oCell=parentToolbar.DOMRow.insertCell(-1);oCell.appendChild(this.DOMDiv);this.RefreshState();};FCKToolbarPanelButton.prototype.RefreshState=FCKToolbarButton.prototype.RefreshState;FCKToolbarPanelButton.prototype.Enable=FCKToolbarButton.prototype.Enable;FCKToolbarPanelButton.prototype.Disable=FCKToolbarButton.prototype.Disable;
var FCKToolbarItems=new Object();FCKToolbarItems.LoadedItems=new Object();FCKToolbarItems.RegisterItem=function(itemName,item){this.LoadedItems[itemName]=item;};FCKToolbarItems.GetItem=function(itemName){var oItem=FCKToolbarItems.LoadedItems[itemName];if (oItem) return oItem;switch (itemName){case 'Source':oItem=new FCKToolbarButton('Source',FCKLang.Source,null,FCK_TOOLBARITEM_ICONTEXT,true,true);break;case 'DocProps':oItem=new FCKToolbarButton('DocProps',FCKLang.DocProps);break;case 'Save':oItem=new FCKToolbarButton('Save',FCKLang.Save,null,null,true);break;case 'NewPage':oItem=new FCKToolbarButton('NewPage',FCKLang.NewPage,null,null,true);break;case 'Preview':oItem=new FCKToolbarButton('Preview',FCKLang.Preview,null,null,true);break;case 'About':oItem=new FCKToolbarButton('About',FCKLang.About,null,null,true);break;case 'Cut':oItem=new FCKToolbarButton('Cut',FCKLang.Cut,null,null,false,true);break;case 'Copy':oItem=new FCKToolbarButton('Copy',FCKLang.Copy,null,null,false,true);break;case 'Paste':oItem=new FCKToolbarButton('Paste',FCKLang.Paste,null,null,false,true);break;case 'PasteText':oItem=new FCKToolbarButton('PasteText',FCKLang.PasteText,null,null,false,true);break;case 'PasteWord':oItem=new FCKToolbarButton('PasteWord',FCKLang.PasteWord,null,null,false,true);break;case 'Print':oItem=new FCKToolbarButton('Print',FCKLang.Print,null,null,false,true);break;case 'SpellCheck':oItem=new FCKToolbarButton('SpellCheck',FCKLang.SpellCheck,null,null,false,true);break;case 'Undo':oItem=new FCKToolbarButton('Undo',FCKLang.Undo,null,null,false,true);break;case 'Redo':oItem=new FCKToolbarButton('Redo',FCKLang.Redo,null,null,false,true);break;case 'SelectAll':oItem=new FCKToolbarButton('SelectAll',FCKLang.SelectAll);break;case 'RemoveFormat':oItem=new FCKToolbarButton('RemoveFormat',FCKLang.RemoveFormat,null,null,false,true);break;case 'Bold':oItem=new FCKToolbarButton('Bold',FCKLang.Bold,null,null,false,true);break;case 'Italic':oItem=new FCKToolbarButton('Italic',FCKLang.Italic,null,null,false,true);break;case 'Underline':oItem=new FCKToolbarButton('Underline',FCKLang.Underline,null,null,false,true);break;case 'StrikeThrough':oItem=new FCKToolbarButton('StrikeThrough',FCKLang.StrikeThrough,null,null,false,true);break;case 'Subscript':oItem=new FCKToolbarButton('Subscript',FCKLang.Subscript,null,null,false,true);break;case 'Superscript':oItem=new FCKToolbarButton('Superscript',FCKLang.Superscript,null,null,false,true);break;case 'OrderedList':oItem=new FCKToolbarButton('InsertOrderedList',FCKLang.NumberedListLbl,FCKLang.NumberedList,null,false,true);break;case 'UnorderedList':oItem=new FCKToolbarButton('InsertUnorderedList',FCKLang.BulletedListLbl,FCKLang.BulletedList,null,false,true);break;case 'Outdent':oItem=new FCKToolbarButton('Outdent',FCKLang.DecreaseIndent,null,null,false,true);break;case 'Indent':oItem=new FCKToolbarButton('Indent',FCKLang.IncreaseIndent,null,null,false,true);break;case 'Link':oItem=new FCKToolbarButton('Link',FCKLang.InsertLinkLbl,FCKLang.InsertLink,null,false,true);break;case 'Unlink':oItem=new FCKToolbarButton('Unlink',FCKLang.RemoveLink,null,null,false,true);break;case 'Anchor':oItem=new FCKToolbarButton('Anchor',FCKLang.Anchor);break;case 'Image':oItem=new FCKToolbarButton('Image',FCKLang.InsertImageLbl,FCKLang.InsertImage);break;case 'Document':oItem=new FCKToolbarButton('Document',FCKLang.InsertDocumentLbl,FCKLang.InsertDocument);break;case 'Table':oItem=new FCKToolbarButton('Table',FCKLang.InsertTableLbl,FCKLang.InsertTable);break;case 'SpecialChar':oItem=new FCKToolbarButton('SpecialChar',FCKLang.InsertSpecialCharLbl,FCKLang.InsertSpecialChar);break;case 'Smiley':oItem=new FCKToolbarButton('Smiley',FCKLang.InsertSmileyLbl,FCKLang.InsertSmiley);break;case 'UniversalKey':oItem=new FCKToolbarButton('UniversalKey',FCKLang.UniversalKeyboard);break;case 'Rule':oItem=new FCKToolbarButton('InsertHorizontalRule',FCKLang.InsertLineLbl,FCKLang.InsertLine);break;case 'JustifyLeft':oItem=new FCKToolbarButton('JustifyLeft',FCKLang.LeftJustify,null,null,false,true);break;case 'JustifyCenter':oItem=new FCKToolbarButton('JustifyCenter',FCKLang.CenterJustify,null,null,false,true);break;case 'JustifyRight':oItem=new FCKToolbarButton('JustifyRight',FCKLang.RightJustify,null,null,false,true);break;case 'JustifyFull':oItem=new FCKToolbarButton('JustifyFull',FCKLang.BlockJustify,null,null,false,true);break;case 'Style':oItem=new FCKToolbarStyleCombo();break;case 'FontName':oItem=new FCKToolbarFontsCombo();break;case 'FontSize':oItem=new FCKToolbarFontSizeCombo();break;case 'FontFormat':oItem=new FCKToolbarFontFormatCombo();break;case 'TextColor':oItem=new FCKToolbarPanelButton('TextColor',FCKLang.TextColor);break;case 'BGColor':oItem=new FCKToolbarPanelButton('BGColor',FCKLang.BGColor);break;case 'Find':oItem=new FCKToolbarButton('Find',FCKLang.Find);break;case 'Replace':oItem=new FCKToolbarButton('Replace',FCKLang.Replace);break;case 'Form':oItem=new FCKToolbarButton('Form',FCKLang.Form);break;case 'Checkbox':oItem=new FCKToolbarButton('Checkbox',FCKLang.Checkbox);break;case 'Radio':oItem=new FCKToolbarButton('Radio',FCKLang.RadioButton);break;case 'TextField':oItem=new FCKToolbarButton('TextField',FCKLang.TextField);break;case 'Textarea':oItem=new FCKToolbarButton('Textarea',FCKLang.Textarea);break;case 'HiddenField':oItem=new FCKToolbarButton('HiddenField',FCKLang.HiddenField);break;case 'Button':oItem=new FCKToolbarButton('Button',FCKLang.Button);break;case 'Select':oItem=new FCKToolbarButton('Select',FCKLang.SelectionField);break;case 'ImageButton':oItem=new FCKToolbarButton('ImageButton',FCKLang.ImageButton);break;default:alert(FCKLang.UnknownToolbarItem.replace(/%1/g,itemName));return;};FCKToolbarItems.LoadedItems[itemName]=oItem;return oItem;}
var FCKToolbar=function(width_){this.Items=new Array();this.DOMTable=document.createElement('table');this.DOMTable.className='TB_Toolbar';with (this.DOMTable){style.styleFloat=style.cssFloat=FCKLang.Dir=='rtl'?'right':'left';cellPadding=0;cellSpacing=0;border=0;if (width_&&width_>0) {width=width_+'%';};};this.DOMRow=this.DOMTable.insertRow(-1);var oCell=this.DOMRow.insertCell(-1);oCell.className='TB_Start';oCell.innerHTML='<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.AddEmpty=function(){var oCell=this.DOMRow.insertCell(-1);oCell.unselectable='on';oCell.width='50%';oCell.innerHTML='<img src="'+FCKConfig.SkinPath+'images/s.gif" width="1" height="1" unselectable="on">';};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">';};FCKToolbar.prototype.AddBigSeparator=function(){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">';};
var FCKToolbarBreak=function(){var oBreakDiv=document.createElement('div');oBreakDiv.style.clear=oBreakDiv.style.cssFloat=FCKLang.Dir=='rtl'?'right':'left';FCKToolbarSet.DOMElement.appendChild(oBreakDiv);}
var FCKToolbarSet=FCK.ToolbarSet=new Object();document.getElementById('ExpandHandle').title=FCKLang.ToolbarExpand;document.getElementById('CollapseHandle').title=FCKLang.ToolbarCollapse;FCKToolbarSet.Toolbars=new Array();FCKToolbarSet.ItemsWysiwygOnly=new Array();FCKToolbarSet.ItemsContextSensitive=new Array();FCKToolbarSet.Expand=function(){document.getElementById('Collapsed').style.display='none';document.getElementById('Expanded').style.display='';if (!FCKBrowserInfo.IsIE){window.setTimeout("window.onresize()",1);};};FCKToolbarSet.Collapse=function(){document.getElementById('Collapsed').style.display='';document.getElementById('Expanded').style.display='none';if (!FCKBrowserInfo.IsIE){window.setTimeout("window.onresize()",1);};};FCKToolbarSet.Restart=function(){if (!FCKConfig.ToolbarCanCollapse||FCKConfig.ToolbarStartExpanded) this.Expand();else this.Collapse();document.getElementById('CollapseHandle').style.display=FCKConfig.ToolbarCanCollapse?'':'none';};FCKToolbarSet.Load=function(toolbarSetName){this.DOMElement=document.getElementById('eToolbar');var ToolbarSet=FCKConfig.ToolbarSets[toolbarSetName];if (!ToolbarSet){alert(FCKLang.UnknownToolbarSet.replace(/%1/g,toolbarSetName));return;};this.Toolbars=new Array();for (var x=0;x<ToolbarSet.length;x++){var oToolbarItems=ToolbarSet[x];var oToolbar;if (typeof(oToolbarItems)=='string'){if (oToolbarItems=='/') oToolbar=new FCKToolbarBreak();}else{var width=0;var oToolbar=new FCKToolbar(width);for (var j=0;j<oToolbarItems.length;j++){var sItem=oToolbarItems[j];if (sItem=='-') oToolbar.AddSeparator();else if (sItem=='100%') oToolbar.AddEmpty();else if (sItem=='|') oToolbar.AddBigSeparator();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();};
var FCKDialog=new Object();FCKDialog.OpenDialog=function(dialogName,dialogTitle,dialogPage,width,height,customValue,parentWindow){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);};
FCKDialog.Show=function(dialogInfo,dialogName,pageUrl,dialogWidth,dialogHeight,parentWindow){var iTop=(screen.height-dialogHeight) / 2;var iLeft=(screen.width - dialogWidth) / 2;var sOption="location=no,menubar=no,resizable=no,toolbar=no,dependent=yes,dialog=yes,minimizable=no,modal=yes,alwaysRaised=yes"+",width="+dialogWidth+",height="+dialogHeight+",top="+iTop+",left="+iLeft;if (!parentWindow) parentWindow=window;var oWindow=parentWindow.open('','FCKEditorDialog_'+dialogName,sOption,true);oWindow.moveTo(iLeft,iTop);oWindow.resizeTo(dialogWidth,dialogHeight);oWindow.focus();oWindow.location.href=pageUrl;oWindow.dialogArguments=dialogInfo;parentWindow.FCKLastDialogInfo=dialogInfo;this.Window=oWindow;try{window.top.captureEvents(Event.CLICK|Event.MOUSEDOWN|Event.MOUSEUP|Event.FOCUS);window.top.parent.addEventListener('mousedown',this.CheckFocus,true);window.top.parent.addEventListener('mouseup',this.CheckFocus,true);window.top.parent.addEventListener('click',this.CheckFocus,true);window.top.parent.addEventListener('focus',this.CheckFocus,true);}catch (e){};};FCKDialog.CheckFocus=function(){if (typeof(FCKDialog)!="object") return;if (FCKDialog.Window&&!FCKDialog.Window.closed){FCKDialog.Window.focus();return false;}else{try{window.top.releaseEvents(Event.CLICK|Event.MOUSEDOWN|Event.MOUSEUP|Event.FOCUS);window.top.parent.removeEventListener('onmousedown',FCKDialog.CheckFocus,true);window.top.parent.removeEventListener('mouseup',FCKDialog.CheckFocus,true);window.top.parent.removeEventListener('click',FCKDialog.CheckFocus,true);window.top.parent.removeEventListener('onfocus',FCKDialog.CheckFocus,true);}catch (e){};};};
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;};FCKContextMenuItem.prototype.CreateTableRow=function(targetTable){this._Row=targetTable.insertRow(-1);this._Row.className='CM_Disabled';this._Row.FCKContextMenuItem=this;this._Row.onmouseover=function(){if (this.className!='CM_Disabled') this.className='CM_Over';};this._Row.onmouseout=function(){if (this.className!='CM_Disabled') this.className='CM_Option';};this._Row.onclick=function(){if (this.className!='CM_Disabled'){this.FCKContextMenuItem.ContextMenu.Hide();this.FCKContextMenuItem.Command.Execute();};return false;};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;};};
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(){};
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();};}
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 'Document':oGroup=new FCKContextMenuGroup();with (oGroup){Add(new FCKContextMenuSeparator());Add(new FCKContextMenuItem(this,'Document',FCKLang.EditDocument,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 '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;};function DocumentState(){oDocument=FCK.Selection.MoveToAncestorNode('A');if (oDocument) {FCK.Selection.MoveToNode(oDocument);if (oDocument.getAttribute('label',2)=='Doc') return true;else return false;};};function LinkState(){oLink=FCK.Selection.MoveToAncestorNode('A');if (oLink) return true;else return false;};FCKContextMenu.RefreshState=function(){var oTag=FCKSelection.GetSelectedElement();var sTagName;if (oTag){sTagName=oTag.tagName;};var bIsAnchor=(sTagName=='A'&&oTag.name.length>0&&oTag.href.length==0);if (this.Groups['Anchor']) this.Groups['Anchor'].SetVisible(bIsAnchor);if (this.Groups['Link']) this.Groups['Link'].SetVisible(!bIsAnchor&&LinkState()==true);if (this.Groups['TableCell']) this.Groups['TableCell'].SetVisible(sTagName!='TABLE'&&FCKSelection.HasAncestorNode('TABLE'));if (this.Groups['Table']) this.Groups['Table'].SetVisible(sTagName=='TABLE');if (this.Groups['Image']) this.Groups['Image'].SetVisible(sTagName=='IMG');if (this.Groups['Document']) this.Groups['Document'].SetVisible(true&&LinkState()==true);if (this.Groups['BulletedList']) this.Groups['BulletedList'].SetVisible(FCKSelection.HasAncestorNode('UL'));if (this.Groups['NumberedList']) this.Groups['NumberedList'].SetVisible(FCKSelection.HasAncestorNode('OL'));if (this.Groups['Select']) this.Groups['Select'].SetVisible(sTagName=='SELECT');if (this.Groups['Textarea']) this.Groups['Textarea'].SetVisible(sTagName=='TEXTAREA');if (this.Groups['Form']) this.Groups['Form'].SetVisible(FCKSelection.HasAncestorNode('FORM'));if (this.Groups['Checkbox']) this.Groups['Checkbox'].SetVisible(sTagName=='INPUT'&&oTag.type=='checkbox');if (this.Groups['Radio']) this.Groups['Radio'].SetVisible(sTagName=='INPUT'&&oTag.type=='radio');if (this.Groups['TextField']) this.Groups['TextField'].SetVisible(sTagName=='INPUT'&&(oTag.type=='text'||oTag.type=='password'));if (this.Groups['HiddenField']) this.Groups['HiddenField'].SetVisible(sTagName=='INPUT'&&oTag.type=='hidden');if (this.Groups['ImageButton']) this.Groups['ImageButton'].SetVisible(sTagName=='INPUT'&&oTag.type=='image');if (this.Groups['Button']) this.Groups['Button'].SetVisible(sTagName=='INPUT'&&(oTag.type=='button'||oTag.type=='submit'||oTag.type=='reset'));for (var o in this.Groups){this.Groups[o].RefreshState();};};
FCKTools.AppendStyleSheet(window.parent.document,FCKConfig.SkinPath+'fck_contextmenu.css');FCKContextMenu.Show=function(x,y){if (!this._Document){this._Document=window.parent.document;};if (!this._IsLoaded){this.Reload();this._Div.style.zIndex=10000;this._Div.oncontextmenu=function() { return false;};};this.RefreshState();var oCoordsA=FCKTools.GetElementPosition(FCK.EditorWindow.frameElement);var oCoordsB=FCKTools.GetElementPosition(window.frameElement);x+=oCoordsA.X+oCoordsB.X;y+=oCoordsA.Y+oCoordsB.Y;var iXSpace=x+this._Div.offsetWidth-this._Div.ownerDocument.defaultView.innerWidth;var iYSpace=y+this._Div.offsetHeight-this._Div.ownerDocument.defaultView.innerHeight;if (iXSpace>0) x-=this._Div.offsetWidth;if (iYSpace>0) y-=this._Div.offsetHeight;this._Div.style.left=x+'px';this._Div.style.top=y+'px';var oActualWindow=FCK.EditorWindow;while (oActualWindow){oActualWindow.document.addEventListener('click',FCKContextMenu._OnDocumentClick,false);if (oActualWindow!=oActualWindow.parent) oActualWindow=oActualWindow.parent;else if (oActualWindow.opener==null) oActualWindow=oActualWindow.opener;else break;};this._Div.style.visibility='';};FCKContextMenu._OnDocumentClick=function(event){var e=event.target;while (e){if (e==FCKContextMenu._Div) return;e=e.parentNode;};FCKContextMenu.Hide();};FCKContextMenu.Hide=function(){this._Div.style.visibility='hidden';this._Div.style.left=this._Div.style.top='1px';}
if (!FCKConfig.PluginsPath.endsWith('/')) FCKConfig.PluginsPath+='/';var FCKPlugin=function(name,availableLangs,basePath){this.Name=name;this.BasePath=basePath?basePath:FCKConfig.PluginsPath;this.Path=this.BasePath+name+'/';if (!availableLangs||availableLangs.length==0) this.AvailableLangs=new Array();else this.AvailableLangs=availableLangs.split(',');};FCKPlugin.prototype.Load=function(){if (this.AvailableLangs.length>0){if (this.AvailableLangs.indexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) var sLang=FCKLanguageManager.ActiveLanguage.Code;else var sLang=this.AvailableLangs[0];FCKScriptLoader.AddScript(this.Path+'lang/'+sLang+'.js');};FCKScriptLoader.AddScript(this.Path+'fckplugin.js');}
var FCKPlugins=FCK.Plugins=new Object();FCKPlugins.ItemsCount=0;FCKPlugins.Loaded=false;FCKPlugins.Items=new Object();for (var i=0;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;}
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);}
Property changes on: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_gecko_2.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.11
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_1.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_1.js (revision 1998)
+++ trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_1.js (revision 1999)
@@ -1,25 +1,25 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* This file has been compacted for best loading performance.
*/
var FCKDebug=new Object();if (FCKConfig.Debug){FCKDebug.Output=function(message,color){if (!FCKConfig.Debug) return;if (message!=null&&isNaN(message)) message=message.replace(/</g,"&lt;");if (!this.DebugWindow||this.DebugWindow.closed) this.DebugWindow=window.open('fckdebug.html','FCKeditorDebug','menubar=no,scrollbars=no,resizable=yes,location=no,toolbar=no,width=600,height=500',true);if (this.DebugWindow.Output) this.DebugWindow.Output(message,color);};}else FCKDebug.Output=function() {};
var FCKTools=new Object();FCKTools.GetLinkedFieldValue=function(){return FCK.LinkedField.value;};FCKTools.SetLinkedFieldValue=function(value){if (FCKConfig.FormatOutput) FCK.LinkedField.value=FCKCodeFormatter.Format(value);else FCK.LinkedField.value=value;};FCKTools.AttachToLinkedFieldFormSubmit=function(functionPointer){var oForm=FCK.LinkedField.form;if (!oForm) return;if (FCKBrowserInfo.IsIE) oForm.attachEvent("onsubmit",functionPointer);else oForm.addEventListener('submit',functionPointer,true);if (!oForm.updateFCKEditor) oForm.updateFCKEditor=new Array();oForm.updateFCKEditor[oForm.updateFCKEditor.length]=functionPointer;if (!oForm.originalSubmit&&(typeof(oForm.submit)=='function'||(!oForm.submit.tagName&&!oForm.submit.length))){oForm.originalSubmit=oForm.submit;oForm.submit=function(){if (this.updateFCKEditor){for (var i=0;i<this.updateFCKEditor.length;i++) this.updateFCKEditor[i]();};this.originalSubmit();};};};FCKTools.AddSelectOption=function(targetDocument,selectElement,optionText,optionValue){var oOption=targetDocument.createElement("OPTION");oOption.text=optionText;oOption.value=optionValue;selectElement.options.add(oOption);return oOption;};FCKTools.RemoveAllSelectOptions=function(selectElement){for (var i=selectElement.options.length-1;i>=0;i--){selectElement.options.remove(i);};};FCKTools.SelectNoCase=function(selectElement,value,defaultValue){var sNoCaseValue=value.toString().toLowerCase();for (var i=0;i<selectElement.options.length;i++){if (sNoCaseValue==selectElement.options[i].value.toLowerCase()){selectElement.selectedIndex=i;return;};};if (defaultValue!=null) FCKTools.SelectNoCase(selectElement,defaultValue);};FCKTools.HTMLEncode=function(text){text=text.replace(/"/g,"&quot;");text=text.replace(/</g,"&lt;");text=text.replace(/>/g,"&gt;");text=text.replace(/'/g,"&#39;");return text;};FCKTools.GetResultingArray=function(arraySource,separator){switch (typeof(arraySource)){case "string":return arraySource.split(separator);case "function":return separator();default:if (isArray(arraySource)) return arraySource;else return new Array();};};FCKTools.GetElementPosition=function(el){var c={ X:0,Y:0 };while (el){c.X+=el.offsetLeft;c.Y+=el.offsetTop;el=el.offsetParent;};return c;};FCKTools.GetElementAscensor=function(element,ascensorTagName){var e=element.parentNode;while (e){if (e.nodeName==ascensorTagName) return e;e=e.parentNode;};};FCKTools.Pause=function(miliseconds){var oStart=new Date();while (true){var oNow=new Date();if (miliseconds<oNow-oStart) return;};};
FCKTools.AppendStyleSheet=function(documentElement,cssFileUrl){return documentElement.createStyleSheet(cssFileUrl);};FCKTools.ClearElementAttributes=function(element){element.clearAttributes();};FCKTools.GetAllChildrenIds=function(parentElement){var aIds=new Array();for (var i=0;i<parentElement.all.length;i++){var sId=parentElement.all[i].id;if (sId&&sId.length>0) aIds[aIds.length]=sId;};return aIds;};FCKTools.RemoveOuterTags=function(e){e.insertAdjacentHTML('beforeBegin',e.innerHTML);e.parentNode.removeChild(e);};FCKTools.CreateXmlObject=function(object){var aObjs;switch (object){case 'XmlHttp':aObjs=['MSXML2.XmlHttp','Microsoft.XmlHttp'];break;case 'DOMDocument':aObjs=['MSXML2.DOMDocument','Microsoft.XmlDom'];break;};for (var i=0;i<2;i++){try { return new ActiveXObject(aObjs[i]);}catch (e) {};};}
var FCKRegexLib=new Object();FCKRegexLib.AposEntity=/&apos;/gi;FCKRegexLib.ObjectElements=/^(?:IMG|TABLE|TR|TD|INPUT|SELECT|TEXTAREA|HR|OBJECT)$/i;FCKRegexLib.BlockElements=/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI)$/i;FCKRegexLib.EmptyElements=/^(?:BASE|META|LINK|HR|BR|PARAM|IMG|AREA|INPUT)$/i;FCKRegexLib.NamedCommands=/^(?:Cut|Copy|Paste|Print|SelectAll|RemoveFormat|Unlink|Undo|Redo|Bold|Italic|Underline|StrikeThrough|Subscript|Superscript|JustifyLeft|JustifyCenter|JustifyRight|JustifyFull|Outdent|Indent|InsertOrderedList|InsertUnorderedList|InsertHorizontalRule)$/i;FCKRegexLib.BodyContents=/([\s\S]*\<body[^\>]*\>)([\s\S]*)(\<\/body\>[\s\S]*)/i;FCKRegexLib.ToReplace=/___fcktoreplace:([\w]+)/ig;FCKRegexLib.MetaHttpEquiv=/http-equiv\s*=\s*["']?([^"' ]+)/i;FCKRegexLib.HasBaseTag=/<base /i;FCKRegexLib.HeadCloser=/<\/head\s*>/i;FCKRegexLib.TableBorderClass=/\s*FCK__ShowTableBorders\s*/;
FCKLanguageManager.GetActiveLanguage=function(){if (FCKConfig.AutoDetectLanguage){var sUserLang;if (navigator.userLanguage) sUserLang=navigator.userLanguage.toLowerCase();else if (navigator.language) sUserLang=navigator.language.toLowerCase();else{return FCKConfig.DefaultLanguage;};FCKDebug.Output('Navigator Language = '+sUserLang);if (sUserLang.length>=5){sUserLang=sUserLang.substr(0,5);if (this.AvailableLanguages[sUserLang]) return sUserLang;};if (sUserLang.length>=2){sUserLang=sUserLang.substr(0,2);if (this.AvailableLanguages[sUserLang]) return sUserLang;};};return this.DefaultLanguage;};FCKLanguageManager.TranslateElements=function(targetDocument,tag,propertyToSet){var aInputs=targetDocument.getElementsByTagName(tag);for (var i=0;i<aInputs.length;i++){var sKey=aInputs[i].getAttribute('fckLang');if (sKey){var s=FCKLang[sKey];if (s) eval('aInputs[i].'+propertyToSet+' = s');};};};FCKLanguageManager.TranslatePage=function(targetDocument){this.TranslateElements(targetDocument,'INPUT','value');this.TranslateElements(targetDocument,'SPAN','innerHTML');this.TranslateElements(targetDocument,'LABEL','innerHTML');this.TranslateElements(targetDocument,'OPTION','innerHTML');};if (FCKLanguageManager.AvailableLanguages[FCKConfig.DefaultLanguage]) FCKLanguageManager.DefaultLanguage=FCKConfig.DefaultLanguage;else FCKLanguageManager.DefaultLanguage='en';FCKLanguageManager.ActiveLanguage=new Object();FCKLanguageManager.ActiveLanguage.Code=FCKLanguageManager.GetActiveLanguage();FCKLanguageManager.ActiveLanguage.Name=FCKLanguageManager.AvailableLanguages[FCKLanguageManager.ActiveLanguage.Code];FCK.Language=FCKLanguageManager;LoadLanguageFile();
var FCKEvents=function(eventsOwner){this.Owner=eventsOwner;this.RegisteredEvents=new Object();};FCKEvents.prototype.AttachEvent=function(eventName,functionPointer){if (!this.RegisteredEvents[eventName]) this.RegisteredEvents[eventName]=new Array();this.RegisteredEvents[eventName][this.RegisteredEvents[eventName].length]=functionPointer;};FCKEvents.prototype.FireEvent=function(eventName,params){var bReturnValue=true;var oCalls=this.RegisteredEvents[eventName];if (oCalls){for (var i=0;i<oCalls.length;i++) bReturnValue=(oCalls[i](params)&&bReturnValue);};return bReturnValue;}
FCKXHtmlEntities=new Object();FCKXHtmlEntities.Entities={' ':'nbsp','¡':'iexcl','¢':'cent','£':'pound','¤':'curren','¥':'yen','¦':'brvbar','§':'sect','¨':'uml','©':'copy','ª':'ordf','«':'laquo','¬':'not','­':'shy','®':'reg','¯':'macr','°':'deg','±':'plusmn','²':'sup2','³':'sup3','´':'acute','µ':'micro','¶':'para','·':'middot','¸':'cedil','¹':'sup1','º':'ordm','»':'raquo','¼':'frac14','½':'frac12','¾':'frac34','¿':'iquest','À':'Agrave','Á':'Aacute','Â':'Acirc','Ã':'Atilde','Ä':'Auml','Å':'Aring','Æ':'AElig','Ç':'Ccedil','È':'Egrave','É':'Eacute','Ê':'Ecirc','Ë':'Euml','Ì':'Igrave','Í':'Iacute','Î':'Icirc','Ï':'Iuml','Ð':'ETH','Ñ':'Ntilde','Ò':'Ograve','Ó':'Oacute','Ô':'Ocirc','Õ':'Otilde','Ö':'Ouml','×':'times','Ø':'Oslash','Ù':'Ugrave','Ú':'Uacute','Û':'Ucirc','Ü':'Uuml','Ý':'Yacute','Þ':'THORN','ß':'szlig','à':'agrave','á':'aacute','â':'acirc','ã':'atilde','ä':'auml','å':'aring','æ':'aelig','ç':'ccedil','è':'egrave','é':'eacute','ê':'ecirc','ë':'euml','ì':'igrave','í':'iacute','î':'icirc','ï':'iuml','ð':'eth','ñ':'ntilde','ò':'ograve','ó':'oacute','ô':'ocirc','õ':'otilde','ö':'ouml','÷':'divide','ø':'oslash','ù':'ugrave','ú':'uacute','û':'ucirc','ü':'uuml','ý':'yacute','þ':'thorn','ÿ':'yuml','ƒ':'fnof','Α':'Alpha','Β':'Beta','Γ':'Gamma','Δ':'Delta','Ε':'Epsilon','Ζ':'Zeta','Η':'Eta','Θ':'Theta','Ι':'Iota','Κ':'Kappa','Λ':'Lambda','Μ':'Mu','Ν':'Nu','Ξ':'Xi','Ο':'Omicron','Π':'Pi','Ρ':'Rho','Σ':'Sigma','Τ':'Tau','Υ':'Upsilon','Φ':'Phi','Χ':'Chi','Ψ':'Psi','Ω':'Omega','α':'alpha','β':'beta','γ':'gamma','δ':'delta','ε':'epsilon','ζ':'zeta','η':'eta','θ':'theta','ι':'iota','κ':'kappa','λ':'lambda','μ':'mu','ν':'nu','ξ':'xi','ο':'omicron','π':'pi','ρ':'rho','ς':'sigmaf','σ':'sigma','τ':'tau','υ':'upsilon','φ':'phi','χ':'chi','ψ':'psi','ω':'omega','ϑ':'thetasym','ϒ':'upsih','ϖ':'piv','•':'bull','…':'hellip','′':'prime','″':'Prime','‾':'oline','⁄':'frasl','℘':'weierp','ℑ':'image','ℜ':'real','™':'trade','ℵ':'alefsym','←':'larr','↑':'uarr','→':'rarr','↓':'darr','↔':'harr','↵':'crarr','⇐':'lArr','⇑':'uArr','⇒':'rArr','⇓':'dArr','⇔':'hArr','∀':'forall','∂':'part','∃':'exist','∅':'empty','∇':'nabla','∈':'isin','∉':'notin','∋':'ni','∏':'prod','∑':'sum','−':'minus','∗':'lowast','√':'radic','∝':'prop','∞':'infin','∠':'ang','∧':'and','∨':'or','∩':'cap','∪':'cup','∫':'int','∴':'there4','∼':'sim','≅':'cong','≈':'asymp','≠':'ne','≡':'equiv','≤':'le','≥':'ge','⊂':'sub','⊃':'sup','⊄':'nsub','⊆':'sube','⊇':'supe','⊕':'oplus','⊗':'otimes','⊥':'perp','⋅':'sdot','⌈':'lceil','⌉':'rceil','⌊':'lfloor','⌋':'rfloor','〈':'lang','〉':'rang','◊':'loz','♠':'spades','♣':'clubs','♥':'hearts','♦':'diams','"':'quot','Œ':'OElig','œ':'oelig','Š':'Scaron','š':'scaron','Ÿ':'Yuml','ˆ':'circ','˜':'tilde',' ':'ensp',' ':'emsp',' ':'thinsp','‌':'zwnj','‍':'zwj','‎':'lrm','‏':'rlm','–':'ndash','—':'mdash','‘':'lsquo','’':'rsquo','‚':'sbquo','“':'ldquo','”':'rdquo','„':'bdquo','†':'dagger','‡':'Dagger','‰':'permil','‹':'lsaquo','›':'rsaquo','€':'euro'};FCKXHtmlEntities.Chars='';for (var e in FCKXHtmlEntities.Entities) FCKXHtmlEntities.Chars+=e;FCKXHtmlEntities.EntitiesRegex=new RegExp('','');FCKXHtmlEntities.EntitiesRegex.compile('['+FCKXHtmlEntities.Chars+']|[^'+FCKXHtmlEntities.Chars+']+','g');FCKXHtmlEntities.GeckoEntitiesMarkerRegex=/#\?-\:/g;
var FCKXHtml=new Object();FCKXHtml.CurrentJobNum=0;FCKXHtml.GetXHTML=function(node,includeNode,format){FCKXHtml.SpecialBlocks=new Array();this.XML=FCKTools.CreateXmlObject('DOMDocument');this.MainNode=this.XML.appendChild(this.XML.createElement('xhtml'));FCKXHtml.CurrentJobNum++;if (includeNode) this._AppendNode(this.MainNode,node);else this._AppendChildNodes(this.MainNode,node,false);var sXHTML=this._GetMainXmlString();sXHTML=sXHTML.substr(7,sXHTML.length-15).trim();if (FCKConfig.ForceSimpleAmpersand) sXHTML=sXHTML.replace(/___FCKAmp___/g,'&');if (format) sXHTML=FCKCodeFormatter.Format(sXHTML);for (var i=0;i<FCKXHtml.SpecialBlocks.length;i++){var oRegex=new RegExp('___FCKsi___'+i);sXHTML=sXHTML.replace(oRegex,FCKXHtml.SpecialBlocks[i]);};this.XML=null;return sXHTML};FCKXHtml._AppendAttribute=function(xmlNode,attributeName,attributeValue){try{var oXmlAtt=this.XML.createAttribute(attributeName);oXmlAtt.value=attributeValue?attributeValue:'';xmlNode.attributes.setNamedItem(oXmlAtt);}catch (e){};};FCKXHtml._AppendChildNodes=function(xmlNode,htmlNode,isBlockElement){if (htmlNode.hasChildNodes()){var oChildren=htmlNode.childNodes;for (var i=0;i<oChildren.length;i++) this._AppendNode(xmlNode,oChildren[i]);}else{if (isBlockElement&&FCKConfig.FillEmptyBlocks){this._AppendEntity(xmlNode,'nbsp');return;};if (!FCKRegexLib.EmptyElements.test(htmlNode.nodeName)) xmlNode.appendChild(this.XML.createTextNode(''));};};FCKXHtml._AppendNode=function(xmlNode,htmlNode){switch (htmlNode.nodeType){case 1:if (FCKBrowserInfo.IsGecko&&htmlNode.hasAttribute('_moz_editor_bogus_node')) return;var sNodeName=htmlNode.nodeName.toLowerCase();if (FCKBrowserInfo.IsGecko&&sNodeName=='br'&&htmlNode.hasAttribute('type')&&htmlNode.getAttribute('type',2)=='_moz') return;if (htmlNode._fckxhtmljob==FCKXHtml.CurrentJobNum) return;else htmlNode._fckxhtmljob=FCKXHtml.CurrentJobNum;if (sNodeName.length==0||sNodeName.substr(0,1)=='/') break;var oNode=this.XML.createElement(sNodeName);FCKXHtml._AppendAttributes(xmlNode,htmlNode,oNode,sNodeName);var oTagProcessor=FCKXHtml.TagProcessors[sNodeName];if (oTagProcessor){oNode=oTagProcessor(oNode,htmlNode);if (!oNode) break;}else this._AppendChildNodes(oNode,htmlNode,FCKRegexLib.BlockElements.test(sNodeName));xmlNode.appendChild(oNode);break;case 3:var asPieces=htmlNode.nodeValue.replaceNewLineChars(' ').match(FCKXHtmlEntities.EntitiesRegex);if (asPieces){for (var i=0;i<asPieces.length;i++){if (asPieces[i].length==1){var sEntity=FCKXHtmlEntities.Entities[asPieces[i]];if (sEntity!=null){this._AppendEntity(xmlNode,sEntity);continue;};};xmlNode.appendChild(this.XML.createTextNode(asPieces[i]));};};break;case 8:xmlNode.appendChild(this.XML.createComment(htmlNode.nodeValue));break;default:xmlNode.appendChild(this.XML.createComment("Element not supported - Type: "+htmlNode.nodeType+" Name: "+htmlNode.nodeName));break;};};FCKXHtml._AppendSpecialItem=function(item){return '___FCKsi___'+FCKXHtml.SpecialBlocks.addItem(item);};FCKXHtml.TagProcessors=new Object();FCKXHtml.TagProcessors['img']=function(node){if (!node.attributes.getNamedItem('alt')) FCKXHtml._AppendAttribute(node,'alt','');return node;};FCKXHtml.TagProcessors['script']=function(node,htmlNode){if (!node.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(node,'type','text/javascript');node.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(htmlNode.text)));return node;};FCKXHtml.TagProcessors['style']=function(node,htmlNode){if (htmlNode.getAttribute('_fcktemp')) return null;if (!node.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(node,'type','text/css');node.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(htmlNode.innerHTML)));return node;};FCKXHtml.TagProcessors['title']=function(node,htmlNode){node.appendChild(FCKXHtml.XML.createTextNode(FCK.EditorDocument.title));return node;};FCKXHtml.TagProcessors['base']=function(node,htmlNode){if (htmlNode.getAttribute('_fcktemp')) return null;return node;};FCKXHtml.TagProcessors['link']=function(node,htmlNode){if (htmlNode.getAttribute('_fcktemp')) return null;return node;};FCKXHtml.TagProcessors['table']=function(node,htmlNode){var oClassAtt=node.attributes.getNamedItem('class');if (oClassAtt&&FCKRegexLib.TableBorderClass.test(oClassAtt.nodeValue)){var sClass=oClassAtt.nodeValue.replace(FCKRegexLib.TableBorderClass,'');if (sClass.length==0) node.attributes.removeNamedItem('class');else FCKXHtml._AppendAttribute(node,'class',sClass);};FCKXHtml._AppendChildNodes(node,htmlNode,false);return node;}
FCKXHtml._GetMainXmlString=function(){return this.MainNode.xml;};FCKXHtml._AppendEntity=function(xmlNode,entity){xmlNode.appendChild(this.XML.createEntityReference(entity));};FCKXHtml._AppendAttributes=function(xmlNode,htmlNode,node,nodeName){var aAttributes=htmlNode.attributes;for (var n=0;n<aAttributes.length;n++){var oAttribute=aAttributes[n];if (oAttribute.specified){var sAttName=oAttribute.nodeName.toLowerCase();if (sAttName=='_fckxhtmljob') continue;else if (sAttName=='style') var sAttValue=htmlNode.style.cssText;else if (sAttName=='class'||sAttName.indexOf('on')==0) var sAttValue=oAttribute.nodeValue;else if (nodeName=='body'&&sAttName=='contenteditable') continue;else if (oAttribute.nodeValue===true) sAttValue=sAttName;else var sAttValue=htmlNode.getAttribute(sAttName,2);if (FCKConfig.ForceSimpleAmpersand&&sAttValue.replace) sAttValue=sAttValue.replace(/&/g,'___FCKAmp___');this._AppendAttribute(node,sAttName,sAttValue);};};};FCKXHtml.TagProcessors['meta']=function(node,htmlNode){var oHttpEquiv=node.attributes.getNamedItem('http-equiv');if (oHttpEquiv==null||oHttpEquiv.value.length==0){var sHttpEquiv=htmlNode.outerHTML.match(FCKRegexLib.MetaHttpEquiv);if (sHttpEquiv){sHttpEquiv=sHttpEquiv[1];FCKXHtml._AppendAttribute(node,'http-equiv',sHttpEquiv);};};return node;};FCKXHtml.TagProcessors['font']=function(node,htmlNode){if (node.attributes.length==0) node=FCKXHtml.XML.createDocumentFragment();FCKXHtml._AppendChildNodes(node,htmlNode);return node;};FCKXHtml.TagProcessors['input']=function(node,htmlNode){if (htmlNode.name) FCKXHtml._AppendAttribute(node,'name',htmlNode.name);if (htmlNode.value&&!node.attributes.getNamedItem('value')) FCKXHtml._AppendAttribute(node,'value',htmlNode.value);return node;};FCKXHtml.TagProcessors['option']=function(node,htmlNode){if (htmlNode.selected&&!node.attributes.getNamedItem('selected')) FCKXHtml._AppendAttribute(node,'selected','selected');FCKXHtml._AppendChildNodes(node,htmlNode);return node;};FCKXHtml.TagProcessors['abbr']=function(node,htmlNode){var oNextNode=htmlNode.nextSibling;while (true){if (oNextNode&&oNextNode.nodeName!='/ABBR'){FCKXHtml._AppendNode(node,oNextNode);oNextNode=oNextNode.nextSibling;}else break;};return node;};FCKXHtml.TagProcessors['area']=function(node,htmlNode){if (!node.attributes.getNamedItem('coords')){var sCoords=htmlNode.getAttribute('coords',2);if (sCoords&&sCoords!='0,0,0') FCKXHtml._AppendAttribute(node,'coords',sCoords);};if (!node.attributes.getNamedItem('shape')){var sCoords=htmlNode.getAttribute('shape',2);if (sCoords&&sCoords.length>0) FCKXHtml._AppendAttribute(node,'shape',sCoords);};return node;};FCKXHtml.TagProcessors['label']=function(node,htmlNode){if (htmlNode.htmlFor.length>0) FCKXHtml._AppendAttribute(node,'for',htmlNode.htmlFor);FCKXHtml._AppendChildNodes(node,htmlNode);return node;};FCKXHtml.TagProcessors['form']=function(node,htmlNode){if (htmlNode.acceptCharset.length>0&&htmlNode.acceptCharset!='UNKNOWN') FCKXHtml._AppendAttribute(node,'accept-charset',htmlNode.acceptCharset);FCKXHtml._AppendChildNodes(node,htmlNode);return node;}
var FCKCodeFormatter=new Object();FCKCodeFormatter.Regex=new Object();FCKCodeFormatter.Regex.BlocksOpener=/\<(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|AREA|OPTION)[^\>]*\>/gi;FCKCodeFormatter.Regex.BlocksCloser=/\<\/(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|AREA|OPTION)[^\>]*\>/gi;FCKCodeFormatter.Regex.NewLineTags=/\<(BR|HR)[^\>]\>/gi;FCKCodeFormatter.Regex.MainTags=/\<\/?(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR)[^\>]*\>/gi;FCKCodeFormatter.Regex.LineSplitter=/\s*\n+\s*/g;FCKCodeFormatter.Regex.IncreaseIndent=/^\<(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \/\>]/i;FCKCodeFormatter.Regex.DecreaseIndent=/^\<\/(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \>]/i;FCKCodeFormatter.Regex.FormatIndentatorRemove=new RegExp(FCKConfig.FormatIndentator);FCKCodeFormatter.Format=function(html){var sFormatted=html.replace(this.Regex.BlocksOpener,'\n$&');;sFormatted=sFormatted.replace(this.Regex.BlocksCloser,'$&\n');sFormatted=sFormatted.replace(this.Regex.NewLineTags,'$&\n');sFormatted=sFormatted.replace(this.Regex.MainTags,'\n$&\n');var sIndentation='';var asLines=sFormatted.split(this.Regex.LineSplitter);sFormatted='';for (var i=0;i<asLines.length;i++){var sLine=asLines[i];if (sLine.length==0) continue;if (this.Regex.DecreaseIndent.test(sLine)) sIndentation=sIndentation.replace(this.Regex.FormatIndentatorRemove,'');sFormatted+=sIndentation+sLine+'\n';if (this.Regex.IncreaseIndent.test(sLine)) sIndentation+=FCKConfig.FormatIndentator;};return sFormatted.trim();}
var FCKUndo=new Object();FCKUndo.SavedData=new Array();FCKUndo.CurrentIndex=-1;FCKUndo.SaveUndoStep=function(){FCKUndo.SavedData=FCKUndo.SavedData.slice(0,FCKUndo.CurrentIndex+1);var sHtml=FCK.EditorDocument.body.innerHTML;if (FCKUndo.CurrentIndex>=0&&sHtml==FCKUndo.SavedData[FCKUndo.CurrentIndex][0]) return;if (FCKUndo.CurrentIndex+1>=FCKConfig.MaxUndoLevels) FCKUndo.SavedData.shift();else FCKUndo.CurrentIndex++;var sBookmark;if (FCK.EditorDocument.selection.type=='Text') sBookmark=FCK.EditorDocument.selection.createRange().getBookmark();FCKUndo.SavedData[FCKUndo.CurrentIndex]=[sHtml,sBookmark];FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.Undo=function(){if (FCKUndo.CurrentIndex>0){if (FCKUndo.CurrentIndex==(FCKUndo.SavedData.length-1)){FCKUndo.SaveUndoStep();};FCKUndo._ApplyUndoLevel(--FCKUndo.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");};};FCKUndo.Redo=function(){if (FCKUndo.CurrentIndex<(FCKUndo.SavedData.length-1)){FCKUndo._ApplyUndoLevel(++FCKUndo.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");};};FCKUndo._ApplyUndoLevel=function(level){var oData=FCKUndo.SavedData[level];FCK.EditorDocument.body.innerHTML=oData[0];if (oData[1]){var oRange=FCK.EditorDocument.selection.createRange();oRange.moveToBookmark(oData[1]);oRange.select();};}
-FCK.Events=new FCKEvents(FCK);FCK.Toolbar=null;FCK.TempBaseTag=FCKConfig.BaseHref.length>0?'<base href="'+FCKConfig.BaseHref+'" _fcktemp="true"></base>':'';FCK.StartEditor=function(){this.EditorWindow=window.frames['eEditorArea'];this.EditorDocument=this.EditorWindow.document;if (FCKBrowserInfo.IsGecko) this.MakeEditable();this.SetHTML(FCKTools.GetLinkedFieldValue());FCKTools.AttachToLinkedFieldFormSubmit(this.UpdateLinkedField);this.SetStatus(FCK_STATUS_ACTIVE);};FCK.SetStatus=function(newStatus){this.Status=newStatus;if (newStatus==FCK_STATUS_ACTIVE){window.onfocus=window.document.body.onfocus=FCK.Focus;if (FCKConfig.StartupFocus) FCK.Focus();if (FCKBrowserInfo.IsIE) FCKScriptLoader.AddScript('js/fckeditorcode_ie_2.js');else FCKScriptLoader.AddScript('js/fckeditorcode_gecko_2.js');};this.Events.FireEvent('OnStatusChange',newStatus);if (this.OnStatusChange) this.OnStatusChange(newStatus);};FCK.GetHTML=function(format){var sHTML;if (FCK.EditMode==FCK_EDITMODE_WYSIWYG){if (FCKBrowserInfo.IsIE) sHTML=this.EditorDocument.body.innerHTML.replace(FCKRegexLib.ToReplace,'$1');else sHTML=this.EditorDocument.body.innerHTML;}else sHTML=document.getElementById('eSourceField').value;if (format) return FCKCodeFormatter.Format(sHTML);else return sHTML;};FCK.GetXHTML=function(format){var bSource=(FCK.EditMode==FCK_EDITMODE_SOURCE);if (bSource) this.SwitchEditMode();if (FCKConfig.FullPage) var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.getElementsByTagName('html')[0],true,format);else var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.body,false,format);if (bSource) this.SwitchEditMode();if (FCKBrowserInfo.IsIE) sXHTML=sXHTML.replace(FCKRegexLib.ToReplace,'$1');if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) sXHTML=FCK.DocTypeDeclaration+'\n'+sXHTML;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) sXHTML=FCK.XmlDeclaration+'\n'+sXHTML;return sXHTML;};FCK.UpdateLinkedField=function(){if (FCKConfig.EnableXHTML) FCKTools.SetLinkedFieldValue(FCK.GetXHTML(FCKConfig.FormatOutput));else FCKTools.SetLinkedFieldValue(FCK.GetHTML(FCKConfig.FormatOutput));};FCK.ShowContextMenu=function(x,y){if (this.Status!=FCK_STATUS_COMPLETE) return;FCKContextMenu.Show(x,y);this.Events.FireEvent("OnContextMenu");};FCK.RegisteredDoubleClickHandlers=new Object();FCK.OnDoubleClick=function(element){var oHandler=FCK.RegisteredDoubleClickHandlers[element.tagName];if (oHandler){oHandler(element);};};FCK.RegisterDoubleClickHandler=function(handlerFunction,tag){FCK.RegisteredDoubleClickHandlers[tag.toUpperCase()]=handlerFunction;};
+FCK.Events=new FCKEvents(FCK);FCK.Toolbar=null;FCK.TempBaseTag=FCKConfig.BaseHref.length>0?'<base href="'+FCKConfig.BaseHref+'" _fcktemp="true"></base>':'';FCK.StartEditor=function(){this.EditorWindow=window.frames['eEditorArea'];this.EditorDocument=this.EditorWindow.document;if (FCKBrowserInfo.IsGecko) this.MakeEditable();this.SetHTML(FCKTools.GetLinkedFieldValue());FCKTools.AttachToLinkedFieldFormSubmit(this.UpdateLinkedField);this.SetStatus(FCK_STATUS_ACTIVE);};FCK.SetStatus=function(newStatus){this.Status=newStatus;if (newStatus==FCK_STATUS_ACTIVE){window.onfocus=window.document.body.onfocus=FCK.Focus;if (FCKConfig.StartupFocus) FCK.Focus();if (FCKBrowserInfo.IsIE) FCKScriptLoader.AddScript('js/fckeditorcode_ie_2.js');else FCKScriptLoader.AddScript('js/fckeditorcode_gecko_2.js');};this.Events.FireEvent('OnStatusChange',newStatus);if (this.OnStatusChange) this.OnStatusChange(newStatus);if (typeof(FCKConfig.newBgColor)!='undefined') this.EditorDocument.bgColor=FCKConfig.newBgColor;};FCK.GetHTML=function(format){var sHTML;if (FCK.EditMode==FCK_EDITMODE_WYSIWYG){if (FCKBrowserInfo.IsIE) sHTML=this.EditorDocument.body.innerHTML.replace(FCKRegexLib.ToReplace,'$1');else sHTML=this.EditorDocument.body.innerHTML;}else sHTML=document.getElementById('eSourceField').value;if (format) return FCKCodeFormatter.Format(sHTML);else return sHTML;};FCK.GetXHTML=function(format){var bSource=(FCK.EditMode==FCK_EDITMODE_SOURCE);if (bSource) this.SwitchEditMode();if (FCKConfig.FullPage) var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.getElementsByTagName('html')[0],true,format);else var sXHTML=FCKXHtml.GetXHTML(this.EditorDocument.body,false,format);if (bSource) this.SwitchEditMode();if (FCKBrowserInfo.IsIE) sXHTML=sXHTML.replace(FCKRegexLib.ToReplace,'$1');if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) sXHTML=FCK.DocTypeDeclaration+'\n'+sXHTML;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) sXHTML=FCK.XmlDeclaration+'\n'+sXHTML;return sXHTML;};FCK.UpdateLinkedField=function(){if (FCKConfig.EnableXHTML) FCKTools.SetLinkedFieldValue(FCK.GetXHTML(FCKConfig.FormatOutput));else FCKTools.SetLinkedFieldValue(FCK.GetHTML(FCKConfig.FormatOutput));};FCK.ShowContextMenu=function(x,y){if (this.Status!=FCK_STATUS_COMPLETE) return;FCKContextMenu.Show(x,y);this.Events.FireEvent("OnContextMenu");};FCK.RegisteredDoubleClickHandlers=new Object();FCK.OnDoubleClick=function(element){var oHandler=FCK.RegisteredDoubleClickHandlers[element.tagName];if (oHandler){oHandler(element);};};FCK.RegisterDoubleClickHandler=function(handlerFunction,tag){FCK.RegisteredDoubleClickHandlers[tag.toUpperCase()]=handlerFunction;};
FCK.Description="FCKeditor for Internet Explorer 5.5+";FCK._BehaviorsStyle='<style type="text/css" _fcktemp="true"> \ TABLE { behavior: url('+FCKConfig.FullBasePath+'css/behaviors/showtableborders.htc) ; } \ A { behavior: url('+FCKConfig.FullBasePath+'css/behaviors/anchors.htc) ; } \ INPUT { behavior: url('+FCKConfig.FullBasePath+'css/behaviors/hiddenfield.htc) ; } \ </style>';FCK.InitializeBehaviors=function(dontReturn){this.EditorDocument.onmousedown=this.EditorDocument.onmouseup=function(){FCK.Focus();FCK.EditorWindow.event.cancelBubble=true;FCK.EditorWindow.event.returnValue=false;};this.EditorDocument.body.onpaste=function(){if (FCK.Status==FCK_STATUS_COMPLETE) return FCK.Events.FireEvent("OnPaste");else return false;};this.EditorDocument.oncontextmenu=function(){var e=this.parentWindow.event;FCK.ShowContextMenu(e.screenX,e.screenY);return false;};if (FCKConfig.UseBROnCarriageReturn||FCKConfig.TabSpaces>0){if (FCKConfig.TabSpaces>0){window.FCKTabHTML='';for (i=0;i<FCKConfig.TabSpaces;i++) window.FCKTabHTML+="&nbsp;";};this.EditorDocument.onkeydown=function(){var e=FCK.EditorWindow.event;if (e.keyCode==13&&FCKConfig.UseBROnCarriageReturn){if ((e.ctrlKey||e.altKey||e.shiftKey)) return true;else{if (FCK.EditorDocument.queryCommandState('InsertOrderedList')||FCK.EditorDocument.queryCommandState('InsertUnorderedList')) return true;FCK.InsertHtml("<br>&nbsp;");var oRange=FCK.EditorDocument.selection.createRange();oRange.moveStart('character',-1);oRange.select();FCK.EditorDocument.selection.clear();return false;};}else if (e.keyCode==9&&FCKConfig.TabSpaces>0&&!(e.ctrlKey||e.altKey||e.shiftKey)){FCK.InsertHtml(window.FCKTabHTML);return false;};return true;};};this.EditorDocument.ondblclick=function(){FCK.OnDoubleClick(FCK.EditorWindow.event.srcElement);FCK.EditorWindow.event.cancelBubble=true;};this.EditorDocument.onselectionchange=function(){FCK.Events.FireEvent("OnSelectionChange");};};FCK.Focus=function(){try{if (FCK.EditMode==FCK_EDITMODE_WYSIWYG) FCK.EditorDocument.body.focus();else document.getElementById('eSourceField').focus();}catch(e) {};};FCK.SetHTML=function(html,forceWYSIWYG){if (forceWYSIWYG||FCK.EditMode==FCK_EDITMODE_WYSIWYG){this.EditorDocument.open();if (FCKConfig.FullPage){var sExtraHtml=FCK._BehaviorsStyle+'<link href="'+FCKConfig.FullBasePath+'css/fck_internal.css'+'" rel="stylesheet" type="text/css" _fcktemp="true" />';if (FCK.TempBaseTag.length>0&&!FCKRegexLib.HasBaseTag.test(html)) sExtraHtml+=FCK.TempBaseTag;html=html.replace(FCKRegexLib.HeadCloser,sExtraHtml+'</head>');this.EditorDocument.write(html);}else{var sHtml='<html dir="'+FCKConfig.ContentLangDirection+'">'+'<head><title></title>'+'<link href="'+FCKConfig.EditorAreaCSS+'" rel="stylesheet" type="text/css" />'+'<link href="'+FCKConfig.FullBasePath+'css/fck_internal.css'+'" rel="stylesheet" type="text/css" _fcktemp="true" />';sHtml+=FCK._BehaviorsStyle;sHtml+=FCK.TempBaseTag;sHtml+='</head><body>'+html+'</body></html>';this.EditorDocument.write(sHtml);};this.EditorDocument.close();this.InitializeBehaviors();this.EditorDocument.body.contentEditable=true;this.Events.FireEvent('OnAfterSetHTML');}else document.getElementById('eSourceField').value=html;};FCK.InsertHtml=function(html){FCK.Focus();var oSel=FCK.EditorDocument.selection;if (oSel.type.toLowerCase()!="none") oSel.clear();oSel.createRange().pasteHTML(html);};
Property changes on: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_1.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js (revision 1998)
+++ trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js (revision 1999)
@@ -1,54 +1,54 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* This file has been compacted for best loading performance.
*/
-FCK.RedirectNamedCommands=new Object();FCK.ExecuteNamedCommand=function(commandName,commandParameter){if (FCK.RedirectNamedCommands[commandName]!=null) {FCK.ExecuteRedirectedNamedCommand(commandName,commandParameter);}else{FCK.Focus();if (commandName=="Undo"){if (confirm("This will delete everything on this page. Are you sure?")) FCK.EditorDocument.execCommand(commandName,false,commandParameter);} else FCK.EditorDocument.execCommand(commandName,false,commandParameter);FCK.Events.FireEvent('OnSelectionChange');};};FCK.GetNamedCommandState=function(commandName){try{if (commandName=='InsertHorizontalRule') return FCK_TRISTATE_OFF;if (!FCK.EditorDocument.queryCommandEnabled(commandName)) return FCK_TRISTATE_DISABLED;else {switch (commandName){default:return FCK.EditorDocument.queryCommandState(commandName)?FCK_TRISTATE_ON:FCK_TRISTATE_OFF;};};}catch (e){return FCK_TRISTATE_OFF;};};FCK.GetNamedCommandValue=function(commandName){var sValue='';var eState=FCK.GetNamedCommandState(commandName);if (eState==FCK_TRISTATE_DISABLED) return null;try{sValue=this.EditorDocument.queryCommandValue(commandName);}catch(e) {};return sValue?sValue:'';};FCK.CleanAndPaste=function(html){html=html.replace(/<\/?SPAN[^>]*>/gi,"");html=html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<\\?\?xml[^>]*>/gi,"");html=html.replace(/<\/?\w+:[^>]*>/gi,"");html=html.replace(/&nbsp;/," ");var re=new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi");html=html.replace(re,"<div$2</div>");FCK.InsertHtml(html);};FCK.Preview=function(){if (typeof(FCKConfig.template_name)!='undefined'&&FCKConfig.template_name!=''){oWindow=window.open(FCKConfig.project_path+'index.php?t='+FCKConfig.template_name,'prewiev','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');if (FCKBrowserInfo.IsIE) {oWindow.attachEvent("onload",FCK.SetPreview);}else oWindow.addEventListener('load',FCK.SetPreview,true);return;}else {var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML='<html><head><link href="'+FCKConfig.EditorAreaCSS+'" rel="stylesheet" type="text/css" /></head><body>'+FCK.GetHTML()+'</body></html>';oWindowE.document.write(sHTML);oWindowE.document.close();};};FCK.SetPreview=function(){oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML=FCK.GetHTML();};FCK.SwitchEditMode=function(){var bWYSIWYG=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=bWYSIWYG?'none':'';document.getElementById('eSource').style.display=bWYSIWYG?'':'none';if (bWYSIWYG) document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=bWYSIWYG?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();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];};};};
+FCK.RedirectNamedCommands=new Object();var oWindow=new Object();FCK.ExecuteNamedCommand=function(commandName,commandParameter){if (FCK.RedirectNamedCommands[commandName]!=null) {FCK.ExecuteRedirectedNamedCommand(commandName,commandParameter);}else{FCK.Focus();if (commandName=="Undo"){if (confirm("This will delete everything on this page. Are you sure?")) FCK.EditorDocument.execCommand(commandName,false,commandParameter);} else FCK.EditorDocument.execCommand(commandName,false,commandParameter);FCK.Events.FireEvent('OnSelectionChange');};};FCK.GetNamedCommandState=function(commandName){try{if (commandName=='InsertHorizontalRule') return FCK_TRISTATE_OFF;if (!FCK.EditorDocument.queryCommandEnabled(commandName)) return FCK_TRISTATE_DISABLED;else {switch (commandName){default:return FCK.EditorDocument.queryCommandState(commandName)?FCK_TRISTATE_ON:FCK_TRISTATE_OFF;};};}catch (e){return FCK_TRISTATE_OFF;};};FCK.GetNamedCommandValue=function(commandName){var sValue='';var eState=FCK.GetNamedCommandState(commandName);if (eState==FCK_TRISTATE_DISABLED) return null;try{sValue=this.EditorDocument.queryCommandValue(commandName);}catch(e) {};return sValue?sValue:'';};FCK.CleanAndPaste=function(html){html=html.replace(/<\/?SPAN[^>]*>/gi,"");html=html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3");html=html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");html=html.replace(/<\\?\?xml[^>]*>/gi,"");html=html.replace(/<\/?\w+:[^>]*>/gi,"");html=html.replace(/&nbsp;/," ");var re=new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi");html=html.replace(re,"<div$2</div>");FCK.InsertHtml(html);};FCK.Preview=function(){if (typeof(FCKConfig.template_name)!='undefined'&&FCKConfig.template_name!=''){oWindow=window.open(FCKConfig.ProjectPath+'/index.php?t='+FCKConfig.template_name,'prewiev','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');if (FCKBrowserInfo.IsIE) {oWindow.attachEvent("onload",FCK.SetPreview);}else oWindow.addEventListener('load',FCK.SetPreview,true);return;}else {if (typeof(FCKConfig.preview_width)!='undefined'&&typeof(FCKConfig.preview_height)!='undefined'&&FCKConfig.preview_width>0&&FCKConfig.preview_height>0) var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+FCKConfig.preview_width+',height='+FCKConfig.preview_height);else var oWindowE=window.open('',null,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');var sHTML='<html><head><link href="'+FCKConfig.EditorAreaCSS+'" rel="stylesheet" type="text/css" /></head><body>'+FCK.GetHTML()+'</body></html>';oWindowE.document.write(sHTML);oWindowE.document.close();};};FCK.SetPreview=function(){oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML=FCK.GetHTML();};FCK.SwitchEditMode=function(){var bWYSIWYG=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=bWYSIWYG?'none':'';document.getElementById('eSource').style.display=bWYSIWYG?'':'none';if (bWYSIWYG) document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=bWYSIWYG?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;FCK.Focus();};FCK.CreateElement=function(tag){var e=FCK.EditorDocument.createElement(tag);return FCK.InsertElementAndGetIt(e);};FCK.InsertElementAndGetIt=function(e){e.setAttribute('__FCKTempLabel',1);this.InsertElement(e);var aEls=FCK.EditorDocument.getElementsByTagName(e.tagName);for (var i=0;i<aEls.length;i++){if (aEls[i].getAttribute('__FCKTempLabel')){aEls[i].removeAttribute('__FCKTempLabel');return aEls[i];};};};
FCK.Paste=function(){if (FCKConfig.ForcePasteAsPlainText){FCK.PasteAsPlainText();return false;}else if (FCKConfig.AutoDetectPasteFromWord&&FCKBrowserInfo.IsIE55OrMore){var sHTML=FCK.GetClipboardHTML();var re=/<\w[^>]* class="?MsoNormal"?/gi;if (re.test(sHTML)){if (confirm(FCKLang["PasteWordConfirm"])){FCK.CleanAndPaste(sHTML);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.PasteFromWord=function(){FCK.CleanAndPaste(FCK.GetClipboardHTML());};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];};};};};
var FCKSelection=new Object();FCK.Selection=FCKSelection;
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.MoveToNode=function(node){FCK.Focus();FCK.EditorDocument.selection.empty();var oRange=FCK.EditorDocument.selection.createRange();oRange.moveToElementText(node);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;}
var FCKPanel=function(parentWindow){this.Window=parentWindow?parentWindow:window;};FCKPanel.prototype.Create=function(){this._Popup=this.Window.createPopup();this.Document=this._Popup.document;this.Document.oncontextmenu=function() { return false;};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();}
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');oCell.innerHTML='&nbsp;';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");oNewCell.innerHTML="&nbsp;";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++){aCells[i].innerHTML='&nbsp;';};}
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;};
var FCKXml=function(){};FCKXml.prototype.LoadUrl=function(urlToCall,asyncFunctionPointer){var oFCKXml=this;var bAsync=(typeof(asyncFunctionPointer)=='function');var oXmlHttp=FCKTools.CreateXmlObject('XmlHttp');oXmlHttp.open("GET",urlToCall,bAsync);if (bAsync){oXmlHttp.onreadystatechange=function(){if (oXmlHttp.readyState==4){oFCKXml.DOMDocument=oXmlHttp.responseXML;asyncFunctionPointer(oFCKXml);};};};oXmlHttp.send(null);if (!bAsync){if (oXmlHttp.status==200) this.DOMDocument=oXmlHttp.responseXML;else if (oXmlHttp.status==0&&oXmlHttp.readyState==4){oFCKXml.DOMDocument=FCKTools.CreateXmlObject('DOMDocument');oFCKXml.DOMDocument.async=false;oFCKXml.DOMDocument.resolveExternals=false;oFCKXml.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);};
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());}
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);}
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;}
var FCKNamedCommand=function(commandName){this.Name=commandName;};FCKNamedCommand.prototype.Execute=function(){FCK.ExecuteNamedCommand(this.Name);};FCKNamedCommand.prototype.GetState=function(){return FCK.GetNamedCommandState(this.Name);};
-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;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCK.SetHTML(FCKBrowserInfo.IsGecko?'&nbsp;':'');};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);}
+var 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;oForm.submit();};FCKSaveCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKNewPageCommand=function(){this.Name='NewPage';};FCKNewPageCommand.prototype.Execute=function(){FCK.SetHTML(FCKBrowserInfo.IsGecko?'&nbsp;':'');if (typeof(FCKConfig.newBgColor)!='undefined') FCK.EditorDocument.bgColor=FCKConfig.newBgColor;};FCKNewPageCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};var FCKSourceCommand=function(){this.Name='Source';};FCKSourceCommand.prototype.Execute=function(){FCK.SwitchEditMode();};FCKSourceCommand.prototype.GetState=function(){return (FCK.EditMode==FCK_EDITMODE_WYSIWYG?FCK_TRISTATE_OFF:FCK_TRISTATE_ON);}
var FCKSpellCheckCommand=function(){this.Name='SpellCheck';this.IsEnabled=(FCKConfig.SpellChecker=='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;}
var FCKTextColorCommand=function(type){this.Name=type=='ForeColor'?'TextColor':'BGColor';this.Type=type;this._Panel=new FCKPanel();this._Panel.StyleSheet=FCKConfig.SkinPath+'fck_contextmenu.css';this._Panel.Create();this._CreatePanelBody(this._Panel.Document,this._Panel.PanelDiv);};FCKTextColorCommand.prototype.Execute=function(panelX,panelY,relElement){FCK._ActiveColorPanelType=this.Type;this._Panel.Show(panelX,panelY,relElement);};FCKTextColorCommand.prototype.SetColor=function(color){if (FCK._ActiveColorPanelType=='ForeColor') FCK.ExecuteNamedCommand('ForeColor',color);else if (FCKBrowserInfo.IsGecko) FCK.ExecuteNamedCommand('hilitecolor',color);else FCK.ExecuteNamedCommand('BackColor',color);delete FCK._ActiveColorPanelType;};FCKTextColorCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;};FCKTextColorCommand.prototype._CreatePanelBody=function(targetDocument,targetDiv){function CreateSelectionDiv(){var oDiv=targetDocument.createElement("DIV");oDiv.className='ColorDeselected';oDiv.onmouseover=function() { this.className='ColorSelected';};oDiv.onmouseout=function() { this.className='ColorDeselected';};return oDiv;};var oTable=targetDiv.appendChild(targetDocument.createElement("TABLE"));oTable.style.tableLayout='fixed';oTable.cellPadding=0;oTable.cellSpacing=0;oTable.border=0;oTable.width=150;var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='<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=function(){this.className='ColorDeselected';this.Command.SetColor('');this.Command._Panel.Hide();};var aColors=FCKConfig.FontColors.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=function(){this.className='ColorDeselected';this.Command.SetColor('#'+this.Color);this.Command._Panel.Hide();};};};var oCell=oTable.insertRow(-1).insertCell(-1);oCell.colSpan=8;var oDiv=oCell.appendChild(CreateSelectionDiv());oDiv.innerHTML='<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td nowrap align="center">'+FCKLang.ColorMoreColors+'</td></tr></table>';oDiv.Command=this;oDiv.onclick=function(){this.className='ColorDeselected';this.Command._Panel.Hide();FCKDialog.OpenDialog('FCKDialog_Color',FCKLang.DlgColorTitle,'dialog/fck_colorselector.html',400,330,this.Command.SetColor);};}
var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');};
var FCKPasteWordCommand=function(){this.Name='PasteWord';};FCKPasteWordCommand.prototype.Execute=function(){FCK.PasteFromWord();};FCKPasteWordCommand.prototype.GetState=function(){return FCK.GetNamedCommandState('Paste');};
var FCKTableCommand=function(command){this.Name=command;};FCKTableCommand.prototype.Execute=function(){switch (this.Name){case 'TableInsertRow':FCKTableHandler.InsertRow();break;case 'TableDeleteRows':FCKTableHandler.DeleteRows();break;case 'TableInsertColumn':FCKTableHandler.InsertColumn();break;case 'TableDeleteColumns':FCKTableHandler.DeleteColumns();break;case 'TableInsertCell':FCKTableHandler.InsertCell();break;case 'TableDeleteCells':FCKTableHandler.DeleteCells();break;case 'TableMergeCells':FCKTableHandler.MergeCells();break;case 'TableSplitCell':FCKTableHandler.SplitCell();break;default:alert(FCKLang.UnknownCommand.replace(/%1/g,this.Name));};};FCKTableCommand.prototype.GetState=function(){return FCK_TRISTATE_OFF;}
var FCKStyleCommand=function(){this.Name='Style';this.StylesLoader=new FCKStylesLoader();this.StylesLoader.Load(FCKConfig.StylesXmlPath);this.Styles=this.StylesLoader.Styles;};FCKStyleCommand.prototype.Execute=function(styleName,styleComboItem){if (styleName=="Clear Styles"){if (FCKBrowserInfo.IsIE){var selected=FCKSelection.GetParentElement();RemoveStyles(selected.childNodes);} else FCK.ExecuteNamedCommand('RemoveFormat');return;};if (styleComboItem.Selected) styleComboItem.Style.RemoveFromSelection();else styleComboItem.Style.ApplyToSelection();FCK.Focus();FCK.Events.FireEvent("OnSelectionChange");};function show_props(obj,objName) {var result="";for (var i in obj) {result=objName+"."+i+" = "+obj[i]+" \n";alert(result);};};FCKStyleCommand.prototype.GetState=function(){var oSelection=FCK.EditorDocument.selection;if (FCKSelection.GetType()=='Control'){var e=FCKSelection.GetSelectedElement();if (e) return this.StylesLoader.StyleGroups[e.tagName]?FCK_TRISTATE_OFF:FCK_TRISTATE_DISABLED;else FCK_TRISTATE_OFF;}else return FCK_TRISTATE_OFF;};FCKStyleCommand.prototype.GetActiveStyles=function(){var aActiveStyles=new Array();if (FCKSelection.GetType()=='Control') this._CheckStyle(FCKSelection.GetSelectedElement(),aActiveStyles,false);else this._CheckStyle(FCKSelection.GetParentElement(),aActiveStyles,true);return aActiveStyles;};FCKStyleCommand.prototype._CheckStyle=function(element,targetArray,checkParent){if (!element) return;var style_exist=false;if (element.nodeType==1){var aStyleGroup=this.StylesLoader.StyleGroups[element.tagName];if (aStyleGroup){for (var i=0;i<aStyleGroup.length;i++){if (aStyleGroup[i].IsEqual(element)) {targetArray[targetArray.length]=aStyleGroup[i];};};};};if (checkParent) this._CheckStyle(element.parentNode,targetArray,checkParent);}
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 '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?ImageButton',450,400);break;case 'Document':oCommand=new FCKDialogCommand('Document',FCKLang.DlgDocTitle,'dialog/fck_document.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 '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;};
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;this.DOMDiv.onmouseover=function(){if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED){this.className='TB_Button_On';};};this.DOMDiv.onmouseout=function(){if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED&&this.FCKToolbarButton.State!=FCK_TRISTATE_ON){this.className='TB_Button_Off';};};this.DOMDiv.onclick=function(){if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED) this.FCKToolbarButton.Command.Execute();return false;};var sClass;switch (this.Style){case FCK_TOOLBARITEM_ONLYICON:sClass='TB_ButtonType_Icon';break;case FCK_TOOLBARITEM_ONLYTEXT:sClass='TB_ButtonType_Text';break;case FCK_TOOLBARITEM_ICONTEXT:sClass='';break;};this.DOMDiv.innerHTML='<table title="'+this.Tooltip+'" class="'+sClass+'" cellspacing="0" cellpadding="0" border="0" unselectable="on">'+'<tr>'+'<td class="TB_Icon" unselectable="on"><img src="'+this.IconPath+'" width="21" height="21" unselectable="on"></td>'+'<td class="TB_Text" unselectable="on">'+this.Label+'</td>'+'</tr>'+'</table>';var oCell=parentToolbar.DOMRow.insertCell(-1);oCell.appendChild(this.DOMDiv);this.RefreshState();};FCKToolbarButton.prototype.RefreshState=function(){var eState=this.Command.GetState();if (eState==this.State) return;this.State=eState;switch (this.State){case FCK_TRISTATE_ON:this.DOMDiv.className='TB_Button_On';break;case FCK_TRISTATE_OFF:this.DOMDiv.className='TB_Button_Off';break;default:this.DOMDiv.className='TB_Button_Disabled';break;};};FCKToolbarButton.prototype.Enable=function(){this.RefreshState();};FCKToolbarButton.prototype.Disable=function(){this.State=FCK_TRISTATE_DISABLED;this.DOMDiv.className='TB_Button_Disabled';}
var FCKSpecialCombo=function(caption){this.FieldWidth=80;this.PanelWidth=130;this.PanelMaxHeight=150;this.Label='&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];};FCKSpecialCombo.prototype.AddItem=function(id,html,label){var oDiv=this._ItemsHolderEl.appendChild(this._Panel.Document.createElement('DIV'));oDiv.className=oDiv.originalClass='SC_Item';oDiv.innerHTML=html;oDiv.FCKItemID=id;oDiv.FCKItemLabel=label?label:id;oDiv.FCKSpecialCombo=this;oDiv.Selected=false;oDiv.onmouseover=function(){this.className+=' SC_ItemOver';};oDiv.onmouseout=function(){this.className=this.originalClass;};oDiv.onclick=function(){this.FCKSpecialCombo._Panel.Hide();this.FCKSpecialCombo.SetLabel(this.FCKItemLabel);if (typeof(this.FCKSpecialCombo.OnSelect)=='function') this.FCKSpecialCombo.OnSelect(this.FCKItemID,this);};this.Items[id.toString().toLowerCase()]=oDiv;return oDiv;};FCKSpecialCombo.prototype.SelectItem=function(itemId){itemId=itemId?itemId.toString().toLowerCase():'';var oDiv=this.Items[itemId];if (oDiv){oDiv.className=oDiv.originalClass='SC_ItemSelected';oDiv.Selected=true;};};FCKSpecialCombo.prototype.DeselectAll=function(){for (var i in this.Items){this.Items[i].className=this.Items[i].originalClass='SC_Item';this.Items[i].Selected=false;};};FCKSpecialCombo.prototype.SetLabelById=function(id){FCKDebug.Output(this.Caption+': '+id,'#0000FF');id=id?id.toString().toLowerCase():'';var oDiv=this.Items[id];this.SetLabel(oDiv?oDiv.FCKItemLabel:'');};FCKSpecialCombo.prototype.SetLabel=function(text){this.Label=text.length==0?'&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=function(){if (this.SpecialCombo.Enabled) this.className='SC_Field SC_FieldOver';};oField.onmouseout=function(){this.className='SC_Field';};oField.onclick=function(e){if (e){e.stopPropagation();FCKPanelEventHandlers.OnDocumentClick(e);};if (this.SpecialCombo.Enabled){if (typeof(this.SpecialCombo.OnBeforeClick)=='function') this.SpecialCombo.OnBeforeClick(this.SpecialCombo);if (this.SpecialCombo._ItemsHolderEl.offsetHeight>this.SpecialCombo.PanelMaxHeight) this.SpecialCombo._Panel.PanelDiv.style.height=this.SpecialCombo.PanelMaxHeight+'px';else this.SpecialCombo._Panel.PanelDiv.style.height=this.SpecialCombo._ItemsHolderEl.offsetHeight+'px';this.SpecialCombo._Panel.PanelDiv.style.width=this.SpecialCombo.PanelWidth+'px';if (FCKBrowserInfo.IsGecko) this.SpecialCombo._Panel.PanelDiv.style.overflow='-moz-scrollbars-vertical';this.SpecialCombo._Panel.Show(0,this.offsetHeight,this,null,this.SpecialCombo.PanelMaxHeight,true);};return false;};};
var FCKToolbarSpecialCombo=function(){this.SourceView=false;this.ContextSensitive=true;};FCKToolbarSpecialCombo.prototype.CreateInstance=function(parentToolbar){this._Combo=new FCKSpecialCombo(this.GetLabel());this._Combo.FieldWidth=100;this._Combo.PanelWidth=150;this._Combo.PanelMaxHeight=150;this.CreateItems(this._Combo);this._Combo.Create(parentToolbar.DOMRow.insertCell(-1));this._Combo.Command=this.Command;this._Combo.OnSelect=function(itemId,item){this.Command.Execute(itemId,item);};};FCKToolbarSpecialCombo.prototype.RefreshState=function(){var eState;var sValue=this.Command.GetState();if (sValue!=FCK_TRISTATE_DISABLED){eState=FCK_TRISTATE_ON;if (!this.RefreshActiveItems){this.RefreshActiveItems=function(combo,value){this._Combo.DeselectAll();this._Combo.SelectItem(value);this._Combo.SetLabelById(value);};};this.RefreshActiveItems(this._Combo,sValue);}else eState=FCK_TRISTATE_DISABLED;if (eState==this.State) return;if (eState==FCK_TRISTATE_DISABLED){this._Combo.DeselectAll();if (typeof(FCKConfig.DefaultClass)!='undefined') this._Combo.SetLabel(FCKConfig.DefaultClass);else this._Combo.SetLabel(' ');};this.State=eState;this._Combo.SetEnabled(eState!=FCK_TRISTATE_DISABLED);};FCKToolbarSpecialCombo.prototype.Enable=function(){this.RefreshState();};FCKToolbarSpecialCombo.prototype.Disable=function(){this.State=FCK_TRISTATE_DISABLED;this._Combo.DeselectAll();if (typeof(FCKConfig.DefaultClass)!='undefined') this._Combo.SetLabel(FCKConfig.DefaultClass);else this._Combo.SetLabel(' ');this._Combo.SetEnabled(false);}
var FCKToolbarFontsCombo=function(){this.Command=FCKCommands.GetCommand('FontName');};FCKToolbarFontsCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarFontsCombo.prototype.GetLabel=function(){return FCKLang.Font;};FCKToolbarFontsCombo.prototype.CreateItems=function(targetSpecialCombo){var aFonts=FCKConfig.FontNames.split(';');for (var i=0;i<aFonts.length;i++) this._Combo.AddItem(aFonts[i],'<span style="font-family: \''+aFonts[i]+'\'; font-size: 12px;">'+aFonts[i]+'</span>');}
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]);};}
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]]);};}
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 {if (typeof(FCKConfig.DefaultClass)!='undefined') {targetSpecialCombo.SelectItem();targetSpecialCombo.SetLabel(FCKConfig.DefaultClass);} 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';};}
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.CreateInstance=function(parentToolbar){this.DOMDiv=document.createElement('div');this.DOMDiv.className='TB_Button_Off';this.DOMDiv.FCKToolbarButton=this;this.DOMDiv.onmouseover=function(){if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED){this.className='TB_Button_On';};};this.DOMDiv.onmouseout=function(){if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED&&this.FCKToolbarButton.State!=FCK_TRISTATE_ON){this.className='TB_Button_Off';};};this.DOMDiv.onclick=function(e){if (e){e.stopPropagation();FCKPanelEventHandlers.OnDocumentClick(e);};if (this.FCKToolbarButton.State!=FCK_TRISTATE_DISABLED){this.FCKToolbarButton.Command.Execute(0,this.FCKToolbarButton.DOMDiv.offsetHeight,this.FCKToolbarButton.DOMDiv);};return false;};var sClass;switch (this.Style){case FCK_TOOLBARITEM_ONLYICON:sClass='TB_ButtonType_Icon';break;case FCK_TOOLBARITEM_ONLYTEXT:sClass='TB_ButtonType_Text';break;case FCK_TOOLBARITEM_ICONTEXT:sClass='';break;};this.DOMDiv.innerHTML='<table title="'+this.Tooltip+'" class="'+sClass+'" cellspacing="0" cellpadding="0" border="0" unselectable="on">'+'<tr>'+'<td class="TB_Icon" unselectable="on"><img src="'+FCKConfig.SkinPath+'toolbar/'+this.Command.Name.toLowerCase()+'.gif" width="21" height="21" unselectable="on"></td>'+'<td class="TB_Text" unselectable="on">'+this.Label+'</td>'+'<td class="TB_ButtonArrow" unselectable="on"><img src="'+FCKConfig.SkinPath+'images/toolbar.buttonarrow.gif" width="5" height="3"></td>'+'</tr>'+'</table>';var oCell=parentToolbar.DOMRow.insertCell(-1);oCell.appendChild(this.DOMDiv);this.RefreshState();};FCKToolbarPanelButton.prototype.RefreshState=FCKToolbarButton.prototype.RefreshState;FCKToolbarPanelButton.prototype.Enable=FCKToolbarButton.prototype.Enable;FCKToolbarPanelButton.prototype.Disable=FCKToolbarButton.prototype.Disable;
var FCKToolbarItems=new Object();FCKToolbarItems.LoadedItems=new Object();FCKToolbarItems.RegisterItem=function(itemName,item){this.LoadedItems[itemName]=item;};FCKToolbarItems.GetItem=function(itemName){var oItem=FCKToolbarItems.LoadedItems[itemName];if (oItem) return oItem;switch (itemName){case 'Source':oItem=new FCKToolbarButton('Source',FCKLang.Source,null,FCK_TOOLBARITEM_ICONTEXT,true,true);break;case 'DocProps':oItem=new FCKToolbarButton('DocProps',FCKLang.DocProps);break;case 'Save':oItem=new FCKToolbarButton('Save',FCKLang.Save,null,null,true);break;case 'NewPage':oItem=new FCKToolbarButton('NewPage',FCKLang.NewPage,null,null,true);break;case 'Preview':oItem=new FCKToolbarButton('Preview',FCKLang.Preview,null,null,true);break;case 'About':oItem=new FCKToolbarButton('About',FCKLang.About,null,null,true);break;case 'Cut':oItem=new FCKToolbarButton('Cut',FCKLang.Cut,null,null,false,true);break;case 'Copy':oItem=new FCKToolbarButton('Copy',FCKLang.Copy,null,null,false,true);break;case 'Paste':oItem=new FCKToolbarButton('Paste',FCKLang.Paste,null,null,false,true);break;case 'PasteText':oItem=new FCKToolbarButton('PasteText',FCKLang.PasteText,null,null,false,true);break;case 'PasteWord':oItem=new FCKToolbarButton('PasteWord',FCKLang.PasteWord,null,null,false,true);break;case 'Print':oItem=new FCKToolbarButton('Print',FCKLang.Print,null,null,false,true);break;case 'SpellCheck':oItem=new FCKToolbarButton('SpellCheck',FCKLang.SpellCheck,null,null,false,true);break;case 'Undo':oItem=new FCKToolbarButton('Undo',FCKLang.Undo,null,null,false,true);break;case 'Redo':oItem=new FCKToolbarButton('Redo',FCKLang.Redo,null,null,false,true);break;case 'SelectAll':oItem=new FCKToolbarButton('SelectAll',FCKLang.SelectAll);break;case 'RemoveFormat':oItem=new FCKToolbarButton('RemoveFormat',FCKLang.RemoveFormat,null,null,false,true);break;case 'Bold':oItem=new FCKToolbarButton('Bold',FCKLang.Bold,null,null,false,true);break;case 'Italic':oItem=new FCKToolbarButton('Italic',FCKLang.Italic,null,null,false,true);break;case 'Underline':oItem=new FCKToolbarButton('Underline',FCKLang.Underline,null,null,false,true);break;case 'StrikeThrough':oItem=new FCKToolbarButton('StrikeThrough',FCKLang.StrikeThrough,null,null,false,true);break;case 'Subscript':oItem=new FCKToolbarButton('Subscript',FCKLang.Subscript,null,null,false,true);break;case 'Superscript':oItem=new FCKToolbarButton('Superscript',FCKLang.Superscript,null,null,false,true);break;case 'OrderedList':oItem=new FCKToolbarButton('InsertOrderedList',FCKLang.NumberedListLbl,FCKLang.NumberedList,null,false,true);break;case 'UnorderedList':oItem=new FCKToolbarButton('InsertUnorderedList',FCKLang.BulletedListLbl,FCKLang.BulletedList,null,false,true);break;case 'Outdent':oItem=new FCKToolbarButton('Outdent',FCKLang.DecreaseIndent,null,null,false,true);break;case 'Indent':oItem=new FCKToolbarButton('Indent',FCKLang.IncreaseIndent,null,null,false,true);break;case 'Link':oItem=new FCKToolbarButton('Link',FCKLang.InsertLinkLbl,FCKLang.InsertLink,null,false,true);break;case 'Unlink':oItem=new FCKToolbarButton('Unlink',FCKLang.RemoveLink,null,null,false,true);break;case 'Anchor':oItem=new FCKToolbarButton('Anchor',FCKLang.Anchor);break;case 'Image':oItem=new FCKToolbarButton('Image',FCKLang.InsertImageLbl,FCKLang.InsertImage);break;case 'Document':oItem=new FCKToolbarButton('Document',FCKLang.InsertDocumentLbl,FCKLang.InsertDocument);break;case 'Table':oItem=new FCKToolbarButton('Table',FCKLang.InsertTableLbl,FCKLang.InsertTable);break;case 'SpecialChar':oItem=new FCKToolbarButton('SpecialChar',FCKLang.InsertSpecialCharLbl,FCKLang.InsertSpecialChar);break;case 'Smiley':oItem=new FCKToolbarButton('Smiley',FCKLang.InsertSmileyLbl,FCKLang.InsertSmiley);break;case 'UniversalKey':oItem=new FCKToolbarButton('UniversalKey',FCKLang.UniversalKeyboard);break;case 'Rule':oItem=new FCKToolbarButton('InsertHorizontalRule',FCKLang.InsertLineLbl,FCKLang.InsertLine);break;case 'JustifyLeft':oItem=new FCKToolbarButton('JustifyLeft',FCKLang.LeftJustify,null,null,false,true);break;case 'JustifyCenter':oItem=new FCKToolbarButton('JustifyCenter',FCKLang.CenterJustify,null,null,false,true);break;case 'JustifyRight':oItem=new FCKToolbarButton('JustifyRight',FCKLang.RightJustify,null,null,false,true);break;case 'JustifyFull':oItem=new FCKToolbarButton('JustifyFull',FCKLang.BlockJustify,null,null,false,true);break;case 'Style':oItem=new FCKToolbarStyleCombo();break;case 'FontName':oItem=new FCKToolbarFontsCombo();break;case 'FontSize':oItem=new FCKToolbarFontSizeCombo();break;case 'FontFormat':oItem=new FCKToolbarFontFormatCombo();break;case 'TextColor':oItem=new FCKToolbarPanelButton('TextColor',FCKLang.TextColor);break;case 'BGColor':oItem=new FCKToolbarPanelButton('BGColor',FCKLang.BGColor);break;case 'Find':oItem=new FCKToolbarButton('Find',FCKLang.Find);break;case 'Replace':oItem=new FCKToolbarButton('Replace',FCKLang.Replace);break;case 'Form':oItem=new FCKToolbarButton('Form',FCKLang.Form);break;case 'Checkbox':oItem=new FCKToolbarButton('Checkbox',FCKLang.Checkbox);break;case 'Radio':oItem=new FCKToolbarButton('Radio',FCKLang.RadioButton);break;case 'TextField':oItem=new FCKToolbarButton('TextField',FCKLang.TextField);break;case 'Textarea':oItem=new FCKToolbarButton('Textarea',FCKLang.Textarea);break;case 'HiddenField':oItem=new FCKToolbarButton('HiddenField',FCKLang.HiddenField);break;case 'Button':oItem=new FCKToolbarButton('Button',FCKLang.Button);break;case 'Select':oItem=new FCKToolbarButton('Select',FCKLang.SelectionField);break;case 'ImageButton':oItem=new FCKToolbarButton('ImageButton',FCKLang.ImageButton);break;default:alert(FCKLang.UnknownToolbarItem.replace(/%1/g,itemName));return;};FCKToolbarItems.LoadedItems[itemName]=oItem;return oItem;}
var FCKToolbar=function(width_){this.Items=new Array();this.DOMTable=document.createElement('table');this.DOMTable.className='TB_Toolbar';with (this.DOMTable){style.styleFloat=style.cssFloat=FCKLang.Dir=='rtl'?'right':'left';cellPadding=0;cellSpacing=0;border=0;if (width_&&width_>0) {width=width_+'%';};};this.DOMRow=this.DOMTable.insertRow(-1);var oCell=this.DOMRow.insertCell(-1);oCell.className='TB_Start';oCell.innerHTML='<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.AddEmpty=function(){var oCell=this.DOMRow.insertCell(-1);oCell.unselectable='on';oCell.width='50%';oCell.innerHTML='<img src="'+FCKConfig.SkinPath+'images/s.gif" width="1" height="1" unselectable="on">';};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">';};FCKToolbar.prototype.AddBigSeparator=function(){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">';};
var FCKToolbarBreak=function(){var oBreakDiv=document.createElement('div');oBreakDiv.className='TB_Break';oBreakDiv.style.clear=FCKLang.Dir=='rtl'?'left':'right';FCKToolbarSet.DOMElement.appendChild(oBreakDiv);}
var FCKToolbarSet=FCK.ToolbarSet=new Object();document.getElementById('ExpandHandle').title=FCKLang.ToolbarExpand;document.getElementById('CollapseHandle').title=FCKLang.ToolbarCollapse;FCKToolbarSet.Toolbars=new Array();FCKToolbarSet.ItemsWysiwygOnly=new Array();FCKToolbarSet.ItemsContextSensitive=new Array();FCKToolbarSet.Expand=function(){document.getElementById('Collapsed').style.display='none';document.getElementById('Expanded').style.display='';if (!FCKBrowserInfo.IsIE){window.setTimeout("window.onresize()",1);};};FCKToolbarSet.Collapse=function(){document.getElementById('Collapsed').style.display='';document.getElementById('Expanded').style.display='none';if (!FCKBrowserInfo.IsIE){window.setTimeout("window.onresize()",1);};};FCKToolbarSet.Restart=function(){if (!FCKConfig.ToolbarCanCollapse||FCKConfig.ToolbarStartExpanded) this.Expand();else this.Collapse();document.getElementById('CollapseHandle').style.display=FCKConfig.ToolbarCanCollapse?'':'none';};FCKToolbarSet.Load=function(toolbarSetName){this.DOMElement=document.getElementById('eToolbar');var ToolbarSet=FCKConfig.ToolbarSets[toolbarSetName];if (!ToolbarSet){alert(FCKLang.UnknownToolbarSet.replace(/%1/g,toolbarSetName));return;};this.Toolbars=new Array();for (var x=0;x<ToolbarSet.length;x++){var oToolbarItems=ToolbarSet[x];var oToolbar;if (typeof(oToolbarItems)=='string'){if (oToolbarItems=='/') oToolbar=new FCKToolbarBreak();}else{var width=0;var oToolbar=new FCKToolbar(width);for (var j=0;j<oToolbarItems.length;j++){var sItem=oToolbarItems[j];if (sItem=='-') oToolbar.AddSeparator();else if (sItem=='100%') oToolbar.AddEmpty();else if (sItem=='|') oToolbar.AddBigSeparator();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();};
var FCKDialog=new Object();FCKDialog.OpenDialog=function(dialogName,dialogTitle,dialogPage,width,height,customValue,parentWindow){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);};
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");};
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;};FCKContextMenuItem.prototype.CreateTableRow=function(targetTable){this._Row=targetTable.insertRow(-1);this._Row.className='CM_Disabled';this._Row.FCKContextMenuItem=this;this._Row.onmouseover=function(){if (this.className!='CM_Disabled') this.className='CM_Over';};this._Row.onmouseout=function(){if (this.className!='CM_Disabled') this.className='CM_Option';};this._Row.onclick=function(){if (this.className!='CM_Disabled'){this.FCKContextMenuItem.ContextMenu.Hide();this.FCKContextMenuItem.Command.Execute();};return false;};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;};};
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(){};
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();};}
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 'Document':oGroup=new FCKContextMenuGroup();with (oGroup){Add(new FCKContextMenuSeparator());Add(new FCKContextMenuItem(this,'Document',FCKLang.EditDocument,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 '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;};function DocumentState(){oDocument=FCK.Selection.MoveToAncestorNode('A');if (oDocument) {FCK.Selection.MoveToNode(oDocument);if (oDocument.getAttribute('label',2)=='Doc') return true;else return false;};};function LinkState(){oLink=FCK.Selection.MoveToAncestorNode('A');if (oLink) return true;else return false;};FCKContextMenu.RefreshState=function(){var oTag=FCKSelection.GetSelectedElement();var sTagName;if (oTag){sTagName=oTag.tagName;};var bIsAnchor=(sTagName=='A'&&oTag.name.length>0&&oTag.href.length==0);if (this.Groups['Anchor']) this.Groups['Anchor'].SetVisible(bIsAnchor);if (this.Groups['Link']) this.Groups['Link'].SetVisible(!bIsAnchor&&LinkState()==true);if (this.Groups['TableCell']) this.Groups['TableCell'].SetVisible(sTagName!='TABLE'&&FCKSelection.HasAncestorNode('TABLE'));if (this.Groups['Table']) this.Groups['Table'].SetVisible(sTagName=='TABLE');if (this.Groups['Image']) this.Groups['Image'].SetVisible(sTagName=='IMG');if (this.Groups['Document']) this.Groups['Document'].SetVisible(true&&LinkState()==true);if (this.Groups['BulletedList']) this.Groups['BulletedList'].SetVisible(FCKSelection.HasAncestorNode('UL'));if (this.Groups['NumberedList']) this.Groups['NumberedList'].SetVisible(FCKSelection.HasAncestorNode('OL'));if (this.Groups['Select']) this.Groups['Select'].SetVisible(sTagName=='SELECT');if (this.Groups['Textarea']) this.Groups['Textarea'].SetVisible(sTagName=='TEXTAREA');if (this.Groups['Form']) this.Groups['Form'].SetVisible(FCKSelection.HasAncestorNode('FORM'));if (this.Groups['Checkbox']) this.Groups['Checkbox'].SetVisible(sTagName=='INPUT'&&oTag.type=='checkbox');if (this.Groups['Radio']) this.Groups['Radio'].SetVisible(sTagName=='INPUT'&&oTag.type=='radio');if (this.Groups['TextField']) this.Groups['TextField'].SetVisible(sTagName=='INPUT'&&(oTag.type=='text'||oTag.type=='password'));if (this.Groups['HiddenField']) this.Groups['HiddenField'].SetVisible(sTagName=='INPUT'&&oTag.type=='hidden');if (this.Groups['ImageButton']) this.Groups['ImageButton'].SetVisible(sTagName=='INPUT'&&oTag.type=='image');if (this.Groups['Button']) this.Groups['Button'].SetVisible(sTagName=='INPUT'&&(oTag.type=='button'||oTag.type=='submit'||oTag.type=='reset'));for (var o in this.Groups){this.Groups[o].RefreshState();};};
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=function() { return false;};};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();}
if (!FCKConfig.PluginsPath.endsWith('/')) FCKConfig.PluginsPath+='/';var FCKPlugin=function(name,availableLangs,basePath){this.Name=name;this.BasePath=basePath?basePath:FCKConfig.PluginsPath;this.Path=this.BasePath+name+'/';if (!availableLangs||availableLangs.length==0) this.AvailableLangs=new Array();else this.AvailableLangs=availableLangs.split(',');};FCKPlugin.prototype.Load=function(){if (this.AvailableLangs.length>0){if (this.AvailableLangs.indexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) var sLang=FCKLanguageManager.ActiveLanguage.Code;else var sLang=this.AvailableLangs[0];FCKScriptLoader.AddScript(this.Path+'lang/'+sLang+'.js');};FCKScriptLoader.AddScript(this.Path+'fckplugin.js');}
var FCKPlugins=FCK.Plugins=new Object();FCKPlugins.ItemsCount=0;FCKPlugins.Loaded=false;FCKPlugins.Items=new Object();for (var i=0;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;}
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);}
Property changes on: trunk/admin/editor/cmseditor/editor/js/fckeditorcode_ie_2.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.11
\ No newline at end of property

Event Timeline