$(document).ready(function() {

	$("table").tablesorter({

		// pass the headers argument and assing a object

		headers: {

			0: {

				// disable it by setting the property sorter to false

				sorter: false

				},

			1: {

				sorter: "shortDate"	

			}

		}

	});

});



function checkAll()

{

  $("form#frmListing INPUT[type='checkbox']").attr('checked', $('#chkAll').is(':checked')); 

}



function checkSel()

{

	var selected=0;

	formx = document.frmListing;

	for(var i=1;i<formx.length;i++)

	{

		if(formx.elements[i].type=="checkbox")

		{

			if((formx.elements[i].checked) && (formx.elements[i].name.indexOf("chkAll")<0))

					{

						selected++;

					}

		}

	}

	if(selected==0)

	{

		alert("Please select atleast 1 address book to send!");

		return false;

	}

	else

	{

		document.frmListing.submit();

	}

	return a;

}

