<script>
function catdeleteimage(categories_id) {
  var status = $('#test'+categories_id).is(':checked');
  var flag = '0';
  if(status != false){
	 var flag = '1';
  }
  alert(flag);
  params = 'action=delete_image&categories_id='+categories_id+'&status=' + status+'&flag=' + flag;
		$.ajax({
			type: 'GET',
			url: '<?php echo tep_href_link("ajax_common.php");?>',
			data: params,
			success: function (retval) {
				alert(retval);
			}
		});
}
</script>