onswitch de tabla haz algo jQuery

$(window).blur(function(e) {
	alert('You have moved from this tab/window.');
});
godfreysseki