function addIntoTrash(articleId) {
	var inputCount = $('countArticleTrash'+articleId);
	var count = 0;
	if (inputCount) {
	  count = parseFloat(inputCount.value);
	  if (count == 0) {
	    alert('Заполните количество товара.');
	    inputCount.pulsate({ pulses: 5});
	    return false;
	  }
	}
	
	//формирование дополнительных полей
	var other_field_array = new Array();
	$(document.body).select('select[article_id="'+articleId+'"]').each(function(el) {
	  if (el.name.search("field_")!=-1) { 
	   other_field_array.push({
	     name: el.name.replace("field_",""),
	     value: el.options[el.selectedIndex].value,
	     description: el.options[el.selectedIndex].innerHTML
	   });
	  }
	});
	var params = {article: articleId, count: count, other_field: other_field_array};
	//$(form_id).update('<img src="/mod/js/question/ajax-loader.gif" /><span>Ждите идет отправка формы...</span>');
	if (inputCount) new Effect.Opacity(inputCount,{ from: 1, to: 0 });
	
	new Ajax.Request( '/magazineAjaxHandler.php',
		{
			//asynchronous: false,
			method: 'post',
			parameters: {args: Object.toJSON(params)},
			onException: (function(obj, exc) {
				window.alert('Ошибка добавления товара: ' + exc.number + "  "+exc.description);
			}).bind(this),
			onComplete: (function(answer) {
				if (200 == answer.status) {
				      if (inputCount) new Effect.Opacity(inputCount,{ from: 0, to: 1 });
				      alert(answer.responseText);
					  window.location.reload();
				}
			}).bind(this)
		}
	);
}
