//上传完图片后触发函数
    function TransValue(filename)
    {
        var imgsrc = "/ImageOfArticle/" + filename;
        var img1 = new EnhancedImage(imgsrc,onImageLoad);
        img1.load();
    }
        
    //预加载图片
    function EnhancedImage(src,onLoaded){
    var self = this;
    this.src = src;
    this.width = 0;
    this.height = 0;
    this.onLoaded = onLoaded;
    this.loaded = false;
    this.image = null;
    this.load = function(){
    
                            if(this.loaded)
                                return;
                            this.image = new Image();
                            this.image.src = this.src;
                            
                            var SnowWolfInterval = setInterval(loadImage,100);
                            function loadImage()
                                                {
                                                    if(self.width != 0 && self.height != 0)
                                                    {
                                                        clearInterval(SnowWolfInterval);
                                                        self.loaded = true;
                                                        self.onLoaded(self);//将实例传入回调函数
                                                    }
                                                    self.width = self.image.width;//是number类型
                                                    self.height = self.image.height;
                                                }                          }
    }
    
    //将图片添加到编辑器
    function onImageLoad(NewImage){
                                    var oEditor = FCKeditorAPI.GetInstance("FCKeditor1");
                                    oEditor.InsertElement(NewImage.image);
                                  }