function(message, width, close, icon)
	{
		var div = document.createElement('div');
		div.style.padding = '20px';

		var img = document.createElement('img');
		img.setAttribute('src', icon || mxUtils.errorImage);
		img.setAttribute('valign', 'bottom');
		img.style.verticalAlign = 'middle';
		div.appendChild(img);

		div.appendChild(document.createTextNode('\u00a0')); // &nbsp;
		div.appendChild(document.createTextNode('\u00a0')); // &nbsp;
		div.appendChild(document.createTextNode('\u00a0')); // &nbsp;
		mxUtils.write(div, message);

		var w = document.body.clientWidth;
		var h = (document.body.clientHeight || document.documentElement.clientHeight);
		var warn = new mxWindow(mxResources.get(mxUtils.errorResource) ||
			mxUtils.errorResource, div, (w-width)/2, h/4, width, null,
			false, true);

		if (close)
		{
			mxUtils.br(div);
			
			var tmp = document.createElement('p');
			var button = document.createElement('button');

			if (mxClient.IS_IE)
			{
				button.style.cssText = 'float:right';
			}
			else
			{
				button.setAttribute('style', 'float:right');
			}

			mxEvent.addListener(button, 'click', function(evt)
			{
				warn.destroy();
			});

			mxUtils.write(button, mxResources.get(mxUtils.closeResource) ||
				mxUtils.closeResource);
			
			tmp.appendChild(button);
			div.appendChild(tmp);
			
			mxUtils.br(div);
			
			warn.setClosable(true);
		}
		
		warn.setVisible(true);
		
		return warn;
	}
function(message, width, close, icon)
	{
		var div = document.createElement('div');
		div.style.padding = '20px';

		var img = document.createElement('img');
		img.setAttribute('src', icon || mxUtils.errorImage);
		img.setAttribute('valign', 'bottom');
		img.style.verticalAlign = 'middle';
		div.appendChild(img);

		div.appendChild(document.createTextNode('\u00a0')); // &nbsp;
		div.appendChild(document.createTextNode('\u00a0')); // &nbsp;
		div.appendChild(document.createTextNode('\u00a0')); // &nbsp;
		mxUtils.write(div, message);

		var w = document.body.clientWidth;
		var h = (document.body.clientHeight || document.documentElement.clientHeight);
		var warn = new mxWindow(mxResources.get(mxUtils.errorResource) ||
			mxUtils.errorResource, div, (w-width)/2, h/4, width, null,
			false, true);

		if (close)
		{
			mxUtils.br(div);
			
			var tmp = document.createElement('p');
			var button = document.createElement('button');

			if (mxClient.IS_IE)
			{
				button.style.cssText = 'float:right';
			}
			else
			{
				button.setAttribute('style', 'float:right');
			}

			mxEvent.addListener(button, 'click', function(evt)
			{
				warn.destroy();
			});

			mxUtils.write(button, mxResources.get(mxUtils.closeResource) ||
				mxUtils.closeResource);
			
			tmp.appendChild(button);
			div.appendChild(tmp);
			
			mxUtils.br(div);
			
			warn.setClosable(true);
		}
		
		warn.setVisible(true);
		
		return warn;
	}
function ( message , width , close , icon ) { var div = document . createElement ( 'div' ) ; div . style . padding = '20px' ; var img = document . createElement ( 'img' ) ; img . setAttribute ( 'src' , icon || mxUtils . errorImage ) ; img . setAttribute ( 'valign' , 'bottom' ) ; img . style . verticalAlign = 'middle' ; div . appendChild ( img ) ; div . appendChild ( document . createTextNode ( '\u00a0' ) ) ; // &nbsp; div . appendChild ( document . createTextNode ( '\u00a0' ) ) ; // &nbsp; div . appendChild ( document . createTextNode ( '\u00a0' ) ) ; // &nbsp; mxUtils . write ( div , message ) ; var w = document . body . clientWidth ; var h = ( document . body . clientHeight || document . documentElement . clientHeight ) ; var warn = new mxWindow ( mxResources . get ( mxUtils . errorResource ) || mxUtils . errorResource , div , ( w - width ) / 2 , h / 4 , width , null , false , true ) ; if ( close ) { mxUtils . br ( div ) ; var tmp = document . createElement ( 'p' ) ; var button = document . createElement ( 'button' ) ; if ( mxClient . IS_IE ) { button . style . cssText = 'float:right' ; } else { button . setAttribute ( 'style' , 'float:right' ) ; } mxEvent . addListener ( button , 'click' , function ( evt ) { warn . destroy ( ) ; } ) ; mxUtils . write ( button , mxResources . get ( mxUtils . closeResource ) || mxUtils . closeResource ) ; tmp . appendChild ( button ) ; div . appendChild ( tmp ) ; mxUtils . br ( div ) ; warn . setClosable ( true ) ; } warn . setVisible ( true ) ; return warn ; }
Function: error

Displays the given error message in a new <mxWindow> of the given width.
If close is true then an additional close button is added to the window.
The optional icon specifies the icon to be used for the window. Default
is <mxUtils.errorImage>.

Parameters:

message - String specifying the message to be displayed.
width - Integer specifying the width of the window.
close - Optional boolean indicating whether to add a close button.
icon - Optional icon for the window decoration.
Function : error
Creates a warning window