jQuery.extend({
	initReverseSelection: function () {
		$("#cb_ReverseSelection").click(function () {
			$("input[name='cb_id']").each(function () {
				this.checked = !this.checked;
				$(this).triggerHandler("change");
			});
			return false;
		})
		.parents("form").submit(function () {
			var check = false;
			$("input[name='cb_id']").each(function () {
				if (this.checked) check = true;
			});
			if (!check) {
				ShowMsg("至少选择一项才能操作！");
			}
			return check;
		});
	}
});