function chequeaEventosAjax(usaCargador){
	var clase=this;
	if(usaCargador){
		$(this).ajaxStart(function(){
		   cmw.cargando(true);
		  // $().cmDebug({tipo:'ajax', texto:'<strong>AJAX:</strong> iniciando carga por 1era vez'})
		});
		
		$(this).ajaxStop(function(event, request, settings){
			cmw.cargando(false);
		});
	}else{
		$(this).ajaxStart(function(){
			cmw.cargando(false);					   
			//$().cmDebug({tipo:'ajax', texto:'<strong>AJAX:</strong> iniciando carga por 1era vez'})
		});
	}
	$(this).ajaxSend(function(evt, request, settings){
		//$().cmDebug({tipo:'ajax', texto:'<strong>AJAX:</strong> iniciando petici&oacute;n. URL: '+settings.url+' <strong>Datos enviados: </strong>'+settings.data})
	});
	
	$(this).ajaxComplete(function(event,request, settings){
		//$().cmDebug({tipo:'ajax', texto:'<strong>AJAX:</strong> petici&oacute;n completa: '+settings.url+' <strong>Datos enviados: </strong>'+settings.data})
	});
	
	$(this).ajaxError(function(event, request, settings){
		$().cmDebug({tipo:'ajax', texto:'<strong>AJAX:</strong> error en petici&oacute;n: '+settings.url})
	});
}

function matarAjax(){
	var clase = this;
	
	clase.controlAjax.clear('colaAjax',true);
	
	$().cmDebug({tipo:'ajax', 
		texto:'<strong>AJAX:</strong> Canceladas todas las peticiones'
	})
}
