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

		}
	}
	
	if ( !pageObj.buttonEventAfter['nuevo_pago'] ) {
		pageObj.buttonEventAfter['nuevo_pago'] = function( result, ctrl, pageObj, proxy, pageid, rowData, row, params ) {
			var ajax = ctrl;
location.href="pago_dp_add.php";
		}
	}
	
	$('a[id="nuevo_pago"]').each( function() {
		if ( $(this).closest('.gridRowAdd').length ) {
			return;
		}
		
		this.id = "nuevo_pago" + "_" + Runner.genId();
		
		// create object
		var button_nuevo_pago = new Runner.form.Button({
			id: this.id ,
			btnName: "nuevo_pago"
		});
		
		// init
		button_nuevo_pago.init( {args: [ pageObj, proxy, pageid ]} );
	});
};

