Runner.buttonEvents["Nota_de_Pago"] = function( pageObj, proxy, pageid ) {
	//register a new button
	pageObj.buttonNames[ pageObj.buttonNames.length ] = 'Nota_de_Pago';
	
	if ( !pageObj.buttonEventBefore['Nota_de_Pago'] ) {
		pageObj.buttonEventBefore['Nota_de_Pago'] = function( params, ctrl, pageObj, proxy, pageid, rowData, row, submit ) {		
			var ajax = ctrl;

		}
	}
	
	if ( !pageObj.buttonEventAfter['Nota_de_Pago'] ) {
		pageObj.buttonEventAfter['Nota_de_Pago'] = function( result, ctrl, pageObj, proxy, pageid, rowData, row, params ) {
			var ajax = ctrl;




var popup = Runner.displayPopup( {
  url: "nota_pago_pdf.php",
  width: 900,
  height: 620,
  header: 'Nota de Pago'
});

		}
	}
	
	$('a[id="Nota_de_Pago"]').each( function() {
		if ( $(this).closest('.gridRowAdd').length ) {
			return;
		}
		
		this.id = "Nota_de_Pago" + "_" + Runner.genId();
		
		// create object
		var button_Nota_de_Pago = new Runner.form.Button({
			id: this.id ,
			btnName: "Nota_de_Pago"
		});
		
		// init
		button_Nota_de_Pago.init( {args: [ pageObj, proxy, pageid ]} );
	});
};

