var i = 0; // used to cycle thru messages var TextNumber = -1; // array of messages var TextInput = new Object(); // used to load manipulate message var HelpText=""; // used to load message var Text = ""; // length of timeout (smaller is faster) var Speed=50; // used to display message number var message=0; // used to position text in ver 2.0 var addPadding="rn"; // Each element of TextInput represents a single message. TextInput[0] = "今天注意了有新的任务布置"; TextInput[1] = "欢迎你的光临!本站为你提供大量Javascript下载"; TextInput[2] = "重点介绍Javascript"; TextInput[3] = "与制作网页特效密切相关的技术"; TextInput[4] = "本站同时有影音空间等栏目"; TextInput[5] = "还有新闻及健康方面的资料"; TextInput[6] = "还有宽带网方面的大量技术文章"; TextInput[7] = "本站网址:http://www.njcatv.net"; TotalTextInput = 7; // (0, 1, 2, 3, 4, 5, 6, 7) // Positioning and speed vary between versions. var Version = navigator.appVersion; if (Version.substring(0, 1)==3) { Speed=200; addPadding=""; } for (var addPause = 0; addPause <= TotalTextInput; addPause ) {TextInput[addPause]=addPadding TextInput[addPause];} var TimerId var TimerSet=false; // Called by >>> button (display next message) . function nextMessage() { if (!TimerSet) { TimerSet=true; clearTimeout (TimerId); if (TextNumber>=TotalTextInput) { alert("This is the end of the list!"); TimerSet=false; }