function AjaxForm_Post(el)
{	
	var array = new Array();
	// zebranie danych z formularza		
	$(el.form).find('input,select,textarea').each(function(){
		var obj = new Object();
		obj.name = this.name;
		
		if (this.tagName=='INPUT' && this.type=='checkbox')
			obj.value = this.checked ? this.value : '';
		else
			obj.value = this.name == '_ajax' ? 'true' : this.value;
			
		array.push(obj);
	});
			
	return !$.post(
		window.location.href, 
		array,
		function(data) 
		{
			var json = eval("(" + data + ")");
			if (json.error > 0)
			{
				if (json.error == 1)
					alert(json.description);
				if (json.error == 2)
					$('#TB_ajaxContent').load(json.description,null,window[json.initFunction]);					
			}
			else
				window.location.reload();
		}
	);
}