function ajaxFileUpload()
            {
                $("#loading")
                .ajaxStart(function(){
                    $(this).show();
                })
                .ajaxComplete(function(){
                    $(this).hide();
                });

                $.ajaxFileUpload
                (
                {
                    url:'/Themes/default/doajaxfileupload.php',
                    secureuri:false,
                    fileElementId:'fileToUpload',
                    dataType: 'json',
                    data:{name:'logan', id:'id'},
                    success: function (data, status)
                    {
                        if(typeof(data.error) != 'undefined')
                        {
                            if(data.error != '')
                            {
                                $('#suc').html(data.error).css('display', '');
                            }else
                            {
								var message = "[img]" + data.msg + "[/img]";
                                $('#suc').html('<a onclick="replaceText(\''+ message +'\', document.forms.postmodify.message); return false;" title="Вставить картинку в пост">' + message + '</a>').css('display', '');
                            }
                        }
                    },
                    error: function (data, status, e)
                    {
                        alert(e);
                    }
                }
            )
		
                return false;

            }
