1
|
<!--
|
2
|
|
3
|
var width="310px";
|
4
|
|
5
|
var speed=2;
|
6
|
var pauseit=1;
|
7
|
|
8
|
var divonclick=speed=(document.all)? speed : Math.max(1, speed-1);
|
9
|
var copyspeed=speed;
|
10
|
var pausespeed=(pauseit==0)? copyspeed: 0;
|
11
|
var iedom=document.all||document.getElementById;
|
12
|
|
13
|
if (iedom&&content)
|
14
|
document.write('<span id="marquee-container">'+content+'</span>');
|
15
|
|
16
|
var actualwidth='';
|
17
|
var scroller;
|
18
|
|
19
|
try {
|
20
|
if (window.addEventListener)
|
21
|
window.addEventListener("load", populatescroller, false);
|
22
|
else if (window.attachEvent)
|
23
|
window.attachEvent("onload", populatescroller);
|
24
|
else if (document.all || document.getElementById)
|
25
|
window.onload=populatescroller;
|
26
|
}catch(e){}
|
27
|
|
28
|
function populatescroller(){
|
29
|
try {
|
30
|
scroller=document.getElementById? document.getElementById("scroller") : document.all.scroller;
|
31
|
scroller.style.left=parseInt(width)+8+"px";
|
32
|
scroller.style.width = parseInt(document.getElementById("marquee-text").offsetWidth) + 40 + "px";
|
33
|
scroller.innerHTML=content;
|
34
|
document.getElementById("marquee-text");
|
35
|
actualwidth=document.all? document.getElementById("marquee-text").offsetWidth : document.getElementById("marquee-text").offsetWidth;
|
36
|
lefttime=setInterval("scrollmarquee()",20);
|
37
|
}catch(e){}
|
38
|
}
|
39
|
|
40
|
function scrollmarquee(){
|
41
|
|
42
|
try {
|
43
|
if (parseInt(scroller.style.left)>(actualwidth*(-1)+8))
|
44
|
scroller.style.left=parseInt(scroller.style.left)-copyspeed+"px";
|
45
|
else
|
46
|
scroller.style.left=parseInt(width)+8+"px";
|
47
|
}catch(e){}
|
48
|
}
|
49
|
|
50
|
if (iedom){
|
51
|
document.write('<table id="marquee"><tr><td>');
|
52
|
document.write('<div id="container" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=speed">');
|
53
|
document.write('<div id="scroller"></div>');
|
54
|
document.write('</div>');
|
55
|
document.write('</td></tr></table>');
|
56
|
}
|
57
|
|
58
|
//-->
|