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

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

location.href="entrega_dp_add.php";

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

