关于对联广告代码的问题
各位前辈,以下代码要怎么设置才能在论坛两侧显示出来呀!期待好心人的帮助,谢谢
//对联
function adClose()
{
var ad1 = document.getElementById("followDiv1");
var ad2 = document.getElementById("followDiv2");
ad1.style.visibility="hidden";
ad2.style.visibility="hidden";
}
var delta=0.15;
var collection;
var closeB=false;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; width:100px; height:250px;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()',30);
}
}
function play()
{
if(screen.width<=800 || closeB)
{
for(var i=0;i<collection.length;i++)
{
collection.object.style.display = 'none';
}
return;
}
for(var i=0;i<collection.length;i++)
{
var followObj = collection.object;
var followObj_x = (typeof(collection.x)=='string'?eval(collection.x):collection.x);
var followObj_y = (typeof(collection.y)=='string'?eval(collection.y):collection.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 = '';
}
}
function closeBanner()
{
closeB=true;
return;
}
var theFloaters = new floaters();
//
var left_img = "";
left_img += "<img src=\"images/ADTop.gif\" onclick=\"adClose()\" style=\"cursor:hand;\" /><br>";
left_img += "<a href=\"http://www.wxspa.com/\" target=\"_blank\"><image src=\"ad/xiaohan.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://www.jytjg.cn/\" target=\"_blank\"><image src=\"ad/tongjuge.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://www.czleiyu.cn/\" target=\"_blank\"><image src=\"ad/czly100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://www.nrhy1069.cn/\" target=\"_blank\"><image src=\"ad/sznrhy100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://photo.sina.com.cn/u/1358055767\" target=\"_blank\"><image src=\"ad/jytqy100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://www.ntxgspa.cn\" target=\"_blank\"><image src=\"ad/ntxg.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://tongle.boyspa.com/\" target=\"_blank\"><image src=\"ad/szym100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://hi.baidu.com/10690\" target=\"_blank\"><image src=\"ad/szhx100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://www1.51bf.net/\" target=\"_blank\"><image src=\"ad/jy100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://home.51.com/photo.php?user=juedui1069\" target=\"_blank\"><image src=\"ad/njjd100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"><br>";
left_img += "<a href=\"http://www.ntspa.cn/\" target=\"_blank\"><image src=\"ad/ntxyg100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://hi.baidu.com/lyboyg\" target=\"_blank\"><image src=\"ad/czhfly100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://www.jstz.org\" target=\"_blank\"><image src=\"ad/adwant100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<a href=\"http://www.szqtspa.com\" target=\"_blank\"><image src=\"ad/szqt100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
left_img += "<img src=\"images/close.gif\" onclick=\"adClose()\" style=\"cursor:hand;\" />";
var right_img = "";
right_img += "<img src=\"images/ADTop.gif\" onclick=\"adClose()\" style=\"cursor:hand;\" /><br>";
right_img += "<a href=\"http://www.suzhou1069.com/\" target=\"_blank\"><image src=\"ad/szjs100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.mensir.cn\" target=\"_blank\"><image src=\"ad/mensir100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.suying1069.cn/\" target=\"_blank\"><image src=\"ad/yzsy100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.czspa.cn\" target=\"_blank\"><image src=\"ad/njjrn100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.91boyspa.com/\" target=\"_blank\"><image src=\"ad/g03.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.xlspa.cn/\" target=\"_blank\"><image src=\"ad/njxl100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.0512spa.com/\" target=\"_blank\"><image src=\"ad/szjsmn100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.aishang1069.com/\" target=\"_blank\"><image src=\"ad/ntas100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.njgaybar.cn\" target=\"_blank\"><image src=\"ad/mx2.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.0513spa.cn\" target=\"_blank\"><image src=\"ad/nthlx100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.kuaiclub.com\" target=\"_blank\"><image src=\"ad/njlsboy100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://shop35276818.taobao.com/\" target=\"_blank\"><image src=\"ad/ky100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.nt1069.cn/\" target=\"_blank\"><image src=\"ad/ntlz100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
right_img += "<a href=\"http://www.szbenseboy.com\" target=\"_blank\"><image src=\"ad/szbs.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";
<!-- right_img += "<a href=\"http://www.sosogay.com/ChannelContent.asp?ID=3\" target=\"_blank\"><image src=\"ad/adwant100150.gif\" width=\"100\" vspace=\"3\" border=\"0\"></a><br>";-->
right_img += "<img src=\"images/close.gif\" onclick=\"adClose()\" style=\"cursor:hand;\" />";
theFloaters.addItem('followDiv1','document.body.clientWidth-105',5,right_img);
theFloaters.addItem('followDiv2',5,5,left_img);
theFloaters.play();