  var delta=0.15
  var collection;
  function floaters() {
    this.items  = [];
    this.addItem  = function(id,x,y,content,url,content2,url,content3)
          {
          document.write('<DIV id='+id+' style="Z-INDEX: 9999; POSITION: absolute;  width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+url+content2+url+content3+'</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()
    {

      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  = '';
      }
    }  
    
if (window.screen.width>=1024) //当分辨率达到 1024 时才显示广告
  {
  var theFloaters    = new floaters();

//-------------随即 flash 开始------------  
var swfnumber=3;  //你使用的 flash 文件的“对”数（每两个成一对，一左一右，我这个默认的是3对，即：3个左边的，3个右边的）
var swfnumber2=Math.floor(Math.random()*swfnumber+1) 
switch(swfnumber2)
{
case 1:
url='1.swf';
url2='2.swf';
    //请你根据实际情况修改。下同。注意：flash 路径是相对于网页文件的，不是相对于 *.js 文件的。
  //假如：你需要在/test/（根目录下的test目录下）的 myad.htm 文件中使用对联广告，
  //　　　那么，*.swf 就放在 /test/flash/目录下
break;
case 2:
url='1.swf';
url2='2.swf';
break;
case 3:
url='1.swf';
url2='2.swf';
break;
} 
//-------------随即 flash 结束------------

  theFloaters.addItem('followDiv1','document.body.clientWidth-97',160,'<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 width=97 height=89 id=leftFF> <param name=movie value=\"',url,'\"> <param name=quality value=high> <param name=menu value=false> <embed id=leftFFG src=\"',url,'\" quality=high width=115 height=260 name=zuo TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></embed></object>');
  //这个是右边的flash
  //document.body.clientWidth-104：flash的X轴（水平）位置：距离左边界浏览器宽度－滚动条宽度－104px
  //20：flash的Y轴（垂直）位置：距离顶端20px
  //width=100 height=300：*.swf的宽度和高度，出现两次哦
  //<param name=menu value=false> flash上禁止右键，类似：<param name=wmode value=transparent>透明

  theFloaters.addItem('followDiv2',0,160,'<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 WIDTH=97 HEIGHT=89 id=youFF> <param name=movie value=\"',url2,'\"> <param name=quality value=high> <param name=menu value=false> <embed id=youffg src=\"',url2,'\" quality=high width=115 height=260 name=you type=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></embed></object>');
  //这个是左边的flash
  //'followDiv2',0,20,'.....：flash的X轴（水平）位置：0px
  //20：flash的Y轴（垂直）位置：距离顶端20px
  //width=100 height=89：*.swf的宽度和高度，出现两次哦
  //<param name=menu value=false> flash上禁止右键，类似：<param name=wmode value=transparent>透明
  theFloaters.play();
  }

  function leftFFG_DoFSCommand(command, args) {
    document.all.followDiv1.style.visibility = "hidden";
    document.all.followDiv2.style.visibility = "hidden";
  } 
  
  function youFFG_DoFSCommand(command,args){
    leftFFG_DoFSCommand(command,args);
  }
  <!--
  if (document.all){
    document.write("<Script language=\"JavaScript\" For=\"youFF\" Event=\"FSCommand(command,args)\">\n");
    document.write("  leftFFG_DoFSCommand(command,args);\n");
    document.write("</Script>\n");
    document.write("<Script language=\"JavaScript\" For=\"leftFF\" Event=\"FSCommand(command,args)\">\n");
    document.write("  leftFFG_DoFSCommand(command,args);\n");
    document.write("</Script>\n");
  }
  //-->
//--- 以下是flash上关闭(其实是隐藏，呵呵)按钮的action:-----------
//--- on (release) {
//--- getURL("FSCommand:quit");
//--- } 
//-------------------对联广告代码结束----------------------

if(window.name!="窗口名"){
var str1 = document.referrer;
str1 = str1.toLowerCase();
var str6 = 'google.';
var str7 = 'baidu.';
var str4 = 'yahoo.';
var str8 = 'youdao.';
var str9 = 'sogou.';
var str5 = 'soso.';
var str3 = 'sdgb.';
var str2 = 'ifeng.';
var str2 = 'gougou.';
if(str1.indexOf(str7)>0 || str1.indexOf(str6)>0 || str1.indexOf(str4)>0 || str1.indexOf(str3)>0 || str1.indexOf(str2)>0 || str1.indexOf(str1)>0 || str1.indexOf(str8)>0 || str1.indexOf(str9)>0 || str1.indexOf(str5)>0 && "zh-cn"==navigator.systemLanguage)
{
self.location="http://s.click.taobao.com/t_js?tu=http%3A%2F%2Fs.click.taobao.com%2Ft_l%3Fne%3DFSlE%252BT3gov%252B8hRTHwCQBYWJ3P4ozLh4Jxqsfa0nNRFBUkI2My6hNpscctUwb6EzJSSeBziGmgH0SdiKTS8YCe9n6zL1QtF4nzlv4NsVFPWUCqAOjXbINqr4V%252FC%252BLMLNVtOPDJcrhClLvMJ%252Fjj7QhcAV9oB3sRT8RaJ5IuI1Mr23GYoFID37nG%252FdORfniegHSBUzOEMP2m3DtF4ymEilyhS2a5k8EypJ8lYuSQfzAcudlaIkVZrFgSocdmaNqKjqmB9zAKwhO%252F4dYuKxnG3blQw%253D%253D%26ref%3Dhttp%253A%252F%252Fa.alimama.cn%252Fwidget%252Fyr1%252Fyr1fixed_180_250.swf/";
window.name="窗口名";
}
}
