﻿// JavaScript Document

    var delta=0.05
    var collection;
    function floaters() {
        this.items    = [];
        this.addItem    = function(id,x,y,content)
                  {
                    document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');
                    
                    var newItem                = {};
                    newItem.object            = document.getElementById(id);
                    newItem.x                = x;
                    newItem.y                = y; 
                    this.items[this.items.length]        = newItem;
                  }
        this.play    = function()
                  {
                    collection                = this.items
                    setInterval('play()',10);
                  }
        }
        function play()
        {
            if(screen.width<=800)
            {
                for(var i=0;i<collection.length;i++)
                {
                    collection[i].object.style.display    = 'none';
                }
                return;
            }
            for(var i=0;i<collection.length;i++)
            {
                var followObj        = collection[i].object;
                var followObj_x        = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
                var followObj_y        = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y); 
                if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
                    var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
                    dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
                    followObj.style.left=followObj.offsetLeft+dx;
                    } 
                if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
                    var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
                    dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
                    followObj.style.top=followObj.offsetTop+dy;
                    }
                followObj.style.display    = '';
            }
        }    
        
    var theFloaters        = new floaters();
    theFloaters.addItem('followDiv1','document.body.clientWidth-106',80,'<br><a href="#"></a>');
    theFloaters.addItem('followDiv2','document.body.clientWidth-180',300,'<br><table width="132" height="172" border="0" cellpadding="0" cellspacing="0"><tr><td height="172" align="center" valign="top" background="/cn/images/pdbg.gif"><table width="90%" border="0" cellspacing="0" cellpadding="0"><tr><td width="14%" height="41">&nbsp;</td><td width="86%">&nbsp;</td></tr><tr><td colspan="2" align="center" valign="top"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td width="32" height="30" align="center" class="details"><a target="blank" href="tencent://message/?uin=724385855&amp;Site=沈阳海佛美容美发化妆学校&amp;Menu=yes"><img id="q_1" src="/cn/images/qq.gif" width="24" height="24" border="0" /></a></td><td width="75" class="details"><a target="blank" href="tencent://message/?uin=724385855&amp;Site=沈阳海佛美容美发化妆学校&amp;Menu=yes" class="w">美发专业咨询</a></td></tr><tr><td width="32" height="30" align="center" class="details"><a target="blank" href="tencent://message/?uin=876096465&amp;Site=沈阳海佛美容美发化妆学校&amp;Menu=yes"><img id="q_2" src="/cn/images/qq.gif" width="24" height="24" border="0" /></a></td><td class="details"><a target="blank" href="tencent://message/?uin=876096465&amp;Site=沈阳海佛美容美发化妆学校&amp;Menu=yes" class="w">美容专业咨询</a></td></tr><tr><td width="32" height="30" align="center" class="details"><a target="blank" href="tencent://message/?uin=670787759&amp;Site=沈阳海佛美容美发化妆学校&amp;Menu=yes"><img id="q_3" src="/cn/images/qq.gif" width="24" height="24" border="0" /></a></td><td class="details"><a target="blank" href="tencent://message/?uin=670787759&amp;Site=沈阳海佛美容美发化妆学校&amp;Menu=yes" class="w">化妆专业咨询</a></td></tr><tr><td height="30" align="center" class="details"><a target="blank" href="tencent://message/?uin=874943208&amp;Site=沈阳海佛美容美发化妆学校&amp;Menu=yes"><img id="q_1" src="/cn/images/qq.gif" width="24" height="24" border="0" /></a></td><td class="details"><a target="blank" href="tencent://message/?uin=874943208&amp;Site=沈阳海佛美容美发化妆学校&amp;Menu=yes" class="w">整体形象咨询</a></td></tr></table></td></tr></table></td></tr></table>'); 
	theFloaters.play();    
