1/*
2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
4 *
5 * == BEGIN LICENSE ==
6 *
7 * Licensed under the terms of any of the following licenses at your
8 * choice:
9 *
10 *  - GNU General Public License Version 2 or later (the "GPL")
11 *    http://www.gnu.org/licenses/gpl.html
12 *
13 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14 *    http://www.gnu.org/licenses/lgpl.html
15 *
16 *  - Mozilla Public License Version 1.1 or later (the "MPL")
17 *    http://www.mozilla.org/MPL/MPL-1.1.html
18 *
19 * == END LICENSE ==
20 *
21 * Debug window control and operations.
22 */
23
24var FCKDebug = new Object() ;
25
26FCKDebug._GetWindow = function()
27{
28	if ( !this.DebugWindow || this.DebugWindow.closed )
29		this.DebugWindow = window.open( FCKConfig.BasePath + 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=yes,resizable=yes,location=no,toolbar=no,width=600,height=500', true ) ;
30
31	return this.DebugWindow ;
32}
33
34FCKDebug.Output = function( message, color, noParse )
35{
36	if ( ! FCKConfig.Debug )
37		return ;
38
39	try
40	{
41		this._GetWindow().Output( message, color ) ;
42	}
43	catch ( e ) {}	 // Ignore errors
44}
45
46FCKDebug.OutputObject = function( anyObject, color )
47{
48	if ( ! FCKConfig.Debug )
49		return ;
50
51	try
52	{
53		this._GetWindow().OutputObject( anyObject, color ) ;
54	}
55	catch ( e ) {}	 // Ignore errors
56}