    
    var FloatImg = function() {    
            this._interval_time= 10;//每次移动图像的间隔时间（ms），越小越平滑速度越慢,可适当修改为：10,20,30...
            //以下内容若不了解请不要修改
            this._x = 0;
            this._y = 0;
            this._interval_flag = 0;
            this._speed_x = 1;
            this._speed_y = 1;
            this._floatID_beforeStr = "floatimg";
            this._width = 0;
            this._height = 0;
            this._index = 0;
            this._objName = "";
            this._doc = document.documentElement;
        }
    FloatImg.prototype.show =
             function(objname,img,clicktourl,width,height,speed,index){
             
                 this._speed_x = speed;
                 this._speed_y = speed;
                 
                 this._width = width;
                 this._height = height;
                 this._index = index;
                 
                 var cw = this._doc.clientWidth-10;
                 var ch = this._doc.clientHeight-10;
                 this._x = cw/(index+1);
                 this._y = ch/(index+1);
                 this._objName = objname;
                 
                 if(!this.G(this._floatID_beforeStr+this._index)){
                    document.write("<div onmouseover=\""+this._objName+".stop();\" onmouseout=\""+this._objName+".start();\" id=\""+this._floatID_beforeStr+index+"\" style=\"position:absolute;z-index:10000;left:0px;top:0px;width:"+width+"px;height:"+height+"px;overflow:hidden;\"><a href=\""+clicktourl+"\" target=_blank><img src=\""+img+"\" border=0/></a><iframe style='position:absolute;z-index:-1;width:100%;height:100%;top:0;left:0;scrolling:no;' frameborder='0' src='about:blank'></iframe></div>");
                 }else{
                    this.G(this._floatID_beforeStr+index).innerHTML = "<a href=\""+clicktourl+"\" target=_blank><img src=\""+img+"\" border=0/></a>";
                 }                
                 this.start();
            };
    FloatImg.prototype.start=
            function(){
                this._interval_flag = window.setInterval("FloatImg.interval("+this._objName+")",this._interval_time);
            };
    FloatImg.prototype.G=
            function(v){ return document.getElementById(v);};
    FloatImg.interval =
            function(a){           
                var cw = a._doc.clientWidth-10;
                var ch = a._doc.clientHeight-10;
                if(a.G(a._floatID_beforeStr+a._index)){
                
                    if(a._x < 0 || a._x+a._width > cw){
                        if(a._x + a._width > cw)
                            a._x = cw - a._width;
                        else
                            a._x = 0;
                        a._speed_x = -a._speed_x;
                        }
                    if(a._y < 0 || a._y+a._height > ch){
                        if(a._y+a._height > ch)
                            a._y = ch - a._height;
                        else
                            a._y = 0;
                        a._speed_y = -a._speed_y;
                        }
                    
                    var fobj = a.G(a._floatID_beforeStr+a._index);
                    a._x = a._x + a._speed_x;
                    a._y = a._y + a._speed_y;
                    fobj.style.left = (a._x + a._doc.scrollLeft) + "px";
                    fobj.style.top =  (a._y+  + a._doc.scrollTop) + "px";                
                    
                }
            };
    FloatImg.prototype.stop=
            function (){
                window.clearInterval(this._interval_flag);
            };
