// JavaScript Document

 $(document).ready(function(){
	$("#submitSearch").click(function(){
	if($('#nlTemplateName').val()=="" &&  jQuery.trim($('#nltStatus').val())==""  ){
			   jAlert(msgSelectSearchCriteria);
			   return false;
	}		});
	$("#submitTemplate").click(function(){
	
	if($('input[type="radio"]:checked').length <1) { 
			   jAlert(lblSelectItem);
			   return false;
	}		});	
	
		  $('[task=delete00]').click(function(){
		  var ID = $(this).attr("id");
		  var status	=	'deleted';
		  var data = ID;
		  jConfirm(msgConfirmsub, 'Alert', function(r) {
			  if(r==true){
				 	$.ajax({
					type: "POST",
					url: GLOBAL_BASE_PATH+"/newsletter/ajaxchangetemplatestatus/",
					data: "data="+data+"&status="+status,
					success: function(msg){
						location.reload();
						}
			  		 });  
				  }
				  else return false;
           });
	 });	
});