 this.__timer = window.setTimeout( this.__cb_print.bindAsEventListener( this ), 1000 ); 
 this.__timer = window.setTimeout( this.__cb_print.bindAsEventListener( this ), 1000 ); 
	__printAction : function( )	{							var docObj = document.getElementById( "Document" );		if ( !docObj || birtUtility.trim( docObj.innerHTML ).length <= 0)		{			alert ( "Report document should be generated first." );				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 );				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+"?" );						// Open a new window to print			this.__printWindow = window.open('','birtPrint');												formObj.action = action;			formObj.method = "post";			formObj.target = "birtPrint";						formObj.submit( );						// Launch print dialog.			this.__timer = window.setTimeout( this.__cb_print.bindAsEventListener( this ), 1000 );								}				return true;			},
9270	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9270/429a9becb7f06174d01e6c2c421c34ad4240b28b/BirtPrintReportDialog.js/buggy/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/ajax/ui/dialog/BirtPrintReportDialog.js