	__printAction : function( )	{		var docObj = document.getElementById( "Document" );		if ( !docObj || birtUtility.trim( docObj.innerHTML ).length <= 0)		{			alert ( Constants.error.generateReportFirst );			return false;		}			else		{				var divObj = document.createElement( "DIV" );			document.body.appendChild( divObj );			divObj.style.display = "none";					var formObj = document.createElement( "FORM" );			divObj.appendChild( formObj );			// Replace format in URL with selected print format			var action = soapURL;			var reg = new RegExp( "([&|?]{1}" + Constants.PARAM_FORMAT + "\s*)=([^&|^#]*)", "gi" );			if( action.search( reg ) < 0 )			{				action = action + "&" + Constants.PARAM_FORMAT + "=" + this.__printFormat;			}			else			{				action = action.replace( reg, "$1=" + this.__printFormat );			}						// Delete page and pagerange settings in url if existed			reg = new RegExp( "([&|?]{1})" + Constants.PARAM_PAGE + "\s*=[^&|^#]*", "gi" );			action = action.replace( reg, "$1");						reg = new RegExp( "([&|?]{1})" + Constants.PARAM_PAGERANGE + "\s*=[^&|^#]*", "gi" );			action = action.replace( reg, "$1");										if( $( 'printPageCurrent' ).checked )			{				// Set page setting				var currentPage = birtUtility.trim( $( 'pageNumber' ).innerHTML );				action = action + "&" + Constants.PARAM_PAGE + "=" + currentPage;							}			else if( $( 'printPageRange' ).checked )			{				// Set page range setting				var pageRange = birtUtility.trim( $( 'printPageRange_input' ).value );				if ( !birtUtility.checkPageRange( pageRange ) )				{					alert( Constants.error.invalidPageRange );					return false;				}				action = action + "&" + Constants.PARAM_PAGERANGE + "=" + pageRange;			}						var oSelect = this.__instance.getElementsByTagName( 'select' )[0];			var fittopage = "false";			var pagebreakonly = "false";						// fit to page width			if( oSelect.value == this.FIT_TO_WIDTH )			{				fittopage = "true";			}			else if( oSelect.value == this.FIT_TO_WHOLE )			{				fittopage = "true";				pagebreakonly = "true";			}			reg = new RegExp( "([&|?]{1}" + Constants.PARAM_FITTOPAGE + "\s*)=([^&|^#]*)", "gi" );			if( action.search( reg ) < 0 )			{				action = action + "&" + Constants.PARAM_FITTOPAGE + "=" + fittopage;			}			else			{				action = action.replace( reg, "$1=" + fittopage );			}						reg = new RegExp( "([&|?]{1}" + Constants.PARAM_PAGEBREAKONLY + "\s*)=([^&|^#]*)", "gi" );			if( action.search( reg ) < 0 )			{				action = action + "&" + Constants.PARAM_PAGEBREAKONLY + "=" + pagebreakonly;			}			else			{				action = action.replace( reg, "$1=" + pagebreakonly );			}																			// Force "__overwrite" as false			reg = new RegExp( "([&|?]{1}" + Constants.PARAM_OVERWRITE + "\s*)=([^&|^#]*)", "gi" );			if( action.search( reg ) < 0 )			{				action = action + "&" + Constants.PARAM_OVERWRITE + "=false";			}			else			{				action = action.replace( reg, "$1=false" );			}			// Replace servlet pattern as output			action = action.replace( /[\/][a-zA-Z]+[?]/, "/"+Constants.SERVLET_OUTPUT+"?" );			var previewExists = false;			// retrieve previous window instance			var previousPrintWindow = window.open( '', Constants.WINDOW_PRINT_PREVIEW );			try			{				// if the window didn't exist, then window.open() has opened an empty window				var previousBodyElement = previousPrintWindow.document.getElementsByTagName("body")[0];								if ( previousBodyElement && birtUtility.trim( previousBodyElement.innerHTML ).length > 0 )				{					previewExists = true;				}			}			catch ( e )			{				// access denied is thrown if the previous preview window contains a PDF content				previewExists = true;			}			if ( previewExists )			{				alert( Constants.error.printPreviewAlreadyOpen );				if ( previousPrintWindow && previousPrintWindow.focus )				{										try					{						previousPrintWindow.focus();					}					catch ( e )					{						// an exception may be produced by in focus() method						// of an IE window containing a PDF document					}				}								return false;			}			else			{				// use the created window as current window				this.__printWindow = previousPrintWindow;			}			if ( !BrowserUtility.__isIE() )			{				// use onload event for the callback when page is loaded				Event.observe( this.__printWindow, 'load', this.__cb_print.bindAsEventListener( this ), false );			}						formObj.action = action;			formObj.method = "post";			formObj.target = Constants.WINDOW_PRINT_PREVIEW;						formObj.submit( );						// Launch the browser's print dialog (IE only)			// Note: calling the print dialog for PDF in IE doesn't work (permission denied)			if ( BrowserUtility.__isIE() && this.__printFormat != 'pdf' )			{				this.__timer = window.setTimeout( this.__cb_waitPreviewLoaded.bindAsEventListener( this ), 1000 );			}					}				return true;			},
9270	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9270/04eaea1343a21dd4e7dea78e3bc9b975226afc3b/BirtPrintReportDialog.js/clean/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/ajax/ui/dialog/BirtPrintReportDialog.js