 var curPrinter = this.__findPrinter( this.__printer.getName( ) ); if( curPrinter ) { var param = document.createElement( "INPUT" ); formObj.appendChild( param ); param.TYPE = "HIDDEN"; param.name = Constants.PARAM_PRINTER_NAME; param.value = this.__printer.getName( );  if( curPrinter.isCopiesSupported( ) ) { param = document.createElement( "INPUT" ); formObj.appendChild( param ); param.TYPE = "HIDDEN"; param.name = Constants.PARAM_PRINTER_COPIES; param.value = this.__printer.getCopies( ); }  if( curPrinter.isCollateSupported( ) ) { param = document.createElement( "INPUT" ); formObj.appendChild( param ); param.TYPE = "HIDDEN"; param.name = Constants.PARAM_PRINTER_COLLATE; param.value = new String( this.__printer.isCollate( ) ); }  if( curPrinter.isDuplexSupported( ) ) { param = document.createElement( "INPUT" ); formObj.appendChild( param ); param.TYPE = "HIDDEN"; param.name = Constants.PARAM_PRINTER_DUPLEX; param.value = this.__printer.getDuplex( ); }  if( curPrinter.isModeSupported( ) ) { param = document.createElement( "INPUT" ); formObj.appendChild( param ); param.TYPE = "HIDDEN"; param.name = Constants.PARAM_PRINTER_MODE; param.value = this.__printer.getMode( ); }  if( curPrinter.isMediaSupported( ) ) { param = document.createElement( "INPUT" ); formObj.appendChild( param ); param.TYPE = "HIDDEN"; param.name = Constants.PARAM_PRINTER_MEDIASIZE; param.value = this.__printer.getMediaSize( ); } }  
 this.__printWindow = window.open('','birtPrint');  
	__printAction : function( )	{			if( !this.__printer )			return false;						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 "html" to selected output format			var action = soapURL;			var reg = new RegExp( "([&|?]{1}" + Constants.PARAM_FORMAT + "\s*)=([^&|^#]*)", "gi" );			if( action.search( reg ) < 0 )			{				action = action + "&" + Constants.PARAM_FORMAT + "=" + Constants.FORMAT_POSTSCRIPT;			}			else			{				action = action.replace( reg, "$1=" + Constants.FORMAT_POSTSCRIPT );			}						// 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 fittopage = "false";			var pagebreakonly = "false";						// fit to page width			if( $( 'printFitToWidth' ).checked )			{				fittopage = "true";			}			else if( $( 'printFitToWhole' ).checked )			{				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" );			}						// Set action as print			reg = new RegExp( "([&|?]{1}" + Constants.PARAM_ACTION + "\s*)=([^&|^#]*)", "gi" );			if( action.search( reg ) < 0 )			{				action = action + "&" + Constants.PARAM_ACTION + "=" + Constants.ACTION_PRINT;			}			else			{				action = action.replace( reg, "$1=" + Constants.ACTION_PRINT );			}									// Post printer settings			var curPrinter = this.__findPrinter( this.__printer.getName( ) );			if( curPrinter )			{				var param = document.createElement( "INPUT" );				formObj.appendChild( param );				param.TYPE = "HIDDEN";				param.name = Constants.PARAM_PRINTER_NAME;				param.value = this.__printer.getName( );									if( curPrinter.isCopiesSupported( ) )				{									param = document.createElement( "INPUT" );					formObj.appendChild( param );					param.TYPE = "HIDDEN";					param.name = Constants.PARAM_PRINTER_COPIES;					param.value = this.__printer.getCopies( );				}								if( curPrinter.isCollateSupported( ) )				{									param = document.createElement( "INPUT" );					formObj.appendChild( param );					param.TYPE = "HIDDEN";					param.name = Constants.PARAM_PRINTER_COLLATE;					param.value = new String( this.__printer.isCollate( ) );				}								if( curPrinter.isDuplexSupported( ) )				{									param = document.createElement( "INPUT" );					formObj.appendChild( param );					param.TYPE = "HIDDEN";					param.name = Constants.PARAM_PRINTER_DUPLEX;					param.value = this.__printer.getDuplex( );				}				if( curPrinter.isModeSupported( ) )				{									param = document.createElement( "INPUT" );					formObj.appendChild( param );					param.TYPE = "HIDDEN";					param.name = Constants.PARAM_PRINTER_MODE;					param.value = this.__printer.getMode( );				}									if( curPrinter.isMediaSupported( ) )				{									param = document.createElement( "INPUT" );					formObj.appendChild( param );					param.TYPE = "HIDDEN";					param.name = Constants.PARAM_PRINTER_MEDIASIZE;					param.value = this.__printer.getMediaSize( );				}			}									formObj.action = action;			formObj.method = "post";			formObj.target = "birt_confirmation_iframe";						formObj.submit( );		}				return true;			},
9270	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9270/4633b0edbf0d15c46a51c0cdd5279a58dce67a12/BirtPrintReportDialog.js/buggy/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/ajax/ui/dialog/BirtPrintReportDialog.js