
<script LANGUAGE='JavaScript'>
//***************************
//图片间隔滚动
//***************************
document.ns = navigator.appName == "Microsoft Internet Explorer"
var marqueesHeight=80;//设置区块的高
var marqueesWidth=572;//设置区块的宽
function randomStr(str)//产生随机图片。
{
var showId=Math.floor(Math.random()*str.length);
var tempStr=str[showId];
str[showId]=str[0];
str[0]=tempStr;
}
function showStr(str,textWidth,num)
{
if(!document.ns){document.write(str[0]+'<br>')}
else{
document.write('<table border=0 cellspacing=0 cellpadding=0>'
+'<tr><td>'
+'<div id="icefable1'+num+'">'
+'<table width='+textWidth+' border=0 cellspacing=0 cellpadding=0>');
for(i=0;i<str.length;i++)
{
document.write('<tr><td height='+marqueesHeight+'>'+str[i]+'</td></tr>');
}
document.write('</table>'
+'</div>'
+'<div id="icefable2'+num+'" style="position:absolute;z-index:1;visibility:hidden"></div>'
+'</td></tr>'
+'</table>');
}
}
function init_srolltext(num)
{
countnum=0
eval('stopscroll'+num+'=false;')
eval('icefable1'+num+'.scrollTop=0;')
rotatenum=0
eval('icefable1'+num+'.style.width=0;')
eval('icefable1'+num+'.style.height=marqueesHeight;')
eval('icefable1'+num+'.style.overflowX="visible";')
eval('icefable1'+num+'.style.overflowY="hidden";')
eval('icefable1'+num+'.noWrap=true;')
eval('icefable1'+num+'.onmouseover=new Function("stopscroll=true");')
eval('icefable1'+num+'.onmouseout=new Function("stopscroll=false");')
eval('preTop'+num+'=0; ')
eval('currentTop'+num+'='+marqueesHeight+';')
eval('stoptime'+num+'=0;')
eval('icefable2'+num+'.innerHTML="";')
eval('icefable2'+num+'.innerHTML+=icefable1'+num+'.innerHTML;')
eval('icefable1'+num+'.innerHTML=icefable2'+num+'.innerHTML+icefable2'+num+'.innerHTML;')
eval('setInterval("scrollUp'+num+'()",4);')
}
function scrollUp1()
{
if(stopscroll1==true) return;
currentTop1+=1;
if(currentTop1==marqueesHeight+1)//当前行在第二个数组开始时,停止向上滚动。
{
stoptime1+=1;
currentTop1-=1;
if(stoptime1==marqueesHeight*strArray1.length)//停止条件。
{
currentTop1=0;
stoptime1=0;
}
}
else
{
preTop1=icefable11.scrollTop;
icefable11.scrollTop+=1;//不停向上滚动。
if(icefable11.scrollTop==marqueesHeight*strArray1.length)//达到最多图片数
{
preTop1=0; currentTop1=marqueesHeight; stoptime1=0;icefable11.scrollTop=0;
}
}
}
var strArray1=new Array();
//-----滚动图片地址开始
//<a onClick="closeBanner();" href="' + link1 + '" target=_blank><img src="' + img1 + '" width=100 height=300 border=0></a><br>
//strArray1[0]='<img src=http://www.neotv.cn/imageUp/imageNews/juesai.gif />';
strArray1[0]='<a onClick="closeBanner();" href=" http://www.neotv.cn/ " target=_blank><img src="http://www.neotv.cn/imageUp/imageNews/juesai.gif" width=572 height=80 border=0></a><br>'
strArray1[1]='<img src=http://adbanner.n169.com/images/TEL/tel002.gif />';
strArray1[2]='<img src=http://adbanner.n169.com/images/TEL/tel003.gif />';
strArray1[3]='<img src=http://adbanner.n169.com/images/TEL/tel004.gif />';
strArray1[4]='<img src=http://adbanner.n169.com/images/TEL/tel005.gif />';
strArray1[5]='<img src=http://adbanner.n169.com/images/TEL/tel006.gif />';
//-----滚动图片地址结束
randomStr(strArray1);//设置首幅随机图片,如按顺序滚动则可注释掉。
showStr(strArray1,marqueesWidth,1);
init_srolltext(1);//初始化数据
</script>



浙公网安备 33010602011771号