


$(document).ready(function(){
		
		$.idleTimeout('#idletimeout', '#idletimeout a', {
				idleAfter: 1200, //20 minutes
				pollingInterval: 60,
				keepAliveURL: 'lib/php/auth/keep_alive.php',
				serverResponseEquals: 'OK',
				onTimeout: function(){
					$(this).slideUp();
					window.location = "html/templates/Logout.php";
					},
						onIdle: function(){
						$(this).slideDown(); // show the warning bar
									},
						onCountdown: function( counter ){
						$(this).find("span").html( counter ); // update the counter
							},
						onResume: function(){
						$(this).slideUp(); // hide the warning bar
						}
				});

		$('#table_cases').dataTable( {
			"bProcessing": true,
			"bScrollInfinite": true,
			"bScrollCollapse": true,
			"sScrollY": "400px",
			"iDisplayLength": 50,
			"aaSorting": [[ 2, "asc" ]],
			"aoColumns": [
			{ "bSearchable": false, "bVisible":    false },
			null,
			null,
			null,
			null,
			null,
			null,
			null
			],
			"sDom": 'RTfilrtp',
			"oTableTools": {
						"sSwfPath": "lib/DataTables-1.7.5/extras/TableTools-2.0.0/media/swf/copy_cvs_xls_pdf.swf"
					},
			"sAjaxSource": 'lib/php/data/cases_load.php'
		} );
		
			
	})


@@ -1,9 +1,20 @@
 %0A
+var oTable;
 %0A%0A$(docu
@@ -643,16 +643,25 @@
 %09%09%7D);%0A%0A%09
+%09oTable =
 %09$('#tab
@@ -687,16 +687,18 @@
 e( %7B%0A%09%09%09
+%09%09
 %22bProces
@@ -705,32 +705,34 @@
 sing%22: true,%0A%09%09%09
+%09
+%09
 %22bScrollInfinite
@@ -743,16 +743,18 @@
 rue,%0A%09%09%09
+%09
+%09
 %22bScroll
@@ -773,16 +773,18 @@
 rue,%0A%09%09%09
+%09
+%09
 %22sScroll
@@ -796,16 +796,18 @@
 400px%22,%0A
+%09%09
 %09%09%09%22iDis
@@ -826,16 +826,18 @@
  50,%0A%09%09%09
+%09
+%09
 %22aaSorti
@@ -860,16 +860,18 @@
  %5D%5D,%0A%09%09%09
+%09%09
 %22aoColum
@@ -880,16 +880,18 @@
 %22: %5B%0A%09%09%09
+%09
+%09
 %7B %22bSear
@@ -929,24 +929,26 @@
 false %7D,%0A%09%09%09
+%09%09
 null,%0A%09%09%09nul
@@ -936,38 +936,42 @@
 ,%0A%09%09%09%09%09null,%0A%09%09%09
+%09
+%09
 null,%0A
+%09%09
 %09%09%09null,%0A%09%09%09null
@@ -958,38 +958,42 @@
 ,%0A%09%09%09%09%09null,%0A%09%09%09
+%09%09
 null,%0A
+%09%09
 %09%09%09null,%0A%09%09%09null
@@ -988,22 +988,26 @@
 ull,%0A%09%09%09
+%09%09
 null,%0A
+%09%09
 %09%09%09null%0A
@@ -1009,19 +1009,23 @@
 null%0A%09%09%09
+%09%09
 %5D,%0A
+%09%09
 %09%09%09%22sDom
@@ -1042,16 +1042,18 @@
 tp',%0A%09%09%09
+%09%09
 %22oTableT
@@ -1061,16 +1061,18 @@
 ols%22: %7B%0A
+%09%09
 %09%09%09%09%09%09%22s
@@ -1164,19 +1164,23 @@
 f%22%0A%09%09%09%09%09
+%09%09
 %7D,%0A
+%09%09
 %09%09%09%22sAja
@@ -1225,21 +1225,217 @@
 '%0A%09%09
-%7D );%0A%09%09%0A%09%09%09%0A%09%7D)
+%09%09%7D);%0A%09%09%0A%09%09%0A%09%0A%09%09$('#table_cases tbody').click( function () %7B%0A%09%09%09var iPos = oTable.fnGetPosition( event.target.parentNode );%0A%09%09%09var aData = oTable.fnGetData( iPos );%0A%09%09%09var iId = aData%5B0%5D;%0A%09%09%09alert(iId);%0A%09%09%7D)%0A%7D);
 %0A%0A

Add function to get id from table row when user clicks.