var delay = 3000;
var maxsteps = 30;
var stepdelay = 40;
var startcolor = new Array(210, 203, 197);
var endcolor = new Array(0, 0, 0);
var pointshow = new Array();
var begintag = '
';
pointshow[0] = '上证指数2717.1 -0.17%';
pointshow[1] = '深成指数8054.2 -0.63%';
pointshow[2] = '恒生指数17240.4 +0.77%';
pointshow[3] = '道琼斯3041081.2 +0.54%';
pointshow[4] = '纳斯达克17538.3 +0.82%';
pointshow[5] = '伦敦FTSE8241.0 +0.57%';
pointshow[6] = '法国CAC7435.1 +0.52%';
pointshow[7] = '德国DAX18518.4 +1.03%';
pointshow[8] = '澳洲指数8075.7 +1.10%';
pointshow[9] = '日经25536833.3 +3.41%';
pointshow[10] = '汉城综合2571.9 +2.33%';
pointshow[11] = '台北加权21653.3 +2.96%';
pointshow[12] = '纽约原油69.0 +2.47%';
pointshow[13] = '黄金现货2558.7 +1.88%';
pointshow[14] = '比特币58492.0 +1.24%';
pointshow[15] = '美元牌价712.3 -0.07%';
pointshow[16] = '欧元牌价786.4 -0.15%';
pointshow[17] = '美元指数101.3 -0.42%';
var closetag = '
';
var fwidth = '450px';
var fheight = '35px';
var fadelinks = 1;
var ie4 = document.all && !document.getElementById;
var DOM2 = document.getElementById;
var faderdelay = 0;
var index = 0;
function changecontent() {
if (index >= pointshow.length / 6) { index = 0; }
var tablestring = '';
for (var i = index * 6; i < index * 6 + 6; i++) {
if (i == index * 6 + 3)
tablestring += '
';
var temptags = pointshow[i].split('');
tablestring += '' + temptags[0] + ' | ' + temptags[1] + ' | ';
}
tablestring += '
';
if (DOM2) {
document.getElementById('fscroller').style.color = 'rgb(' + startcolor[0] + ', ' + startcolor[1] + ', ' + startcolor[2] + ')';
document.getElementById('fscroller').innerHTML = begintag + tablestring + closetag;
if (fadelinks) { linkcolorchange(1); } colorfade(1, 15);
} else { if (ie4) { document.all.fscroller.innerHTML = begintag + tablestring + closetag; } } index++;
}
function linkcolorchange(A) {
var B = document.getElementById('fscroller').getElementsByTagName('A');
if (B.length > 0) {
for (i = 0;
i < B.length;
i++) { B[i].style.color = getstepcolor(A); }
}
}
var fadecounter;
function colorfade(A) {
if (A <= maxsteps) {
document.getElementById('fscroller').style.color = getstepcolor(A);
if (fadelinks) { linkcolorchange(A) } A++;
fadecounter = setTimeout('colorfade(' + A + ')', stepdelay);
} else {
clearTimeout(fadecounter);
document.getElementById('fscroller').style.color = 'rgb(' + endcolor[0] + ', ' + endcolor[1] + ', ' + endcolor[2] + ')';
setTimeout('changecontent()', delay);
}
}
function getstepcolor(B) {
var D;
var C = new Array(3);
for (var A = 0;
A < 3;
A++) {
D = (startcolor[A] - endcolor[A]);
if (D > 0) { C[A] = startcolor[A] - (Math.round((D / maxsteps)) * B) } else { C[A] = startcolor[A] + (Math.round((Math.abs(D) / maxsteps)) * B); }
} return ('rgb(' + C[0] + ', ' + C[1] + ', ' + C[2] + ')');
}
if (ie4 || DOM2) { document.write(''); }if (window.addEventListener) { window.addEventListener('load', changecontent, false); } else { if (window.attachEvent) { window.attachEvent('onload', changecontent); } else { if (document.getElementById) { window.onload = changecontent; } } };