if(objdiv==null)return;
objdiv.style.pixelleft = ileft + document.body.scrollleft;
objdiv.style.pixeltop = itop + document.body.scrolltop;
if(irnd>98){leftflag=!leftflag;}
irnd=math.round(math.random()*100);
if(irnd>99){topflag=!topflag;}
if(leftflag){
ileft=ileft+leftstep*math.random();
}else{
ileft=ileft-leftstep*math.random();
}
if(topflag){
itop=itop+topstep*math.random();
}else{
itop=itop-topstep*math.random();
}
if(ileft<0){
ileft=0;
leftflag=true;
}
else if(ileft>width-offwidth){
ileft=width-offwidth;
leftflag=false;
}
if(itop<0){
itop=0;
topflag=true;
}
else if(itop>height-offheight){
itop=height-offheight;
topflag=false;
}
}
file://定时移动广告的图片
function starttimer(){
if(objname=="")return;
file://alert(objname+".floatscroll();");
file://inter=setinterval(objname+".floatscroll()",delay);
}
file://显示图片的html代码
function showimagehtml(adimgsrc,adhref,adtitle){
var swidth,sheight;
if(imagewidth<5){
swidth="";
}else{
swidth=" width='"+imagewidth+"'";
}
if(imageheight<5){
sheight="";
}else{
sheight=" height='"+imageheight+"'";
}
document.write("<div id='img"+divid+"' style='position:absolute;'>");
document.write("<a href='"+adhref+"' target='_blank' title='"+adtitle+"'>");
document.write("<img src='"+adimgsrc+"' border='0'"+swidth+sheight+">");
document.write("</a></div>");
}
file://显示flash文件的html代码
function showflashhtml(adimgsrc,adhref,adtitle){
var swidth,sheight;
if(imagewidth<5){
swidth=" width='80'";
}else{
swidth=" width='"+imagewidth+"'";
}
if(imageheight<5){
sheight=" height='80'";
}else{
sheight=" height='"+imageheight+"'";
}
document.write("<div id='img"+divid+"' style='position:absolute;'>");