(function (document, $) {
    var filesCount = 0;
	Joomla.submitbutton = function(task)
	{
		var form = document.adminForm;
		if (form.category_id.value == 0)
		{
			alert("<?php echo JText::_('EDOCMAN_PLEASE_SELECT_CATEGORY'); ?>");
			form.category_id.focus();
			return;
		}
		Joomla.submitform(task, form);
	}
})(document, jQuery);