//configure the below five variables to change the style of the scroller
var scrollerwidth=150
var scrollerheight=200
var scrollerbgcolor='#F4F5E7'
//set below to '' if you don't wish to use a background image
var scrollerbackground=''
//configure the below variable to change the contents of the scroller
var messages=new Array()
messages[0]="<font face='Arial'>
<a href='http://www.csdn.net'>欢迎光临
程序员大本营!!</a></font>"
messages[1]="<font face='Arial'><a href='http://
www.blueidea.com'>
Blueidea.com - 蓝色经典 国内少有的网页设计,
艺术集会点,有不少高手哦~</a></font>"
messages[2]="<font face='Arial'><a href='http://www.macromedia.com/
ResearchTriangle/Facility/4490'>Macromedia.com 你是在用Dreamweaver和Flash吗?
那为什么不去它们的老家看看?</a></font>"
messages[3]="<font face='Arial'><a href='http://www.microsoft.com'>Microsoft.com
虽然经常被人骂,但是里
面的确有一些值得学习的东西</a></font>"
messages[4]="<font face='Arial'><a href='http://www.msdn.com/link.htm'>MSDN.com
Microsoft开的技术站,
是不少人研究的对象</a></font>"
var delay=3000 //set delay between message change (in miliseconds)
var fcontent=new Array()
begintag='<font face="Arial" size=2>' //set opening tag, such as font declarations
fcontent[0]="<b>www.csdn.net</b><br><br>欢迎您光临,感谢您提出宝贵意见<br><br>有意见和问题请在论坛中提出"
fcontent[1]="<b>www.csdn.net</b><br><br> 特效代码为网站设计师和网页爱好者提供专业的特效代码"
fcontent[2]="<b>www.csdn.net</b><br><br>欢迎您光临!
closetag='</font>'
var fwidth=150 //set scroller width
var fheight=150 //set scroller height
///No need to edit below this line/////////////////
var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var faderdelay=0
var index=0
if (DOM2)
faderdelay=2000
//function to change content
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("fscroller").style.color="rgb(255,255,255)"
document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
colorfade()
}
else if (ie4)
document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag
else if (ns4){
document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag)
document.fscrollerns.document.fscrollerns_sub.document.close()
}
// colorfade() partially by Marcio Galli for Netscape Communications. ////////////
// Modified by Dynamicdrive.com
frame=20;
hex=255 // Initial color value.
function colorfade() {
// 20 frames fading process
if(frame>0) {
hex-=12; // increase color value
document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.
frame--;
setTimeout("colorfade()",20);
}
else{
document.getElementById("fscroller").style.color="rgb(0,0,0)";
frame=20;
hex=255
}
}
if (ie4||DOM2)
document.write('<div id="fscroller" style="border:1px solid black;width:'+fwidth+';height:'+fheight+';padding:2px"></div>')